diff options
author | Björn-Egil Dahlberg <[email protected]> | 2016-01-28 11:45:34 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2016-04-06 17:23:55 +0200 |
commit | 955cd62970391b40123f2b9dee3bb3380233c17e (patch) | |
tree | 21c65d797062531517c0833c6655d77ba9427e8d /erts | |
parent | 336489820c3d3ea89813d9cfd1e0cb667d3a7707 (diff) | |
download | otp-955cd62970391b40123f2b9dee3bb3380233c17e.tar.gz otp-955cd62970391b40123f2b9dee3bb3380233c17e.tar.bz2 otp-955cd62970391b40123f2b9dee3bb3380233c17e.zip |
erts: Update lttng-wrapper with mfa conversion
Diffstat (limited to 'erts')
-rw-r--r-- | erts/emulator/beam/lttng-wrapper.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/erts/emulator/beam/lttng-wrapper.h b/erts/emulator/beam/lttng-wrapper.h index 8362dc555e..294872c365 100644 --- a/erts/emulator/beam/lttng-wrapper.h +++ b/erts/emulator/beam/lttng-wrapper.h @@ -29,6 +29,7 @@ #define LTTNG_BUFFER_SZ (256) #define LTTNG_PROC_BUFFER_SZ (16) #define LTTNG_PORT_BUFFER_SZ (20) +#define LTTNG_MFA_BUFFER_SZ (256) #define lttng_decl_procbuf(Name) \ char Name[LTTNG_PROC_BUFFER_SZ] @@ -36,6 +37,12 @@ #define lttng_decl_portbuf(Name) \ char Name[LTTNG_PORT_BUFFER_SZ] +#define lttng_decl_mfabuf(Name) \ + char Name[LTTNG_MFA_BUFFER_SZ] + +#define lttng_decl_carrier_stats(Name) \ + lttng_carrier_stats_t Name##_STATSTRUCT, *Name = &Name##_STATSTRUCT + #define lttng_pid_to_str(pid, name) \ erts_snprintf(name, LTTNG_PROC_BUFFER_SZ, "%T", (pid)) @@ -48,6 +55,23 @@ #define lttng_port_to_str(p, name) \ lttng_portid_to_str(((p) ? (p)->common.id : ERTS_INVALID_PORT), name) +#define lttng_mfa_to_str(m,f,a, Name) \ + erts_snprintf(Name, LTTNG_MFA_BUFFER_SZ, "%T:%T/%lu", (Eterm)(m), (Eterm)(f), (Uint)(a)) + +#define lttng_proc_to_mfa_str(p, Name) \ + do { \ + if (ERTS_PROC_IS_EXITING((p))) { \ + strcpy(Name, "<exiting>"); \ + } else { \ + BeamInstr *_fptr = find_function_from_pc((p)->i); \ + if (_fptr) { \ + lttng_mfa_to_str(_fptr[0],_fptr[1],_fptr[2], Name); \ + } else { \ + strcpy(Name, "<unknown>"); \ + } \ + } \ + } while(0) + /* ErtsRunQueue->ErtsSchedulerData->Uint */ #define lttng_rq_to_id(RQ) \ (RQ)->scheduler->no |