diff options
author | Rickard Green <[email protected]> | 2016-02-02 10:17:05 +0100 |
---|---|---|
committer | Rickard Green <[email protected]> | 2016-02-02 10:17:05 +0100 |
commit | 178cff0a09223da707ca8472a71dbe4125466493 (patch) | |
tree | df849d4a871940a13ae53e28e6de25a030f54ffb /erts/emulator/beam/erl_trace.h | |
parent | 5dac3400b00e499cb7c436b6b71c510c718d92cf (diff) | |
parent | 3f33428db9aea0d767295322c4e882a5c6bbf7db (diff) | |
download | otp-178cff0a09223da707ca8472a71dbe4125466493.tar.gz otp-178cff0a09223da707ca8472a71dbe4125466493.tar.bz2 otp-178cff0a09223da707ca8472a71dbe4125466493.zip |
Merge branch 'rickard/monotonic-time-improvements/OTP-13222' into maint
* rickard/monotonic-time-improvements/OTP-13222:
Introduce time management in native APIs
Introduce time warp safe replacement for safe_fixed option
Introduce time warp safe trace timestamp formats
Diffstat (limited to 'erts/emulator/beam/erl_trace.h')
-rw-r--r-- | erts/emulator/beam/erl_trace.h | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_trace.h b/erts/emulator/beam/erl_trace.h index 7405490f76..a0058264d7 100644 --- a/erts/emulator/beam/erl_trace.h +++ b/erts/emulator/beam/erl_trace.h @@ -18,8 +18,38 @@ * %CopyrightEnd% */ +#ifndef ERL_TRACE_H__FLAGS__ +#define ERL_TRACE_H__FLAGS__ +/* + * NOTE! The bits used for these flags matter. The flag with + * the least significant bit will take precedence! + * + * The "now timestamp" has highest precedence due to + * compatibility reasons. + */ +#define ERTS_TRACE_FLG_NOW_TIMESTAMP (1 << 0) +#define ERTS_TRACE_FLG_STRICT_MONOTONIC_TIMESTAMP (1 << 1) +#define ERTS_TRACE_FLG_MONOTONIC_TIMESTAMP (1 << 2) + +/* + * The bits used effects trace flags (of processes and ports) + * as well as sequential trace flags. If changed make sure + * these arn't messed up... + */ +#define ERTS_TRACE_TS_TYPE_BITS 3 +#define ERTS_TRACE_TS_TYPE_MASK \ + ((1 << ERTS_TRACE_TS_TYPE_BITS) - 1) + +#define ERTS_TFLGS2TSTYPE(TFLGS) \ + ((int) (((TFLGS) >> ERTS_TRACE_FLAGS_TS_TYPE_SHIFT) \ + & ERTS_TRACE_TS_TYPE_MASK)) +#define ERTS_SEQTFLGS2TSTYPE(SEQTFLGS) \ + ((int) (((SEQTFLGS) >> ERTS_SEQ_TRACE_FLAGS_TS_TYPE_SHIFT) \ + & ERTS_TRACE_TS_TYPE_MASK)) + +#endif /* ERL_TRACE_H__FLAGS__ */ -#ifndef ERL_TRACE_H__ +#if !defined(ERL_TRACE_H__) && !defined(ERTS_ONLY_INCLUDE_TRACE_FLAGS) #define ERL_TRACE_H__ struct binary; |