Skip to contentSkip to conversation

A couple of fixes for the Trace2 documentation

PATCH Superseded Johannes Schindelin via GitGitGadget 4 participants 19 messages Mar 10, 2022 – May 3, 2022 Documentation

lore
Share & tools
lore
#0 lore raw

cover A couple of fixes for the Trace2 documentation

While verifying a suggestion for a contributor before sending it, I noticed that the Trace2 documentation contained an incorrect example. Looking around, I found a couple other things I wanted to fix, so here are the patches.

Johannes Schindelin (4):
trace2 docs: a couple of grammar fixes trace2 docs: surround more terms in backticks trace2 docs: fix a JSON formatted example trace2 docs: clarify what varargs is all about

 Documentation/technical/api-trace2.txt | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

base-commit: 1a4874565fa3b6668042216189551b98b4dc0b1b
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1172%2Fdscho%2Ffix-trace2-docs-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1172/dscho/fix-trace2-docs-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1172

Signature · 1 line
gitgitgadget
#1 lore raw

PATCH 1/4 trace2 docs: a couple of grammar fixes

From: Johannes Schindelin <[email protected]>

---
 Documentation/technical/api-trace2.txt | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
Documentation/technical/api-trace2.txt +7 -7
index bb13ca3db8b..77216eff622 100644
@@ -24,7 +24,7 @@ for example.
 
 Trace2 is controlled using `trace2.*` config values in the system and
 global config files and `GIT_TRACE2*` environment variables.  Trace2 does
-not read from repo local or worktree config files or respect `-c`
+not read from repo local or worktree config files nor does it respect `-c`
 command line config settings.
 
 == Trace2 Targets
@@ -34,8 +34,8 @@ Format details are given in a later section.
 
 === The Normal Format Target
 
-The normal format target is a tradition printf format and similar
-to GIT_TRACE format.  This format is enabled with the `GIT_TRACE2`
+The normal format target is a traditional printf format and similar
+to the GIT_TRACE format.  This format is enabled with the `GIT_TRACE2`
 environment variable or the `trace2.normalTarget` system or global
 config setting.
 
@@ -635,7 +635,7 @@ process may be a shell script which doesn't have a session-id.)
 +
 This event is generated after the child is started in the background
 and given a little time to boot up and start working.  If the child
-startups normally and while the parent is still waiting, the "ready"
+starts up normally while the parent is still waiting, the "ready"
 field will have the value "ready".
 If the child is too slow to start and the parent times out, the field
 will have the value "timeout".
@@ -949,7 +949,7 @@ atexit elapsed:3.868970 code:0
 
 Regions::
 
-	Regions can be use to time an interesting section of code.
+	Regions can be used to time an interesting section of code.
 +
 ----------------
 void wt_status_collect(struct wt_status *s)
@@ -1103,9 +1103,9 @@ Thread Events::
 
 	Thread messages added to a thread-proc.
 +
-For example, the multithreaded preload-index code can be
+For example, the multi-threaded preload-index code can be
 instrumented with a region around the thread pool and then
-per-thread start and exit events within the threadproc.
+per-thread start and exit events within the thread-proc.
 +
 ----------------
 static void *preload_thread(void *_data)
Signature · 1 line
gitgitgadget
#2 lore raw

Re: [PATCH 1/4] trace2 docs: a couple of grammar fixes

Quoted 12 lines · Johannes Schindelin via GitGitGadget

From: Johannes Schindelin <[email protected]>

---
 Documentation/technical/api-trace2.txt | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
Documentation/technical/api-trace2.txt +0 -0
index bb13ca3db8b..77216eff622 100644

Documentation/technical/api-trace2.txt for example. · line 27

Quoted 5 lines
Documentation/technical/api-trace2.txt +1 -1
@@ -24,7 +24,7 @@ for example.
 
 Trace2 is controlled using `trace2.*` config values in the system and
 global config files and `GIT_TRACE2*` environment variables.  Trace2 does
-not read from repo local or worktree config files or respect `-c`
+not read from repo local or worktree config files nor does it respect `-c`

Perhaps adding a comma before "nor" would also be a good addition.

#3 lore raw

Re: [PATCH 1/4] trace2 docs: a couple of grammar fixes

