diff options
author | John Högberg <[email protected]> | 2018-03-27 06:58:10 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2018-03-27 06:58:10 +0200 |
commit | e176b62e96e4452443b5be347fb7b97a561c5b3b (patch) | |
tree | 38c923cf88cec72eb3e43e380bbaefde4160abdb /lib/kernel/src | |
parent | bebf113ecd2d6a27808fc952e1f14db78515efb3 (diff) | |
parent | 06ed628dfd013010dd6e182508c1137b9f4ba09b (diff) | |
download | otp-e176b62e96e4452443b5be347fb7b97a561c5b3b.tar.gz otp-e176b62e96e4452443b5be347fb7b97a561c5b3b.tar.bz2 otp-e176b62e96e4452443b5be347fb7b97a561c5b3b.zip |
Merge pull request #1760 from jhogberg/john/erts/any-term-as-seq_trace-label/OTP-14899
Lift the type restrictions on seq_trace token labels
Diffstat (limited to 'lib/kernel/src')
-rw-r--r-- | lib/kernel/src/dist_util.erl | 2 | ||||
-rw-r--r-- | lib/kernel/src/seq_trace.erl | 6 |
2 files changed, 3 insertions, 5 deletions
diff --git a/lib/kernel/src/dist_util.erl b/lib/kernel/src/dist_util.erl index f7a84c14b4..781397e1ee 100644 --- a/lib/kernel/src/dist_util.erl +++ b/lib/kernel/src/dist_util.erl @@ -113,6 +113,8 @@ dflag2str(?DFLAG_BIG_CREATION) -> "BIG_CREATION"; dflag2str(?DFLAG_SEND_SENDER) -> "SEND_SENDER"; +dflag2str(?DFLAG_BIG_SEQTRACE_LABELS) -> + "BIG_SEQTRACE_LABELS"; dflag2str(_) -> "UNKNOWN". diff --git a/lib/kernel/src/seq_trace.erl b/lib/kernel/src/seq_trace.erl index cc0c10909b..8d7aba0f27 100644 --- a/lib/kernel/src/seq_trace.erl +++ b/lib/kernel/src/seq_trace.erl @@ -41,7 +41,7 @@ -type flag() :: 'send' | 'receive' | 'print' | 'timestamp' | 'monotonic_timestamp' | 'strict_monotonic_timestamp'. -type component() :: 'label' | 'serial' | flag(). --type value() :: (Integer :: non_neg_integer()) +-type value() :: (Label :: term()) | {Previous :: non_neg_integer(), Current :: non_neg_integer()} | (Bool :: boolean()). @@ -59,10 +59,6 @@ set_token({Flags,Label,Serial,_From,Lastcnt}) -> F = decode_flags(Flags), set_token2([{label,Label},{serial,{Lastcnt, Serial}} | F]). -%% We limit the label type to always be a small integer because erl_interface -%% expects that, the BIF can however "unofficially" handle atoms as well, and -%% atoms can be used if only Erlang nodes are involved - -spec set_token(Component, Val) -> {Component, OldVal} when Component :: component(), Val :: value(), |