On Mon, Jul 11 2022, Teng Long wrote: > 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"} This seems sensible on its face, but... > Signed-off-by: Teng Long <dyroneteng@xxxxxxxxx> > --- > trace2/tr2_tgt_event.c | 3 +++ > trace2/tr2_tgt_normal.c | 5 ++++- > trace2/tr2_tgt_perf.c | 9 +++++++-- > 3 files changed, 14 insertions(+), 3 deletions(-) ... we really should update Documentation/technical/api-trace2.txt here too. It does say "..." currently, so we're not lying there, but since we now add "scope" unconditionally...