Quoted 15 lines · Ævar Arnfjörð Bjarmason
Quoted 13 lines · Johannes Schindelin via GitGitGadget

From: Johannes Schindelin <[email protected]>

---
 Documentation/technical/api-trace2.txt | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
Documentation/technical/api-trace2.txt +0 -0
index bb13ca3db8b..77216eff622 100644
@@ -24,7 +24,7 @@ for example.
 
Quoted 6 lines

Documentation/technical/api-trace2.txt for example. · line 27

Quoted 4 lines
Documentation/technical/api-trace2.txt +1 -1
 Trace2 is controlled using `trace2.*` config values in the system and
 global config files and `GIT_TRACE2*` environment variables.  Trace2 does
-not read from repo local or worktree config files or respect `-c`
+not read from repo local or worktree config files nor does it respect `-c`

Perhaps adding a comma before "nor" would also be a good addition.

Yup, that sounds sensible. All other hunks looked good, too.

Thanks, both.

#4 lore raw

Re: [PATCH 1/4] trace2 docs: a couple of grammar fixes

In reply to Johannes Schindelin via GitGitGadget

"Johannes Schindelin via GitGitGadget" <[email protected]>

Documentation/technical/api-trace2.txt Format details are given in a later section. · line 38

Quoted 8 lines · writes:
Documentation/technical/api-trace2.txt +2 -2
@@ -34,8 +34,8 @@ Format details are given in a later section.
 
 === The Normal Format Target
 
-The normal format target is a tradition printf format and similar
-to GIT_TRACE format.  This format is enabled with the `GIT_TRACE2`
+The normal format target is a traditional printf format and similar
+to the GIT_TRACE format.  This format is enabled with the `GIT_TRACE2`

In the same spirit as [2/4] and match the part that [4/4] touches, this probably is better:

The normal format target is a traditional printf() format and similar to the GIT_TRACE format. This format is enabled with the GIT_TRACE2

#5 lore raw

PATCH 2/4 trace2 docs: surround more terms in backticks

In reply to Johannes Schindelin via GitGitGadget

From: Johannes Schindelin <[email protected]>

---
 Documentation/technical/api-trace2.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/technical/api-trace2.txt +2 -2
index 77216eff622..8ef921a4e4d 100644
@@ -70,7 +70,7 @@ $ cat ~/log.normal
 
 The performance format target (PERF) is a column-based format to
 replace GIT_TRACE_PERFORMANCE and is suitable for development and
-testing, possibly to complement tools like gprof.  This format is
+testing, possibly to complement tools like `gprof`.  This format is
 enabled with the `GIT_TRACE2_PERF` environment variable or the
 `trace2.perfTarget` system or global config setting.
 
@@ -172,7 +172,7 @@ take a `va_list` argument.
 Some functions have a `_printf_fl()` suffix to indicate that they also
 take a varargs argument.
 
-There are CPP wrapper macros and ifdefs to hide most of these details.
+There are CPP wrapper macros and `#ifdef`s to hide most of these details.
 See `trace2.h` for more details.  The following discussion will only
 describe the simplified forms.
 
Signature · 1 line
gitgitgadget
#6 lore raw

Re: [PATCH 2/4] trace2 docs: surround more terms in backticks

"Johannes Schindelin via GitGitGadget" <[email protected]>

Quoted 12 lines · writes:

From: Johannes Schindelin <[email protected]>

---
 Documentation/technical/api-trace2.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Documentation/technical/api-trace2.txt +0 -0
index 77216eff622..8ef921a4e4d 100644

Documentation/technical/api-trace2.txt $ cat ~/log.normal · line 72

Quoted 3 lines
Documentation/technical/api-trace2.txt +0 -0
@@ -70,7 +70,7 @@ $ cat ~/log.normal
 
 The performance format target (PERF) is a column-based format to
 replace GIT_TRACE_PERFORMANCE and is suitable for development and

GIT_TRACE_PERFORMANCE to match GIT_TRACE2_PERF we see below.

Quoted 13 lines
Documentation/technical/api-trace2.txt +2 -2
-testing, possibly to complement tools like gprof.  This format is
+testing, possibly to complement tools like `gprof`.  This format is
 enabled with the `GIT_TRACE2_PERF` environment variable or the
 `trace2.perfTarget` system or global config setting.
 
