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

Class TraceGroup

source code

        object --+    
                 |    
notifiers.Notifier --+
                     |
 util.TraceManager --+
                     |
                    TraceGroup

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

Instance Methods [hide private]
 
__init__(self)
All extenders *must* call this.
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 notifiers.Notifier: handleEvent

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

All extenders *must* call this. Mostly because all the goop necissary for the remote debugging stuff... (if notifier is instantiated on server, all is well, if it's on the client it needs a proxy...)

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.

notify(self, event, trace)

source code 
Overrides: notifiers.Notifier.notify