aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_alloc_util.h
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-08-14 18:20:51 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-04-06 17:23:55 +0200
commitce5d152cd863b68dcc2b5c7a566d1e5e1a5c5dab (patch)
tree9703bd180d952b099011b9d10398fd2dc7ca398d /erts/emulator/beam/erl_alloc_util.h
parent955cd62970391b40123f2b9dee3bb3380233c17e (diff)
downloadotp-ce5d152cd863b68dcc2b5c7a566d1e5e1a5c5dab.tar.gz
otp-ce5d152cd863b68dcc2b5c7a566d1e5e1a5c5dab.tar.bz2
otp-ce5d152cd863b68dcc2b5c7a566d1e5e1a5c5dab.zip
erts: Add lttng tracepoints for memory carriers
* carrier_create * carrier_destroy * carrier_pool_put * carrier_pool_get
Diffstat (limited to 'erts/emulator/beam/erl_alloc_util.h')
-rw-r--r--erts/emulator/beam/erl_alloc_util.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_alloc_util.h b/erts/emulator/beam/erl_alloc_util.h
index b7d717ed23..afdff1a71e 100644
--- a/erts/emulator/beam/erl_alloc_util.h
+++ b/erts/emulator/beam/erl_alloc_util.h
@@ -30,6 +30,7 @@
#endif
#include "erl_mseg.h"
+#include "lttng-wrapper.h"
#define ERTS_AU_PREF_ALLOC_BITS 11
#define ERTS_AU_MAX_PREF_ALLOC_INSTANCES (1 << ERTS_AU_PREF_ALLOC_BITS)
@@ -417,6 +418,18 @@ typedef struct {
} blocks;
} CarriersStats_t;
+#ifdef USE_LTTNG_VM_TRACEPOINTS
+#define LTTNG_CARRIER_STATS_TO_LTTNG_STATS(CSP, LSP) \
+ do { \
+ (LSP)->carriers.size = (CSP)->curr.norm.mseg.size \
+ + (CSP)->curr.norm.sys_alloc.size; \
+ (LSP)->carriers.no = (CSP)->curr.norm.mseg.no \
+ + (CSP)->curr.norm.sys_alloc.no; \
+ (LSP)->blocks.size = (CSP)->blocks.curr.size; \
+ (LSP)->blocks.no = (CSP)->blocks.curr.no; \
+ } while (0)
+#endif
+
#ifdef ERTS_SMP
typedef union ErtsAllctrDDBlock_t_ ErtsAllctrDDBlock_t;