@@ -172,7 +172,7 @@ take a `va_list` argument.
 Some functions have a `_printf_fl()` suffix to indicate that they also
 take a varargs argument.
 
-There are CPP wrapper macros and ifdefs to hide most of these details.
+There are CPP wrapper macros and `#ifdef`s to hide most of these details.
 See `trace2.h` for more details.  The following discussion will only
 describe the simplified forms.
#7 lore raw

PATCH 3/4 trace2 docs: fix a JSON formatted example

In reply to Johannes Schindelin via GitGitGadget

From: Johannes Schindelin <[email protected]>

The example was not in valid JSON format due to a duplicate key "sid".

---
 Documentation/technical/api-trace2.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/technical/api-trace2.txt +1 -1
index 8ef921a4e4d..285f713ed84 100644
@@ -128,7 +128,7 @@ yields
 
 ------------
 $ cat ~/log.event
-{"event":"version","sid":"sid":"20190408T191610.507018Z-H9b68c35f-P000059a8","thread":"main","time":"2019-01-16T17:28:42.620713Z","file":"common-main.c","line":38,"evt":"3","exe":"2.20.1.155.g426c96fcdb"}
+{"event":"version","sid":"20190408T191610.507018Z-H9b68c35f-P000059a8","thread":"main","time":"2019-01-16T17:28:42.620713Z","file":"common-main.c","line":38,"evt":"3","exe":"2.20.1.155.g426c96fcdb"}
 {"event":"start","sid":"20190408T191610.507018Z-H9b68c35f-P000059a8","thread":"main","time":"2019-01-16T17:28:42.621027Z","file":"common-main.c","line":39,"t_abs":0.001173,"argv":["git","version"]}
 {"event":"cmd_name","sid":"20190408T191610.507018Z-H9b68c35f-P000059a8","thread":"main","time":"2019-01-16T17:28:42.621122Z","file":"git.c","line":432,"name":"version","hierarchy":"version"}
 {"event":"exit","sid":"20190408T191610.507018Z-H9b68c35f-P000059a8","thread":"main","time":"2019-01-16T17:28:42.621236Z","file":"git.c","line":662,"t_abs":0.001227,"code":0}
Signature · 1 line
gitgitgadget
#8 lore raw

PATCH 4/4 trace2 docs: clarify what `varargs` is all about

In reply to Johannes Schindelin via GitGitGadget

From: Johannes Schindelin <[email protected]>

---
 Documentation/technical/api-trace2.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/technical/api-trace2.txt +1 -1
index 285f713ed84..91985512867 100644
@@ -170,7 +170,7 @@ Some functions have a `_va_fl()` suffix to indicate that they also
 take a `va_list` argument.
 
 Some functions have a `_printf_fl()` suffix to indicate that they also
-take a varargs argument.
+take a `printf()` style format with a variable number of arguments.
 
 There are CPP wrapper macros and `#ifdef`s to hide most of these details.
 See `trace2.h` for more details.  The following discussion will only
Signature · 1 line
gitgitgadget
#9 lore raw

Re: [PATCH 4/4] trace2 docs: clarify what `varargs` is all about

Quoted 12 lines · Johannes Schindelin via GitGitGadget

From: Johannes Schindelin <[email protected]>

---
 Documentation/technical/api-trace2.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/technical/api-trace2.txt +0 -0
index 285f713ed84..91985512867 100644

Documentation/technical/api-trace2.txt Some functions have a `_va_fl()` suffix to indicate that they also · line 173

Quoted 5 lines
Documentation/technical/api-trace2.txt +1 -1
@@ -170,7 +170,7 @@ Some functions have a `_va_fl()` suffix to indicate that they also
 take a `va_list` argument.
 
 Some functions have a `_printf_fl()` suffix to indicate that they also
-take a varargs argument.
+take a `printf()` style format with a variable number of arguments.

This is correct, but I think better would be to explicitly describe the _printf_va_fl() suffix in this list, i.e. now that implicitly falls under _va_fl(), so it's *technically* redundant.

