Re: [PATCH v1 00/25] RFC: structured logging

Subsystems: the rest

2 messages, 2 authors, 2018-08-28 · open the first message on its own page

Re: [PATCH v1 00/25] RFC: structured logging

From: Junio C Hamano <hidden>
Date: 2018-08-28 17:38:59

git@jeffhostetler.com writes:
From: Jeff Hostetler <redacted>

This RFC patch series adds structured logging to git.  The motivation,
...

Jeff Hostetler (25):
  structured-logging: design document
  structured-logging: add STRUCTURED_LOGGING=1 to Makefile
  structured-logging: add structured logging framework
  structured-logging: add session-id to log events
  structured-logging: set sub_command field for branch command
  structured-logging: set sub_command field for checkout command
  structured-logging: t0420 basic tests
  structured-logging: add detail-event facility
  structured-logging: add detail-event for lazy_init_name_hash
  structured-logging: add timer facility
  structured-logging: add timer around do_read_index
  structured-logging: add timer around do_write_index
  structured-logging: add timer around wt-status functions
  structured-logging: add timer around preload_index
  structured-logging: t0420 tests for timers
  structured-logging: add aux-data facility
  structured-logging: add aux-data for index size
  structured-logging: add aux-data for size of sparse-checkout file
  structured-logging: t0420 tests for aux-data
  structured-logging: add structured logging to remote-curl
  structured-logging: add detail-events for child processes
  structured-logging: add child process classification
  structured-logging: t0420 tests for child process detail events
  structured-logging: t0420 tests for interacitve child_summary
  structured-logging: add config data facility

I noticed that Travis job has been failing with a trivially fixable
failure, so I'll push out today's 'pu' with the attached applied on
top.  This may become unapplicable to the code when issues raised in
recent reviews addressed, though.

 structured-logging.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/structured-logging.c b/structured-logging.c
index 0e3f79ee48..78abcd2e59 100644
--- a/structured-logging.c
+++ b/structured-logging.c
@@ -593,8 +593,7 @@ void slog_set_command_name(const char *command_name)
 	 * the cmd_<command>() and/or it may be too early to force a
 	 * lazy load.
 	 */
-	if (my__command_name)
-		free(my__command_name);
+	free(my__command_name);
 	my__command_name = xstrdup(command_name);
 }
 
@@ -606,8 +605,7 @@ void slog_set_sub_command_name(const char *sub_command_name)
 	 * the cmd_<command>() and/or it may be too early to force a
 	 * lazy load.
 	 */
-	if (my__sub_command_name)
-		free(my__sub_command_name);
+	free(my__sub_command_name);
 	my__sub_command_name = xstrdup(sub_command_name);
 }
 
-- 
2.19.0-rc0-48-gb9dfa238d5

Re: [PATCH v1 00/25] RFC: structured logging

From: Jeff Hostetler <hidden>
Date: 2018-08-28 18:47:18


On 8/28/2018 1:38 PM, Junio C Hamano wrote:
quoted hunk
git@jeffhostetler.com writes:
quoted
From: Jeff Hostetler <redacted>

This RFC patch series adds structured logging to git.  The motivation,
...

Jeff Hostetler (25):
   structured-logging: design document
   structured-logging: add STRUCTURED_LOGGING=1 to Makefile
   structured-logging: add structured logging framework
   structured-logging: add session-id to log events
   structured-logging: set sub_command field for branch command
   structured-logging: set sub_command field for checkout command
   structured-logging: t0420 basic tests
   structured-logging: add detail-event facility
   structured-logging: add detail-event for lazy_init_name_hash
   structured-logging: add timer facility
   structured-logging: add timer around do_read_index
   structured-logging: add timer around do_write_index
   structured-logging: add timer around wt-status functions
   structured-logging: add timer around preload_index
   structured-logging: t0420 tests for timers
   structured-logging: add aux-data facility
   structured-logging: add aux-data for index size
   structured-logging: add aux-data for size of sparse-checkout file
   structured-logging: t0420 tests for aux-data
   structured-logging: add structured logging to remote-curl
   structured-logging: add detail-events for child processes
   structured-logging: add child process classification
   structured-logging: t0420 tests for child process detail events
   structured-logging: t0420 tests for interacitve child_summary
   structured-logging: add config data facility

I noticed that Travis job has been failing with a trivially fixable
failure, so I'll push out today's 'pu' with the attached applied on
top.  This may become unapplicable to the code when issues raised in
recent reviews addressed, though.

  structured-logging.c | 6 ++----
  1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/structured-logging.c b/structured-logging.c
index 0e3f79ee48..78abcd2e59 100644
--- a/structured-logging.c
+++ b/structured-logging.c
@@ -593,8 +593,7 @@ void slog_set_command_name(const char *command_name)
  	 * the cmd_<command>() and/or it may be too early to force a
  	 * lazy load.
  	 */
-	if (my__command_name)
-		free(my__command_name);
+	free(my__command_name);
  	my__command_name = xstrdup(command_name);
  }
  
@@ -606,8 +605,7 @@ void slog_set_sub_command_name(const char *sub_command_name)
  	 * the cmd_<command>() and/or it may be too early to force a
  	 * lazy load.
  	 */
-	if (my__sub_command_name)
-		free(my__sub_command_name);
+	free(my__sub_command_name);
  	my__sub_command_name = xstrdup(sub_command_name);
  }
  
Sorry about that.

Let me withdraw the current series.  I'm working on a new version that
addresses the comments on the mailing list.  It combines my logging
with a variation on the nested perf logging that Duy suggested and
the consolidation that you were talking about last week.

Jeff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help