Package vtrace :: Class TraceGroup
[hide private]
[frames] | no frames]

Class TraceGroup

source code


Encapsulate several traces, run them, and continue to handle their event notifications.

Instance Methods [hide private]
 
__init__(self) source code
 
setMeta(self, name, value)
A trace group's setMeta function will set "persistant" metadata which will be added again to any trace on attach.
source code
 
setMode(self, name, value) source code
 
detachAll(self)
Detach from ALL the currently targetd processes
source code
 
run(self)
Our run method is a little different than a traditional trace.
source code
 
execTrace(self, cmdline) source code
 
addTrace(self, proc)
Add a new tracer to this group the "proc" argument may be either an long() for a pid (which we will attach to) or an already attached (and broken) tracer object.
source code
 
getTrace(self)
Similar to vtrace.getTrace(), but also init's the trace for being managed by a TraceGroup.
source code
 
_initTrace(self, trace)
INTERNAL -
source code
 
delTrace(self, pid)
Remove a trace from the current TraceGroup
source code
 
getTraces(self)
Return a list of the current traces
source code
 
getTraceByPid(self, pid)
Return the the trace for process PID if we're already attached.
source code
 
notify(self, event, trace) source code

Inherited from util.TraceManager: deregisterNotifier, fireLocalNotifiers, getMeta, getMode, manageTrace, registerNotifier, unManageTrace

Method Details [hide private]

__init__(self)
(Constructor)

source code 
Overrides: util.TraceManager.__init__

setMeta(self, name, value)

source code 

A trace group's setMeta function will set "persistant" metadata which will be added again to any trace on attach. Additionally, setting metadata on a tracegroup will cause all current traces to get the update as well....

Overrides: util.TraceManager.setMeta

setMode(self, name, value)

source code 
Overrides: util.TraceManager.setMode

run(self)

source code 

Our run method is a little different than a traditional trace. It will *never* block.

getTrace(self)

source code 

Similar to vtrace.getTrace(), but also init's
the trace for being managed by a TraceGroup.

Example:
    tg = TraceGroup()
    t = tg.getTrace()
    t....

getTraceByPid(self, pid)

source code 

Return the the trace for process PID if we're already attached. Return None if not.