[PATCH 2/2] mingw: fix mingw_open_append to work with named pipes

2018-09-07 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler Signed-off-by: Jeff Hostetler --- compat/mingw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compat/mingw.c b/compat/mingw.c index 858ca14a57..ef03bbe5d2 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -355,7 +355,7 @@ static int

[PATCH 1/2] t0051: test GIT_TRACE to a windows named pipe

2018-09-07 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler Create a test-tool helper to create the server side of a windows named pipe, wait for a client connection, and copy data written to the pipe to stdout. Create t0051 test to route GIT_TRACE output of a command to a named pipe using the above test-tool helper. Signed-off-by:

[PATCH 0/2] Fixup for js/mingw-o-append

2018-09-07 Thread Jeff Hostetler via GitGitGadget
The recent change mingw O_APPEND change breaks writing to named pipes on Windows. The first commit adds a new test to confirm the breakage and the second commit fixes the problem. These could be squashed together or we can just keep the fix and omit the test if that would be better. d641097589

[PATCH v2 2/2] mingw: fix mingw_open_append to work with named pipes

2018-09-10 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler Signed-off-by: Jeff Hostetler --- compat/mingw.c| 38 --- t/t0051-windows-named-pipe.sh | 2 +- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/compat/mingw.c b/compat/mingw.c index 858ca14a57..f87376b26a

[PATCH v2 0/2] Fixup for js/mingw-o-append

2018-09-10 Thread Jeff Hostetler via GitGitGadget
The recent change mingw O_APPEND change breaks writing to named pipes on Windows. The first commit adds a new test to confirm the breakage and the second commit fixes the problem. These could be squashed together or we can just keep the fix and omit the test if that would be better. d641097589

[PATCH v2 1/2] t0051: test GIT_TRACE to a windows named pipe

2018-09-10 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler Create a test-tool helper to create the server side of a windows named pipe, wait for a client connection, and copy data written to the pipe to stdout. Create t0051 test to route GIT_TRACE output of a command to a named pipe using the above test-tool helper. Signed-off-by:

[PATCH 7/8] trace2: demonstrate setting sub-command parameter in checkout

2018-08-31 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler Add trace2_param() events in checkout to report whether the command is switching branches or just checking out a file. Signed-off-by: Jeff Hostetler --- builtin/checkout.c | 5 + 1 file changed, 5 insertions(+) diff --git a/builtin/checkout.c b/builtin/checkout.c

[PATCH 4/8] trace2: demonstrate trace2 child process classification

2018-08-31 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler Classify editory, pager, and sub-process child processes. The former two can be used to identify interactive commands, for example. Signed-off-by: Jeff Hostetler --- editor.c | 1 + pager.c | 1 + sub-process.c | 1 + 3 files changed, 3 insertions(+) diff

[PATCH 1/8] trace2: create new combined trace facility

2018-08-31 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler Create trace2 API allowing event-based tracing. This will hopefully eventually replace the existing trace API. Create GIT_TR2 trace-key to replace GIT_TRACE, GIT_TR2_PERFORMANCE to replace GIT_TRACE_PERFORMANCE, and a new trace-key GIT_TR2_EVENT to generate JSON data for

[PATCH 5/8] trace2: demonstrate instrumenting do_read_index

2018-08-31 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler Signed-off-by: Jeff Hostetler --- read-cache.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/read-cache.c b/read-cache.c index 7b1354d759..7a31ac4da8 100644 --- a/read-cache.c +++ b/read-cache.c @@ -1867,6 +1867,8 @@ static void tweak_split_index(struct

[PATCH 0/8] WIP: trace2: a new trace facility

2018-08-31 Thread Jeff Hostetler via GitGitGadget
This patch series contains a new trace2 facility that hopefully addresses the recent trace- and structured-logging-related discussions. The intent is to eventually replace the existing trace_ routines (or to route them to the new trace2_ routines) as time permits. This draft adds new trace2_

[PATCH 6/8] trace2: demonstrate instrumenting threaded preload_index

2018-08-31 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler Add trace2_region_enter() and _leave() around the entire preload_index() call. Also add thread-specific events in the preload_thread() threadproc. Signed-off-by: Jeff Hostetler --- preload-index.c | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PATCH 3/8] trace2: demonstrate trace2 regions in wt-status

2018-08-31 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler Add trace2_region_enter() and trace2_region_leave() calls around the various phases of a status scan. This gives elapsed time for each phase in the GIT_TR2_PERFORMANCE trace target. Signed-off-by: Jeff Hostetler --- wt-status.c | 14 -- 1 file changed, 12

[PATCH 2/8] trace2: add trace2 to main

2018-08-31 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler Signed-off-by: Jeff Hostetler --- compat/mingw.h| 3 +-- git-compat-util.h | 7 +++ git.c | 9 - repository.c | 2 ++ run-command.c | 8 +++- run-command.h | 5 + usage.c | 5 + 7 files changed, 35

[PATCH 8/8] trace2: demonstrate use of regions in read_directory_recursive

2018-08-31 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler Add trace2_region_enter() and _leave() calls inside read_directory_recursive() to show nesting and per-level timing. TODO Drop this commit or ifdef the calls. It generates too much data to be in the production version. It is included in this patch series for illustration

[PATCH v3 2/2] mingw: fix mingw_open_append to work with named pipes

2018-09-11 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler Signed-off-by: Jeff Hostetler --- compat/mingw.c| 36 --- t/t0051-windows-named-pipe.sh | 2 +- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/compat/mingw.c b/compat/mingw.c index 858ca14a57..18caf21969

[PATCH v3 0/2] Fixup for js/mingw-o-append

2018-09-11 Thread Jeff Hostetler via GitGitGadget
The recent change mingw O_APPEND change breaks writing to named pipes on Windows. The first commit adds a new test to confirm the breakage and the second commit fixes the problem. These could be squashed together or we can just keep the fix and omit the test if that would be better. d641097589

[PATCH v3 1/2] t0051: test GIT_TRACE to a windows named pipe

2018-09-11 Thread Jeff Hostetler via GitGitGadget
From: Jeff Hostetler Create a test-tool helper to create the server side of a windows named pipe, wait for a client connection, and copy data written to the pipe to stdout. Create t0051 test to route GIT_TRACE output of a command to a named pipe using the above test-tool helper. Signed-off-by: