git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / Atom feed
From: "Jeff Hostetler via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>
Subject: [PATCH v3 0/7] trace2: clean up formatting in perf target format
Date: Fri, 09 Aug 2019 08:00:52 -0700 (PDT)
Message-ID: <pull.298.v3.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.298.v2.git.gitgitgadget@gmail.com>

V2 of this patch series cleans up some whitespace and column alignment
issues in the trace2 perf and normal formats. It also removes some dead
code.

Jeff Hostetler (7):
  trace2: cleanup column alignment in perf target format
  trace2: trim whitespace in region messages in perf target format
  trace2: remove dead code in maybe_add_string_va()
  trace2: trim trailing whitespace in normal format error message
  quote: add sq_append_quote_argv_pretty()
  trace2: cleanup whitespace in normal format
  trace2: cleanup whitespace in perf format

 quote.c                 | 18 ++++++++-
 quote.h                 |  1 +
 t/t0211-trace2-perf.sh  |  4 +-
 trace2/tr2_tgt_event.c  |  5 ---
 trace2/tr2_tgt_normal.c | 35 ++++++++--------
 trace2/tr2_tgt_perf.c   | 89 +++++++++++++++++++++++++++--------------
 6 files changed, 97 insertions(+), 55 deletions(-)


base-commit: 026dd738a6e5f1e42ef0f390feacb5ed6acc4ee8
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-298%2Fjeffhostetler%2Fupstream-2230-cleanup-v3
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-298/jeffhostetler/upstream-2230-cleanup-v3
Pull-Request: https://github.com/gitgitgadget/git/pull/298

