1 #define MetStyleEventCounter 0
2 #define MetStyleSampledFunction 1
5 /* descriptive information about a metric */
6 $remote typedef struct {
13 * Create a paradynd process.
16 int createDaemon(String machine,
28 // Define a program to run.
29 int addExecutable(int argc, $array String argv);
32 // Connect up with a running program (not possible on all platforms).
34 Boolean attachProgram(int pid);
37 // Start an application running (This starts the actual execution).
39 Boolean startProgram(int program);
42 // Stop all processes associted with the application.
44 Boolean pauseProgram(int program);
47 // Continue a paused application.
49 void continueProgram(int program);
53 // Disconnect the tool from the process.
54 // pause - leave the process in a stopped state.
57 Boolean detachProgram(int program, Boolean pause);
60 // Gets called when a new application is started that is not visible to
61 // paradyn (e.g. pvm_spawn).
63 $upcall $async void newProgramCallbackFunc(int program);
66 // Handler that gets called when new sample data is delivered.
68 // p - a program from addProgram
69 // mi - a metricInstance returned by enableDataCollection
70 // startTimeStamp - starting time of the interval covered by this sample.
71 // endTimeStamp - ending time of the interval covered by this sample.
72 // value - the value of this sample
75 $upcall $async void sampleDataCallbackFunc(int program,
77 double startTimeStamp,
82 // Handler that gets called when a new resource is defined.
84 // parent - parent of new resource
85 // newResource - new resource being created (full name)
86 // name - short name of the new resource
88 $upcall $async void resourceInfoCallback(int program,
94 // Upcall for a new metric being defined.
96 $upcall $async void newMetricCallback(metricInfo info);
98 void setSampleRate(double sampleInterval);
101 // Routines to control data collection on a performanceStream.
103 // resourceList - a list of resources
104 // metric - what metric to collect data for
106 int enableDataCollection($array String resourceList, String metric);
109 // stop collecting data for the named mi.
110 // mi - a metricInstance returned by enableDataCollection.
112 void disableDataCollection(int mi);
115 // Return the expected cost of collecting performance data for a single
116 // metric at a given focus. The value returned is the fraction of
117 // perturbation expected (i.e. 0.10 == 10% slow down expected).
119 double getPredictedDataCost($array String resourceList, String metric);
122 // Get the static configuration information.
124 $array metricInfo getAvailableMetrics();
127 // Create a new resource.
129 void addResource(String parent, String name);
132 // Debugger style calls.
135 String getStatus(int pid);
136 void coreProcess(int pid);