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 // performanceStream - a stream returned by createPerformanceStream
85 // parent - parent of new resource
86 // newResource - new resource being created (full name)
87 // name - short name of the new resource
89 $upcall $async void resourceInfoCallback(int program,
94 void setSampleRate(double sampleInterval);
97 // Routines to control data collection on a performanceStream.
99 // resourceList - a list of resources
100 // metric - what metric to collect data for
102 int enableDataCollection($array String resourceList, String metric);
105 // stop collecting data for the named mi.
106 // mi - a metricInstance returned by enableDataCollection.
108 void disableDataCollection(int mi);
111 // Return the expected cost of collecting performance data for a single
112 // metric at a given focus. The value returned is the fraction of
113 // perturbation expected (i.e. 0.10 == 10% slow down expected).
115 double getPredictedDataCost($array String resourceList, String metric);
118 // Get the static configuration information.
120 $array metricInfo getAvailableMetrics();
123 // Debugger style calls.
126 String getStatus(int pid);
127 void coreProcess(int pid);