frysk.ftrace
Class MappingGuard

java.lang.Object
  extended by frysk.ftrace.MappingGuard

 class MappingGuard
extends Object

Use this pseudo-class to request that an map/unmap observer be attached to given Task.


Nested Class Summary
private static class MappingGuard.DebugStateMappingGuard
           
private static class MappingGuard.MappingGuardB
           
private static class MappingGuard.SyscallMappingGuard
           
 
Field Summary
(package private) static boolean enableDebugstateObserver
           
(package private) static boolean enableSyscallObserver
           
private static Log fine
           
private static Map guardsForTask
           
 
Constructor Summary
MappingGuard()
           
 
Method Summary
static void requestAddMappingObserver(Task task, MappingObserver observer)
           
private static void requestAddMappingObserver(Task task, MappingObserver observer, boolean preferDebugstate)
           
static void requestAddSyscallBasedMappingObserver(Task task, MappingObserver observer)
           
static void requestDeleteMappingObserver(Task task, MappingObserver observer)
           
private static MappingGuard.MappingGuardB setupDebugStateObserver(Task task)
          Try to setup guard based on _dl_debug_state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fine

private static final Log fine

enableSyscallObserver

static boolean enableSyscallObserver

enableDebugstateObserver

static boolean enableDebugstateObserver

guardsForTask

private static final Map guardsForTask
Constructor Detail

MappingGuard

MappingGuard()
Method Detail

setupDebugStateObserver

private static MappingGuard.MappingGuardB setupDebugStateObserver(Task task)
Try to setup guard based on _dl_debug_state. Set up _dl_debug_state observer to spot each mapping. The proper way to do this is to look up the DT_DEBUG entry in task's DYNAMIC segment, and look into the structure it points to. But we would have to wait for dynamic linker to fill this info, and meanwhile we would miss all the mapping/unmapping.

Returns:
true on success, false on failure.

requestAddMappingObserver

private static void requestAddMappingObserver(Task task,
                                              MappingObserver observer,
                                              boolean preferDebugstate)

requestAddMappingObserver

public static void requestAddMappingObserver(Task task,
                                             MappingObserver observer)

requestAddSyscallBasedMappingObserver

public static void requestAddSyscallBasedMappingObserver(Task task,
                                                         MappingObserver observer)

requestDeleteMappingObserver

public static void requestDeleteMappingObserver(Task task,
                                                MappingObserver observer)