But either describing it explicitly, or saying that _printf_*_fl() are function that take a printf format before either a "va_args" or "..." would make the end-state a bit more obvious.

I wonder if the pre-image wanted to describe _printf_va_fl() (which would make it correct), and we just omitted a printf_fl() description.

#10 lore raw
In reply to Johannes Schindelin via GitGitGadget
Quoted 11 lines · Johannes Schindelin via GitGitGadget

While verifying a suggestion for a contributor before sending it, I noticed that the Trace2 documentation contained an incorrect example. Looking around, I found a couple other things I wanted to fix, so here are the patches.

Johannes Schindelin (4):
trace2 docs: a couple of grammar fixes trace2 docs: surround more terms in backticks trace2 docs: fix a JSON formatted example trace2 docs: clarify what varargs is all about

Quoted 9 lines
  Documentation/technical/api-trace2.txt | 22 +++++++++++-----------
  1 file changed, 11 insertions(+), 11 deletions(-)

base-commit: 1a4874565fa3b6668042216189551b98b4dc0b1b
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1172%2Fdscho%2Ffix-trace2-docs-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1172/dscho/fix-trace2-docs-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1172

LGTM

Thanks
Jeff

#11 lore raw

v2 cover A couple of fixes for the Trace2 documentation

In reply to Johannes Schindelin via GitGitGadget

While verifying a suggestion for a contributor before sending it, I noticed that the Trace2 documentation contained an incorrect example. Looking around, I found a couple other things I wanted to fix, so here are the patches.

Note: This patch series is not intended to be perfectionist. I just want the result to be good enough, and move on to more important things.

Changes since v1:

* Added an Oxford comma (at least I think it is a stylistic one, not a required one, but then, all three people involved in the discussion are non-native speakers, so there).
* Added a patch to use a consistent style for function names.
* I now surround even more terms in backticks.
* I spotted and fixed a missing full stop, too.

Johannes Schindelin (6):
trace2 docs: a couple of grammar fixes trace2 docs: "printf" is not an English word trace2 docs: surround more terms in backticks trace2 docs: fix a JSON formatted example trace2 docs: clarify what varargs is all about trace2 docs: add missing full stop

 Documentation/technical/api-trace2.txt | 44 +++++++++++++-------------
 1 file changed, 22 insertions(+), 22 deletions(-)

base-commit: 1a4874565fa3b6668042216189551b98b4dc0b1b
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1172%2Fdscho%2Ffix-trace2-docs-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1172/dscho/fix-trace2-docs-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/1172

Range-diff vs v1:

1: 07f7ee46232 ! 1: 3b944102ff2 trace2 docs: a couple of grammar fixes
@@ Documentation/technical/api-trace2.txt: for example.
Trace2 is controlled using trace2.* config values in the system and global config files and GIT_TRACE2* environment variables. Trace2 does
-not read from repo local or worktree config files or respect -c
-+not read from repo local or worktree config files nor does it respect -c
- command line config settings.
+-command line config settings.
++not read from repo local or worktree config files, nor does it respect ++-c command line config settings.

== Trace2 Targets
+
@@ Documentation/technical/api-trace2.txt: Format details are given in a later section.

=== The Normal Format Target

 -:  ----------- > 2:  3c1ca34927a trace2 docs: "printf" is not an English word
 2:  284c6a3df84 ! 3:  2ddd9ff4506 trace2 docs: surround more terms in backticks

@@ Commit message

## Documentation/technical/api-trace2.txt ##
+@@ Documentation/technical/api-trace2.txt: Format details are given in a later section.
+ === The Normal Format Target
+
+ The normal format target is a traditional printf() format and similar +-to the GIT_TRACE format. This format is enabled with the GIT_TRACE2 ++to the GIT_TRACE format. This format is enabled with the GIT_TRACE2
+ environment variable or the trace2.normalTarget system or global
+ config setting.
+
@@ Documentation/technical/api-trace2.txt: $ cat ~/log.normal
+ === The Performance Format Target