Range-diff vs v2:

 1:  38b53da31f = 1:  38b53da31f trace2: cleanup column alignment in perf target format
 2:  db35099712 = 2:  db35099712 trace2: trim whitespace in region messages in perf target format
 3:  09dff12a7d = 3:  09dff12a7d trace2: remove dead code in maybe_add_string_va()
 4:  d5b5a70c1b = 4:  d5b5a70c1b trace2: trim trailing whitespace in normal format error message
 5:  5059776248 < -:  ---------- quote: add sq_quote_argv_pretty_ltrim
 -:  ---------- > 5:  2002108a30 quote: add sq_append_quote_argv_pretty()
 6:  bb64bb2513 ! 6:  d02a0608d7 trace2: cleanup whitespace in normal format
     @@ -2,7 +2,7 @@
      
          trace2: cleanup whitespace in normal format
      
     -    Make use of new sq_quote_argv_pretty_ltrim() to normalize
     +    Make use of new sq_append_quote_argv_pretty() to normalize
          how we handle leading whitespace in normal format messages.
      
          Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
     @@ -15,7 +15,7 @@
       
       	strbuf_addstr(&buf_payload, "start ");
      -	sq_quote_argv_pretty(&buf_payload, argv);
     -+	sq_quote_argv_pretty_ltrim(&buf_payload, argv);
     ++	sq_append_quote_argv_pretty(&buf_payload, argv);
       	normal_io_write_fl(file, line, &buf_payload);
       	strbuf_release(&buf_payload);
       }
     @@ -26,7 +26,7 @@
      -	strbuf_addf(&buf_payload, "alias %s ->", alias);
      -	sq_quote_argv_pretty(&buf_payload, argv);
      +	strbuf_addf(&buf_payload, "alias %s -> ", alias);
     -+	sq_quote_argv_pretty_ltrim(&buf_payload, argv);
     ++	sq_append_quote_argv_pretty(&buf_payload, argv);
       	normal_io_write_fl(file, line, &buf_payload);
       	strbuf_release(&buf_payload);
       }
     @@ -38,7 +38,8 @@
      +	strbuf_addf(&buf_payload, "child_start[%d]", cmd->trace2_child_id);
       
       	if (cmd->dir) {
     - 		strbuf_addstr(&buf_payload, " cd");
     +-		strbuf_addstr(&buf_payload, " cd");
     ++		strbuf_addstr(&buf_payload, " cd ");
       		sq_quote_buf_pretty(&buf_payload, cmd->dir);
      -		strbuf_addstr(&buf_payload, "; ");
      +		strbuf_addstr(&buf_payload, ";");
     @@ -54,7 +55,7 @@
      -		strbuf_addstr(&buf_payload, "git");
      -	sq_quote_argv_pretty(&buf_payload, cmd->argv);
      +		strbuf_addstr(&buf_payload, "git ");
     -+	sq_quote_argv_pretty_ltrim(&buf_payload, cmd->argv);
     ++	sq_append_quote_argv_pretty(&buf_payload, cmd->argv);
       
       	normal_io_write_fl(file, line, &buf_payload);
       	strbuf_release(&buf_payload);
     @@ -68,7 +69,7 @@
      -	sq_quote_argv_pretty(&buf_payload, argv);
      +		strbuf_addch(&buf_payload, ' ');
      +	}
     -+	sq_quote_argv_pretty_ltrim(&buf_payload, argv);
     ++	sq_append_quote_argv_pretty(&buf_payload, argv);
       	normal_io_write_fl(file, line, &buf_payload);
       	strbuf_release(&buf_payload);
       }
 7:  a6e5e7c70b ! 7:  9ab7393985 trace2: cleanup whitespace in perf format
     @@ -2,7 +2,7 @@
      
          trace2: cleanup whitespace in perf format
      
     -    Make use of new sq_quote_argv_pretty_ltrim() to normalize
     +    Make use of new sq_append_quote_argv_pretty() to normalize
          how we handle leading whitespace in perf format messages.
      
          Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
     @@ -33,7 +33,7 @@
       	struct strbuf buf_payload = STRBUF_INIT;
       
      -	sq_quote_argv_pretty(&buf_payload, argv);
     -+	sq_quote_argv_pretty_ltrim(&buf_payload, argv);
     ++	sq_append_quote_argv_pretty(&buf_payload, argv);
       
       	perf_io_write_fl(file, line, event_name, NULL, &us_elapsed_absolute,
       			 NULL, NULL, &buf_payload);
     @@ -44,7 +44,7 @@
      -	strbuf_addf(&buf_payload, "alias:%s argv:", alias);
      -	sq_quote_argv_pretty(&buf_payload, argv);
      +	strbuf_addf(&buf_payload, "alias:%s argv:[", alias);
     -+	sq_quote_argv_pretty_ltrim(&buf_payload, argv);
     ++	sq_append_quote_argv_pretty(&buf_payload, argv);
      +	strbuf_addch(&buf_payload, ']');
       
       	perf_io_write_fl(file, line, event_name, NULL, NULL, NULL, NULL,
     @@ -63,7 +63,7 @@
      +		if (cmd->argv[0])
      +			strbuf_addch(&buf_payload, ' ');
      +	}
     -+	sq_quote_argv_pretty_ltrim(&buf_payload, cmd->argv);
     ++	sq_append_quote_argv_pretty(&buf_payload, cmd->argv);
      +	strbuf_addch(&buf_payload, ']');
       
       	perf_io_write_fl(file, line, event_name, NULL, &us_elapsed_absolute,
     @@ -82,7 +82,7 @@
      +		if (argv[0])
      +			strbuf_addch(&buf_payload, ' ');
      +	}
     -+	sq_quote_argv_pretty_ltrim(&buf_payload, argv);
     ++	sq_append_quote_argv_pretty(&buf_payload, argv);
      +	strbuf_addch(&buf_payload, ']');
       
       	perf_io_write_fl(file, line, event_name, NULL, &us_elapsed_absolute,

-- 
gitgitgadget

  parent reply	other threads:[~2019-08-09 15:00 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-31 20:04 [PATCH 0/3] " Jeff Hostetler via GitGitGadget
2019-07-31 20:04 ` [PATCH 1/3] trace2: cleanup column alignment " Jeff Hostetler via GitGitGadget
2019-07-31 20:04 ` [PATCH 2/3] trace2: trim whitespace in start message " Jeff Hostetler via GitGitGadget
2019-08-01 21:34   ` Junio C Hamano
2019-08-07 20:25     ` Jeff Hostetler
2019-08-07 20:37       ` Junio C Hamano
2019-07-31 20:04 ` [PATCH 3/3] trace2: trim whitespace in region messages " Jeff Hostetler via GitGitGadget
2019-08-01 22:57 ` [PATCH 0/3] trace2: clean up formatting " Josh Steadmon
2019-08-08 14:18 ` [PATCH v2 0/7] " Jeff Hostetler via GitGitGadget
2019-08-08 14:18   ` [PATCH v2 1/7] trace2: cleanup column alignment " Jeff Hostetler via GitGitGadget
2019-08-08 14:19   ` [PATCH v2 2/7] trace2: trim whitespace in region messages " Jeff Hostetler via GitGitGadget
2019-08-08 14:19   ` [PATCH v2 3/7] trace2: remove dead code in maybe_add_string_va() Jeff Hostetler via GitGitGadget
2019-08-08 14:19   ` [PATCH v2 4/7] trace2: trim trailing whitespace in normal format error message Jeff Hostetler via GitGitGadget
2019-08-08 14:19   ` [PATCH v2 5/7] quote: add sq_quote_argv_pretty_ltrim Jeff Hostetler via GitGitGadget
2019-08-08 18:05     ` Junio C Hamano
2019-08-08 19:04       ` Jeff Hostetler
2019-08-08 20:01         ` Junio C Hamano
2019-08-08 22:49         ` René Scharfe
2019-08-09 17:13           ` Jeff Hostetler
2019-08-09 18:01             ` René Scharfe
2019-08-08 14:19   ` [PATCH v2 6/7] trace2: cleanup whitespace in normal format Jeff Hostetler via GitGitGadget
2019-08-08 14:19   ` [PATCH v2 7/7] trace2: cleanup whitespace in perf format Jeff Hostetler via GitGitGadget
2019-08-09 15:00   ` Jeff Hostetler via GitGitGadget [this message]
2019-08-09 15:00     ` [PATCH v3 2/7] trace2: trim whitespace in region messages in perf target format Jeff Hostetler via GitGitGadget
2019-08-09 15:00     ` [PATCH v3 1/7] trace2: cleanup column alignment " Jeff Hostetler via GitGitGadget
2019-08-09 15:00     ` [PATCH v3 3/7] trace2: remove dead code in maybe_add_string_va() Jeff Hostetler via GitGitGadget
2019-08-09 15:00     ` [PATCH v3 4/7] trace2: trim trailing whitespace in normal format error message Jeff Hostetler via GitGitGadget
2019-08-09 15:00     ` [PATCH v3 5/7] quote: add sq_append_quote_argv_pretty() Jeff Hostetler via GitGitGadget
2019-08-09 17:54       ` Junio C Hamano
2019-08-09 18:17         ` Jeff Hostetler
2019-08-09 15:00     ` [PATCH v3 6/7] trace2: cleanup whitespace in normal format Jeff Hostetler via GitGitGadget
2019-08-09 15:00     ` [PATCH v3 7/7] trace2: cleanup whitespace in perf format Jeff Hostetler via GitGitGadget
2019-08-09 18:14     ` [PATCH v3 0/7] trace2: clean up formatting in perf target format Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=pull.298.v3.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for the project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git