aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/beam_bp.h
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2010-04-21 15:29:31 +0200
committerRaimo Niskanen <[email protected]>2010-06-03 14:54:20 +0200
commit78d5145d68783dca4aa43bfd38fb9afecc59c416 (patch)
tree8f340d1e3250a383d1fc67a5fdadf360eaf1c979 /erts/emulator/beam/beam_bp.h
parentcfa905aece83e5a07f67fa169fe8f44c1c163bde (diff)
downloadotp-78d5145d68783dca4aa43bfd38fb9afecc59c416.tar.gz
otp-78d5145d68783dca4aa43bfd38fb9afecc59c416.tar.bz2
otp-78d5145d68783dca4aa43bfd38fb9afecc59c416.zip
Add processes hashes for call time breakpoints
Call time breakpoint tracing traces per call trace per process. - Add hashes to support the extra dimension. - Teach trace_info/2 to handle the extra information dimension.
Diffstat (limited to 'erts/emulator/beam/beam_bp.h')
-rw-r--r--erts/emulator/beam/beam_bp.h25
1 files changed, 20 insertions, 5 deletions
diff --git a/erts/emulator/beam/beam_bp.h b/erts/emulator/beam/beam_bp.h
index 3fac85348f..58fd65399d 100644
--- a/erts/emulator/beam/beam_bp.h
+++ b/erts/emulator/beam/beam_bp.h
@@ -24,6 +24,7 @@
#include "sys.h"
#include "erl_vm.h"
#include "global.h"
+//#include "hash.h"
@@ -76,22 +77,36 @@ typedef struct bp_data_count { /* Call count */
} BpDataCount;
typedef struct {
- Sint count;
- Uint s_time;
- Uint us_time;
+ Eterm pid;
+ Sint count;
+ Uint s_time;
+ Uint us_time;
} bp_data_time_item_t;
+typedef struct {
+ Uint n;
+ Uint used;
+ bp_data_time_item_t *item;
+} bp_time_hash_t;
+
typedef struct bp_data_time { /* Call time */
struct bp_data *next;
struct bp_data *prev;
Uint orig_instr;
Uint n;
- bp_data_time_item_t *items;
+ bp_time_hash_t *hash;
} BpDataTime;
+typedef struct {
+ Uint ms;
+ Uint s;
+ Uint us;
+ BpDataTime *bdt;
+} process_breakpoint_time_t; /* used within psd */
extern erts_smp_spinlock_t erts_bp_lock;
+
#ifdef ERTS_SMP
#define ErtsSmpBPLock(BDC) erts_smp_spin_lock(&erts_bp_lock)
#define ErtsSmpBPUnlock(BDC) erts_smp_spin_unlock(&erts_bp_lock)
@@ -197,7 +212,7 @@ int erts_is_mtrace_bif(BeamInstr *pc, Binary **match_spec_ret,
Eterm *tracer_pid_ret);
int erts_is_native_break(BeamInstr *pc);
int erts_is_count_break(BeamInstr *pc, Sint *count_ret);
-int erts_is_time_break(BeamInstr *pc, Sint *count, Uint *s_time, Uint *us_time);
+int erts_is_time_break(Process *p, BeamInstr *pc, Eterm *call_time);
void erts_do_time_break(Process *p, BpDataTime *bdt);