The performance format target (PERF) is a column-based format to
- replace GIT_TRACE_PERFORMANCE and is suitable for development and +-replace GIT_TRACE_PERFORMANCE and is suitable for development and -testing, possibly to complement tools like gprof. This format is
++replace GIT_TRACE_PERFORMANCE and is suitable for development and
+testing, possibly to complement tools like gprof. This format is
enabled with the GIT_TRACE2_PERF environment variable or the trace2.perfTarget system or global config setting.
@@ Documentation/technical/api-trace2.txt: take a va_list argument.
See trace2.h for more details. The following discussion will only describe the simplified forms.

+@@ Documentation/technical/api-trace2.txt: as each thread starts and allocates TLS storage.
+ There are a few issues to resolve before we can completely
+ switch to Trace2.
+
+-* Updating existing tests that assume GIT_TRACE format messages.
++* Updating existing tests that assume GIT_TRACE format messages.
+
+-* How to best handle custom GIT_TRACE_<key> messages?
++* How to best handle custom GIT_TRACE_<key> messages?
+
+-** The GIT_TRACE_<key> mechanism allows each <key> to write to a
++** The GIT_TRACE_<key> mechanism allows each <key> to write to a
+ different file (in addition to just stderr).
+
+ ** Do we want to maintain that ability or simply write to the existing

 3:  b893f6a7faf = 4:  1c5a7008382 trace2 docs: fix a JSON formatted example
 4:  2eecea50e51 = 5:  0c09fd000a6 trace2 docs: clarify what `varargs` is all about
 -:  ----------- > 6:  e1a94b0d1ae trace2 docs: add missing full stop
Signature · 1 line
gitgitgadget
#12 lore raw

PATCH v2 1/6 trace2 docs: a couple of grammar fixes

From: Johannes Schindelin <[email protected]>

---
 Documentation/technical/api-trace2.txt | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
Documentation/technical/api-trace2.txt +8 -8
index bb13ca3db8b..adf867e1013 100644
@@ -24,8 +24,8 @@ for example.
 
 Trace2 is controlled using `trace2.*` config values in the system and
 global config files and `GIT_TRACE2*` environment variables.  Trace2 does
-not read from repo local or worktree config files or respect `-c`
-command line config settings.
+not read from repo local or worktree config files, nor does it respect
+`-c` command line config settings.
 
 == Trace2 Targets
 
@@ -34,8 +34,8 @@ Format details are given in a later section.
 
 === The Normal Format Target
 
-The normal format target is a tradition printf format and similar
-to GIT_TRACE format.  This format is enabled with the `GIT_TRACE2`
+The normal format target is a traditional printf format and similar
+to the GIT_TRACE format.  This format is enabled with the `GIT_TRACE2`
 environment variable or the `trace2.normalTarget` system or global
 config setting.
 
@@ -635,7 +635,7 @@ process may be a shell script which doesn't have a session-id.)
 +
 This event is generated after the child is started in the background
 and given a little time to boot up and start working.  If the child
-startups normally and while the parent is still waiting, the "ready"
+starts up normally while the parent is still waiting, the "ready"
 field will have the value "ready".
 If the child is too slow to start and the parent times out, the field
 will have the value "timeout".
@@ -949,7 +949,7 @@ atexit elapsed:3.868970 code:0
 
 Regions::
 
-	Regions can be use to time an interesting section of code.
+	Regions can be used to time an interesting section of code.
 +
 ----------------
 void wt_status_collect(struct wt_status *s)
@@ -1103,9 +1103,9 @@ Thread Events::
 
 	Thread messages added to a thread-proc.
 +
-For example, the multithreaded preload-index code can be
+For example, the multi-threaded preload-index code can be
 instrumented with a region around the thread pool and then
-per-thread start and exit events within the threadproc.
+per-thread start and exit events within the thread-proc.
 +
 ----------------
 static void *preload_thread(void *_data)
Signature · 1 line
gitgitgadget
#13 lore raw

PATCH v2 2/6 trace2 docs: "printf" is not an English word

In reply to Johannes Schindelin via GitGitGadget

From: Johannes Schindelin <[email protected]>

We append an ellipsis and enclose it in backticks to indicate that it is a function elsewhere, let's also use that here.

While at it, ensure the same for waitpid().

---
 Documentation/technical/api-trace2.txt | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
