VIRTUTECH CONFIDENTIAL    Previous - Up - Next

tracker

Implemented By
cpu-mode-tracker, linux-process-tracker, ppc32-linux-process-tracker, ppc64-linux-process-tracker, x86-linux-process-tracker
Description


Note: This interface is not supported, and may change in the future.

Interface for trackers. This is a generic interface implemented by all trackers, regardless of what it is that they track.

Typically, the things being tracked (the trackees) are processes. The tracker keeps track of what trackee is active on what processor; this is useful when one wants to observe one specific trackee and disregard the others. Trackees are identified by a unique integer called a tid (Trackee ID).

typedef struct {
        integer_t (*active_trackee)(conf_object_t *NOTNULL tracker,
                                    conf_object_t *NOTNULL cpu);
        const char *(*describe_trackee)(conf_object_t *NOTNULL tracker,
                                        integer_t tid);
        attr_value_t (*processor_list)(conf_object_t *NOTNULL tracker);
        void (*add_processor)(conf_object_t *NOTNULL tracker,
                              conf_object_t *NOTNULL cpu);
        void (*remove_processor)(conf_object_t *NOTNULL tracker,
                                 conf_object_t *NOTNULL cpu);
        int (*supports_processor)(const char *NOTNULL classname);
        int (*activate)(conf_object_t *NOTNULL tracker);
        int (*deactivate)(conf_object_t *NOTNULL tracker);
} tracker_interface_t;
#define TRACKER_INTERFACE "tracker"

active_trackee returns the tid of the trackee that is currently active on the given processor. describe_trackee returns a short string that describes the trackee with the given tid.

processor_list returns the set of processors being watched by the tracker. add_processor and remove_processor add and remove a processor from this set, respectively.

supports_processor returns true if trackers of this type support processors of the given class, and false otherwise.

Before using the tracker, call activate. When you are done with it, call deactivate.

In addition to these interface functions, the tracker should trigger the Core_Trackee_Active hap when the active trackee changes for a processor.

Command List
activateactivate tracker
add-processortrack processes on this processor
deactivatedeactivate tracker
remove-processordo not track processes on this processor

Command Descriptions

<tracker>.activate
Synopsis
<tracker>.activate
Description
Activate a tracker. For performance reasons, trackers are inactive by default and need to be activated before they start tracking processes. If the tracker is used by another object, such as a context switcher, it is the responsibility of that object to activate the tracker; but if you want to use it directly, you must activate it yourself.
See Also
<tracker>.deactivate
<tracker>.add-processor
Synopsis
<tracker>.add-processor "processor"
Description
Add a processor to the set of processors that the process tracker watches.
See Also
<tracker>.remove-processor
<tracker>.deactivate
Synopsis
<tracker>.deactivate
Description
Deactivate a tracker. This command undoes the effects of one activate command; when all of them are undone, the tracker will stop tracking processes (and consuming resources).
See Also
<tracker>.activate
<tracker>.remove-processor
Synopsis
<tracker>.remove-processor "processor"
Description
Remove a processor from the set of processors that the process tracker watches.
See Also
<tracker>.add-processor

VIRTUTECH CONFIDENTIAL    Previous - Up - Next