git/trace2
Teng Long 35ae40ead3 tr2: shows scope unconditionally in addition to key-value pair
When we specify GIT_TRACE2_CONFIG_PARAMS or trace2.configparams,
trace2 will prints "interesting" config values to log. Sometimes,
when a config set in multiple scope files, the following output
looks like (the irrelevant fields are omitted here as "..."):

...| def_param    |  ...  | core.multipackindex:false
...| def_param    |  ...  | core.multipackindex:false
...| def_param    |  ...  | core.multipackindex:false

As the log shows, even each config in different scope is dumped, but
we don't know which scope it comes from. Therefore, it's better to
add the scope names as well to make them be more recognizable. For
example, when execute:

    $ GIT_TRACE2_PERF=1 \
    > GIT_TRACE2_CONFIG_PARAMS=core.multipackIndex \
    > git rev-list --test-bitmap HEAD"

The following is the ouput (the irrelevant fields are omitted here
as "..."):

Format normal:
... git.c:461 ... def_param scope:system core.multipackindex=false
... git.c:461 ... def_param scope:global core.multipackindex=false
... git.c:461 ... def_param scope:local core.multipackindex=false

Format perf:

... | def_param    | ... | scope:system | core.multipackindex:false
... | def_param    | ... | scope:global | core.multipackindex:false
... | def_param    | ... | scope:local  | core.multipackindex:false

Format event:

{"event":"def_param", ... ,"scope":"system","param":"core.multipackindex","value":"false"}
{"event":"def_param", ... ,"scope":"global","param":"core.multipackindex","value":"false"}
{"event":"def_param", ... ,"scope":"local","param":"core.multipackindex","value":"false"}

Signed-off-by: Teng Long <dyroneteng@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-08-11 21:05:00 -07:00
..
tr2_cfg.c
tr2_cfg.h
tr2_cmd_name.c
tr2_cmd_name.h
tr2_dst.c trace2: disable tr2_dst before warning on write errors 2021-11-18 22:38:15 -08:00
tr2_dst.h
tr2_sid.c
tr2_sid.h
tr2_sysenv.c
tr2_sysenv.h
tr2_tbuf.c
tr2_tbuf.h
tr2_tgt.h
tr2_tgt_event.c tr2: shows scope unconditionally in addition to key-value pair 2022-08-11 21:05:00 -07:00
tr2_tgt_normal.c tr2: shows scope unconditionally in addition to key-value pair 2022-08-11 21:05:00 -07:00
tr2_tgt_perf.c tr2: shows scope unconditionally in addition to key-value pair 2022-08-11 21:05:00 -07:00
tr2_tls.c
tr2_tls.h