|
From: Petr L. <lu...@us...> - 2001-08-24 17:54:08
|
Update of /cvsroot/javaprofiler/library/src/setup
In directory usw-pr-cvs1:/tmp/cvs-serv4667/setup
Modified Files:
setup.cpp setup.h
Log Message:
Monitor profiling
Index: setup.cpp
===================================================================
RCS file: /cvsroot/javaprofiler/library/src/setup/setup.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** setup.cpp 2001/08/12 07:35:31 1.4
--- setup.cpp 2001/08/24 17:54:04 1.5
***************
*** 14,17 ****
--- 14,22 ----
cpu.threadsEnabled = 1;
+ mon.turnedOn = 1;
+ mon.level = LEVEL_TRACE;
+ mon.traceDepth = 2;
+ mon.threadsEnabled = 1;
+
if( options) processOptions( options);
}
***************
*** 144,147 ****
--- 149,193 ----
else if (strcmp(value, "off") == 0)
cpu.threadsEnabled = 0;
+
+ return;
+ }
+
+ if (strcmp(name, "mon") == 0) {
+
+ if (strcmp(value, "on") == 0)
+ mon.turnedOn = 1;
+ else if (strcmp(value, "off") == 0)
+ mon.turnedOn = 0;
+
+ return;
+ }
+
+ if (strcmp(name, "mon_level") == 0) {
+
+ if (strcmp(value, "method") == 0)
+ mon.level = LEVEL_METHOD;
+ else if (strcmp(value, "trace") == 0)
+ mon.level = LEVEL_TRACE;
+
+ return;
+ }
+
+ if (strcmp(name, "mon_trace_depth") == 0) {
+
+ int depth = atoi(value);
+
+ if (depth > 0) {
+ if (depth > MAX_TRACE) depth = MAX_TRACE;
+ mon.traceDepth = depth;
+ }
+ return;
+ }
+
+ if (strcmp(name, "mon_thread") == 0) {
+
+ if (strcmp(value, "on") == 0)
+ mon.threadsEnabled = 1;
+ else if (strcmp(value, "off") == 0)
+ mon.threadsEnabled = 0;
return;
Index: setup.h
===================================================================
RCS file: /cvsroot/javaprofiler/library/src/setup/setup.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** setup.h 2001/08/12 07:35:31 1.5
--- setup.h 2001/08/24 17:54:04 1.6
***************
*** 48,52 ****
/** Granularity level.
! ** Possible values are LEVEL_OBJECT and LEVEL_TRACE. */
LEVEL level;
--- 48,52 ----
/** Granularity level.
! ** Possible values are LEVEL_METHOD and LEVEL_TRACE. */
LEVEL level;
***************
*** 59,62 ****
--- 59,80 ----
};
+ /// Monitor profiling setup parameters
+ struct Mon {
+
+ /// Whether monitor profiling is turned ON or OFF
+ int turnedOn;
+
+ /** Granularity level.
+ ** Possible values are LEVEL_METHOD and LEVEL_TRACE. */
+
+ LEVEL level;
+
+ /// Trace depth
+ int traceDepth;
+
+ /// Whether resolution to threads is enabled
+ int threadsEnabled;
+ };
+
/// setup for communication
struct Com {
***************
*** 100,103 ****
--- 118,124 ----
/// CPU profiling
Cpu cpu;
+
+ /// Monitor profiling
+ Mon mon;
/// Communication
|