aboutsummaryrefslogtreecommitdiff
path: root/gprofng/src/collctrl.h
diff options
context:
space:
mode:
authorVladimir Mezentsev <vladimir.mezentsev@oracle.com>2024-08-08 21:30:08 -0700
committerVladimir Mezentsev <vladimir.mezentsev@oracle.com>2024-08-12 15:54:59 -0700
commit6a60060d3e7b39868ca2fbb2c8ef1c593fd00313 (patch)
tree80129c581623d83441d8924efcc9470ba1c2e018 /gprofng/src/collctrl.h
parentc412d3f5d9ec6c9493232df9c91e17361af775f0 (diff)
downloadgdb-6a60060d3e7b39868ca2fbb2c8ef1c593fd00313.zip
gdb-6a60060d3e7b39868ca2fbb2c8ef1c593fd00313.tar.gz
gdb-6a60060d3e7b39868ca2fbb2c8ef1c593fd00313.tar.bz2
gprofng: specify the heap data collection range
Extend the -H option: -H {off|on|N1[-N2]} disable , or enable heap tracing, or specify the heap data collection range. The default is "-H off". gprofng/ChangeLog 2024-08-08 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> * libcollector/heaptrace.c: Read the range in the -H option. Do not collect data if the allocated memory is out of range. * src/collctrl.h (heaptrace_mode): Define as char * value. * src/envsets.cc: Updated since heaptrace_mode is changed. * src/collctrl.cc: Accept the extended -H option. * src/gp-collect-app.cc: Accept the extended -H option. Remove unused code.
Diffstat (limited to 'gprofng/src/collctrl.h')
-rw-r--r--gprofng/src/collctrl.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/gprofng/src/collctrl.h b/gprofng/src/collctrl.h
index a416474..788df7a 100644
--- a/gprofng/src/collctrl.h
+++ b/gprofng/src/collctrl.h
@@ -101,8 +101,7 @@ public:
/* set the parameters for heap tracing */
char *set_heaptrace(const char *);
- int get_heaptrace_mode() { return heaptrace_enabled; };
- int get_heaptrace_checkmode() { return heaptrace_checkenabled; };
+ char *get_heaptrace_mode() { return heaptrace_mode; };
/* set the parameters for I/O tracing */
char *set_iotrace(const char *);
@@ -342,12 +341,7 @@ private:
/* definitions in data_pckts.h */
int synctrace_scope;
- int heaptrace_enabled; /* T if heap tracing */
- /* if 0 no checking;
- * if 1, check for over- and under-write
- * if 2, also set patterns in malloc'd and free'd areas
- */
- int heaptrace_checkenabled;
+ char *heaptrace_mode; /* NULL, or on, or off, or range */
int iotrace_enabled; /* T if I/O tracing */
/* count controls */