The TRACE_LINK_IDS macro
We would like to be able to make two event IDs identical; so,
e.g. we can do something like the following:
TRACE_EVENT_ASYNC_BEGIN0("cat", "an_async_event", "0x1000");
TRACE_EVENT_LINK_IDS("cat", "a_link_event", "0x1000", "0x2000");
TRACE_EVENT_ASYNC_END("cat", "an_async_event", "0x2000");
This was done in https://codereview.chromium.org/2142023003. But,
in that patch, I misused the "bind_id" field in the
implementation of the macro to avoid introducing a new field.
That field overwriting caused some confusions because "bind_id"
was introduced for flow events.
This patch fixes the "bind_id" misusage. Also, it makes sure that
the TRACE_ID_LOCAL and TRACE_ID_GLOBAL macros that were
introduced in https://codereview.chromium.org/2253973003 work
properly when nested inside the TRACE_LINK_IDS macro.
For more context about why the TRACE_LINK_IDS was introduced in
the first place:
https://docs.google.com/document/d/1s0DKjNJk85hDuRp5IqujwZvPML-MPsyAtDeksMwBw7s
BUG=catapult:#2465
Review-Url: https://codereview.chromium.org/2381083003
Cr-Commit-Position: refs/heads/master@{#425069}
CrOS-Libchrome-Original-Commit: ecfbdf571cc36bc1f9282032a27177d482202580
4 files changed