Documentation/technical/api-trace2.txt +6 -6
index adf867e1013..1f1a06eabc6 100644
@@ -5,7 +5,7 @@ information to stderr or a file.  The Trace2 feature is inactive unless
 explicitly enabled by enabling one or more Trace2 Targets.
 
 The Trace2 API is intended to replace the existing (Trace1)
-printf-style tracing provided by the existing `GIT_TRACE` and
+`printf()`-style tracing provided by the existing `GIT_TRACE` and
 `GIT_TRACE_PERFORMANCE` facilities.  During initial implementation,
 Trace2 and Trace1 may operate in parallel.
 
@@ -34,7 +34,7 @@ Format details are given in a later section.
 
 === The Normal Format Target
 
-The normal format target is a traditional printf format and similar
+The normal format target is a traditional `printf()` format and similar
 to the GIT_TRACE format.  This format is enabled with the `GIT_TRACE2`
 environment variable or the `trace2.normalTarget` system or global
 config setting.
@@ -234,7 +234,7 @@ Events are written as lines of the form:
 	is the event name.
 
 `<event-message>`::
-	is a free-form printf message intended for human consumption.
+	is a free-form `printf()` message intended for human consumption.
 +
 Note that this may contain embedded LF or CRLF characters that are
 not escaped, so the event may spill across multiple lines.
@@ -300,7 +300,7 @@ This field is in anticipation of in-proc submodules in the future.
 	indicate a broad category, such as "index" or "status".
 
 `<perf-event-message>`::
-	is a free-form printf message intended for human consumption.
+	is a free-form `printf()` message intended for human consumption.
 
 ------------
 15:33:33.532712 wt-status.c:2310                  | d0 | main                     | region_enter | r1  |  0.126064 |           | status     | label:print
@@ -588,7 +588,7 @@ with "?".
 
 `"child_exit"`::
 	This event is generated after the current process has returned
-	from the waitpid() and collected the exit information from the
+	from the `waitpid()` and collected the exit information from the
 	child.
 +
 ------------
@@ -609,7 +609,7 @@ process may be a shell script which doesn't have a session-id.)
 +
 Note that the `t_rel` field contains the observed run time in seconds
 for the child process (starting before the fork/exec/spawn and
-stopping after the waitpid() and includes OS process creation overhead).
+stopping after the `waitpid()` and includes OS process creation overhead).
 So this time will be slightly larger than the atexit time reported by
 the child process itself.
 
Signature · 1 line
gitgitgadget
#14 lore raw

PATCH v2 3/6 trace2 docs: surround more terms in backticks

In reply to Johannes Schindelin via GitGitGadget

From: Johannes Schindelin <[email protected]>

---
 Documentation/technical/api-trace2.txt | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
Documentation/technical/api-trace2.txt +7 -7
index 1f1a06eabc6..e8a5d7c78d0 100644
@@ -35,7 +35,7 @@ Format details are given in a later section.
 === The Normal Format Target
 
 The normal format target is a traditional `printf()` format and similar
-to the GIT_TRACE format.  This format is enabled with the `GIT_TRACE2`
+to the `GIT_TRACE` format.  This format is enabled with the `GIT_TRACE2`
 environment variable or the `trace2.normalTarget` system or global
 config setting.
 
@@ -69,8 +69,8 @@ $ cat ~/log.normal
 === The Performance Format Target
 
 The performance format target (PERF) is a column-based format to
-replace GIT_TRACE_PERFORMANCE and is suitable for development and
-testing, possibly to complement tools like gprof.  This format is
+replace `GIT_TRACE_PERFORMANCE` and is suitable for development and
+testing, possibly to complement tools like `gprof`.  This format is
 enabled with the `GIT_TRACE2_PERF` environment variable or the
 `trace2.perfTarget` system or global config setting.
 
@@ -172,7 +172,7 @@ take a `va_list` argument.
 Some functions have a `_printf_fl()` suffix to indicate that they also
 take a varargs argument.
 
-There are CPP wrapper macros and ifdefs to hide most of these details.
+There are CPP wrapper macros and `#ifdef`s to hide most of these details.
 See `trace2.h` for more details.  The following discussion will only
 describe the simplified forms.
 
@@ -1214,11 +1214,11 @@ as each thread starts and allocates TLS storage.
 There are a few issues to resolve before we can completely
 switch to Trace2.
 
