changes relating to phase interface stuff
[dyninst.git] / visi / h / visi.I
1
2 /*
3  * Copyright (c) 1993, 1994 Barton P. Miller, Jeff Hollingsworth,
4  *     Bruce Irvin, Jon Cargille, Krishna Kunchithapadam, Karen
5  *     Karavanic, Tia Newhall, Mark Callaghan.  All rights reserved.
6  * 
7  * This software is furnished under the condition that it may not be
8  * provided or otherwise made available to, or used by, any other
9  * person, except as provided for by the terms of applicable license
10  * agreements.  No title to or ownership of the software is hereby
11  * transferred.  The name of the principals may not be used in any
12  * advertising or publicity related to this software without specific,
13  * written prior authorization.  Any use of this software must include
14  * the above copyright notice.
15  *
16  */
17
18 /* $Log: visi.I,v $
19 /* Revision 1.12  1995/08/01 01:58:45  newhall
20 /* changes relating to phase interface stuff
21 /*
22 # Revision 1.11  1995/06/02  21:01:55  newhall
23 # changed type of metric and focus handles to u_int
24 #
25 # Revision 1.10  1995/02/26  01:59:28  newhall
26 # added phase interface functions
27 #
28 # Revision 1.9  1995/02/16  09:32:03  markc
29 # Modified to support machines which do not have NaN(x).
30 # This code has not been tested, but it compiles.
31 #
32 # Revision 1.8  1994/09/25  01:58:13  newhall
33 # changed interface definitions to work for new version of igen
34 # changed AddMetricsResources def. to take array of metric/focus pairs
35 #
36 # Revision 1.7  1994/09/22  03:12:24  markc
37 # declared arrays at start
38 # incremented version number
39 #
40 # Revision 1.6  1994/08/17  18:21:09  markc
41 # Incremented the version number because a new version of igen is in place.
42 #
43 # Revision 1.5  1994/08/03  20:47:28  newhall
44 # removed interface routines Enabled and NewMetricsResources
45 #
46 # Revision 1.4  1994/07/30  03:26:18  newhall
47 # added visi interface routines Enabled and BulkDataTransfer
48 #
49 # Revision 1.3  1994/05/11  17:11:07  newhall
50 # changed data values from double to float
51 #
52 # Revision 1.2  1994/04/13  21:23:09  newhall
53 # *** empty log message ***
54 #
55 # Revision 1.1  1994/03/29  02:42:13  newhall
56 # exported services of the visualization process
57 #
58 # Revision 1.3  1994/03/17  05:20:35  newhall
59 # changed bucket width and time value's type to double
60 #
61 # Revision 1.2  1994/03/14  20:28:52  newhall
62 # changed visi subdirectory structure
63 #  */ 
64
65
66 $remote struct metricType {
67      string units;    // how units are measured  i.e. "ms" 
68      string name;     // for y-axis labeling  
69      u_int  Id;       // unique metric Id
70      int    aggregate;  //either SUM or AVE
71 };
72
73 $remote struct resourceType {
74      string name;     // obj. name for graph labeling
75      u_int  Id;       // unique resource id
76 };
77
78 $remote struct dataValue {
79   u_int metricId;
80   u_int resourceId;
81   int   bucketNum;
82   float data;
83 };
84
85 $remote struct visi_matrix {
86     resourceType res;
87     metricType   met;
88 };
89
90 $remote struct phase_info{
91   double start;
92   double end;
93   double  bucketWidth;
94   u_int handle;
95   string name;
96 };
97
98 $remote visualization {
99   $base  7000;
100   $version  12;
101
102   // data: list of new data values from Paradyn 
103   $async void Data(vector<dataValue> data);  
104
105   // a fold event from paradyn
106   $async void Fold(double newBucketWidth);
107
108   //
109   // A metric/focus pair has become invalid (from Paradyn)
110   // m: metricId of invalid metric-focus combination
111   // r: resourceId of invalid metric-focus combination
112   //
113   $async void InvalidMR(u_int m,u_int r);
114
115   //
116   // A new set of metrics and resources from Paradyn
117   // newElements: a list of new metric-focus matrices
118   // bucketWidth: current bucket width for histograms
119   // nobuckets:   max number of buckets for histograms
120   $async void AddMetricsResources(vector<visi_matrix> newElements,
121                                   double bucketWidth,
122                                   int nobuckets,
123                                   double start_time,
124                                   int phase_handle);
125   //
126   // A new phase has been defined by paradyn
127   //
128   $async void PhaseStart(double begin,  // phase start time
129                     double end,         // -1 means phase has not ended yet
130                     double bucketWidth,  // for histogram data values
131                     string name,        // string name for phase 
132                     u_int handle);      // unique phase id 
133
134   //
135   // A phase specified by "handle" has ended
136   // currently this is just used to fill in the end value in the phase table
137   //
138   $async void PhaseEnd(double end,
139                        u_int handle);
140
141
142   //
143   // A list of phase data from paradyn (response to GetPhaseInfo upcall) 
144   //
145   $async void PhaseData(vector<phase_info> phases);
146
147
148   //
149   // An array of data values from Paradyn starting with bucket #0
150   //
151   $async void BulkDataTransfer(vector<float> values, // array of data values 
152                                u_int metricId,    // id of met. assoc. w/data
153                                u_int resourceId);   // id of res. assoc. w/data
154
155
156   //
157   //  request from the visi to Paradyn for list of phases currently defined
158   //  in system
159   //
160   $upcall $async void GetPhaseInfo();
161
162   //
163   // A request from the visualization to Paradyn for new data
164   //
165   $upcall $async void GetMetricResource(string mets_res,
166                                         int numElements,
167                                         int type);
168   //
169   // A request to Paradyn to stop data associated with metricId & resourceId
170   //
171   $upcall $async void StopMetricResource(u_int metricId,
172                                          u_int resourceId);
173
174   // request a new phase start from paradyn 
175   // begin: phase start time (default of -1 means now)
176   // name:  phase name (default of NULL means let paradyn provide name)
177   $upcall $async void StartPhase(double begin, 
178                                 string name);
179 };