1 #ifndef CALLSTACK_TRACKER_CLASS
2 #define CALLSTACK_TRACKER_CLASS
20 #ifdef ENABLE_CALLSTACK_TRACKING
23 #include "root_object.h"
28 class callstack_records;
29 class callstack_tracker;
33 callstack_tracker BASIS_EXTERN &program_wide_stack_trace();
46 class callstack_tracker
50 virtual ~callstack_tracker();
54 bool push_frame(
const char *class_name,
const char *func,
const char *file,
67 bool update_line(
int line);
72 char *full_trace()
const;
76 int full_trace_size()
const;
79 int depth()
const {
return _depth; }
82 double frames_in()
const {
return _frames_in; }
85 double frames_out()
const {
return _frames_out; }
88 double highest()
const {
return _highest; }
92 callstack_records *_bt;
114 bool _frame_involved;
115 char *_class, *_func, *_file;
119 const char *file =
"",
int line = 0,
bool add_frame =
false);
133 void assign(
const char *class_name,
const char *func,
const char *file,
146 #define frame_tracking_instance
147 #define __trail_of_function(p1, p2, p3, p4, p5) if (func) {}
150 #define update_current_stack_frame_line_number(line)
Contains definitions that control how libraries and programs are built.
#define update_current_stack_frame_line_number(line)
#define frame_tracking_instance
Constants and objects used throughout HOOPLE.
#define DEFINE_CLASS_NAME(objname)
Defines the name of a class by providing a couple standard methods.
Implements an application lock to ensure only one is running at once.