-* Updating existing tests that assume GIT_TRACE format messages.
+* Updating existing tests that assume `GIT_TRACE` format messages.
 
-* How to best handle custom GIT_TRACE_<key> messages?
+* How to best handle custom `GIT_TRACE_<key>` messages?
 
-** The GIT_TRACE_<key> mechanism allows each <key> to write to a
+** The `GIT_TRACE_<key>` mechanism allows each <key> to write to a
 different file (in addition to just stderr).
 
 ** Do we want to maintain that ability or simply write to the existing
Signature · 1 line
gitgitgadget
#15 lore raw

PATCH v2 4/6 trace2 docs: fix a JSON formatted example

In reply to Johannes Schindelin via GitGitGadget

From: Johannes Schindelin <[email protected]>

The example was not in valid JSON format due to a duplicate key "sid".

---
 Documentation/technical/api-trace2.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/technical/api-trace2.txt +1 -1
index e8a5d7c78d0..bf0f0750733 100644
@@ -128,7 +128,7 @@ yields
 
 ------------
 $ cat ~/log.event
-{"event":"version","sid":"sid":"20190408T191610.507018Z-H9b68c35f-P000059a8","thread":"main","time":"2019-01-16T17:28:42.620713Z","file":"common-main.c","line":38,"evt":"3","exe":"2.20.1.155.g426c96fcdb"}
+{"event":"version","sid":"20190408T191610.507018Z-H9b68c35f-P000059a8","thread":"main","time":"2019-01-16T17:28:42.620713Z","file":"common-main.c","line":38,"evt":"3","exe":"2.20.1.155.g426c96fcdb"}
 {"event":"start","sid":"20190408T191610.507018Z-H9b68c35f-P000059a8","thread":"main","time":"2019-01-16T17:28:42.621027Z","file":"common-main.c","line":39,"t_abs":0.001173,"argv":["git","version"]}
 {"event":"cmd_name","sid":"20190408T191610.507018Z-H9b68c35f-P000059a8","thread":"main","time":"2019-01-16T17:28:42.621122Z","file":"git.c","line":432,"name":"version","hierarchy":"version"}
 {"event":"exit","sid":"20190408T191610.507018Z-H9b68c35f-P000059a8","thread":"main","time":"2019-01-16T17:28:42.621236Z","file":"git.c","line":662,"t_abs":0.001227,"code":0}
Signature · 1 line
gitgitgadget
#16 lore raw

PATCH v2 5/6 trace2 docs: clarify what `varargs` is all about

In reply to Johannes Schindelin via GitGitGadget

From: Johannes Schindelin <[email protected]>

---
 Documentation/technical/api-trace2.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/technical/api-trace2.txt +1 -1
index bf0f0750733..05fa38cf651 100644
@@ -170,7 +170,7 @@ Some functions have a `_va_fl()` suffix to indicate that they also
 take a `va_list` argument.
 
 Some functions have a `_printf_fl()` suffix to indicate that they also
-take a varargs argument.
+take a `printf()` style format with a variable number of arguments.
 
 There are CPP wrapper macros and `#ifdef`s to hide most of these details.
 See `trace2.h` for more details.  The following discussion will only
Signature · 1 line
gitgitgadget
#17 lore raw

PATCH v2 6/6 trace2 docs: add missing full stop

In reply to Johannes Schindelin via GitGitGadget

From: Johannes Schindelin <[email protected]>

---
 Documentation/technical/api-trace2.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/technical/api-trace2.txt +1 -1
index 05fa38cf651..f4a8a690878 100644
@@ -533,7 +533,7 @@ these special values are used:
 ------------
 
 `"cmd_mode"`::
-	This event, when present, describes the command variant This
+	This event, when present, describes the command variant. This
 	event may be emitted more than once.
 +
 ------------
Signature · 1 line
gitgitgadget
#18 lore raw
In reply to Johannes Schindelin via GitGitGadget
Quoted 4 lines · Johannes Schindelin via GitGitGadget

While verifying a suggestion for a contributor before sending it, I noticed that the Trace2 documentation contained an incorrect example. Looking around, I found a couple other things I wanted to fix, so here are the patches.

Nice. Thanks for your attention to detail here.

Jeff