VIRTUTECH CONFIDENTIAL    Previous - Up - Next

context-switcher

Provided by
context-switcher
Class Hierarchy
conf-objectlog-objectcontext-switcher
Interfaces Implemented
log_object
Description

This object makes sure that certain context objects are active when certain simulated processes are active.

Attributes

Attributes inherited from class conf-object
attributes, classname, component, iface, name, object_id, queue
Attributes inherited from class log-object
access_count, log_buffer, log_buffer_last, log_buffer_size, log_group_mask, log_groups, log_level, log_type_mask
Attribute List
contexts
Session attribute; read/write access; type: [[i,o]*]; integer indexed; indexed type: Object or Nil.

Context to use for each tid. tids that are not mapped to a context here use the default context. Mapping a tid to Nil deletes any mapping from that tid to a context.

default_context
Session attribute; read/write access; type: [[o|s,o|n]*]; string indexed; indexed type: Object or Nil.

List of (cpu, context) pairs, specifying what context to use for a processor when no interesting process is active.

exec_watch
Session attribute; read/write access; type: [[s,[o,i|n]|n]*]; string indexed; indexed type: [o,i|n]|n.

Watch list for the exec syscall. This is a map from binary name to context object and a counter. When a process calls exec with a binary that is in this watch list, its pid is mapped to the context in the contexts attribute, so that the context will follow that process. The counter is decremented; when it reaches zero, the mapping is deleted from this watch list. (A Nil counter makes the mapping last forever.)

Mapping a binary name to Nil deletes any mapping from that binary to a context.

tracker
Session attribute; read/write access; type: Object or Nil.

Tracker that keeps track of simulated processes.

Command List

Commands defined by interface log_object
log, log-group, log-level, log-size, log-type
Commands
statusprint status of the device
track-bintrack first use of a given binary
track-pidtrack the process with a given pid

Command Descriptions

<context-switcher>.status
Synopsis
<context-switcher>.status
Description
Print detailed information about the current status of the device.
<context-switcher>.track-bin
Synopsis
<context-switcher>.track-bin "binary" ["context"] [-persistent] [-remove]
Description
After this command is given, the first process that makes an exec syscall with the given binary as argument will be associated to the given context just as if the track-pid command had been used. If no context is specified, a new one will be created.

If the -persistent flag is given, all processes – not just the first – that exec the binary will be associated with the context.

If the -remove flag is given, any existing mapping from this binary will be removed.

This command requires the attached tracker to be a UNIX process tracker.

See Also
<context-switcher>.track-pid
<context-switcher>.track-pid
Synopsis
<context-switcher>.track-pid pid ["context"] [-remove]
Description
Causes the given context to be active when a process with the given pid is active; if no context is specified, a new one will be created for this purpose.

If the -remove flag is given, any existing mapping from this pid will be removed.

This command requires the attached tracker to be a UNIX process tracker.

See Also
<context-switcher>.track-bin

VIRTUTECH CONFIDENTIAL    Previous - Up - Next