Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Experimental) Trace2 base plus GVFS extensions #28

Merged
merged 9 commits into from
Oct 10, 2018

Commits on Oct 9, 2018

  1. t0051: test GIT_TRACE to a windows named pipe

    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: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler committed Oct 9, 2018
    Configuration menu
    Copy the full SHA
    6b10ede View commit details
    Browse the repository at this point in the history
  2. mingw: fix mingw_open_append to work with named pipes

    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler committed Oct 9, 2018
    Configuration menu
    Copy the full SHA
    09379ff View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2018

  1. trace2: create new combined trace facility

    Create a new unified tracing facility for git.  The eventual intent is to
    replace the current trace_printf* and trace_performance* routines with a
    unified set of git_trace2* routines.
    
    In addition to the usual printf-style API, trace2 provides higer-level
    event verbs with fixed-fields allowing structured data to be written.
    This makes post-processing and analysis easier for external tools.
    
    Trace2 defines 3 output targets.  These are set using the environment
    variables "GIT_TR2", "GIT_TR2_PERF", and "GIT_TR2_EVENT".  These may be
    set to "1" or to an absolute pathname (just like the current GIT_TRACE).
    
    * GIT_TR2 is intended to be a replacement for GIT_TRACE and logs command
      summary data.
    
    * GIT_TR2_PERF is intended as a replacement for GIT_TRACE_PERFORMANCE.
      It extends the output with columns for the command process, thread,
      repo, absolute and relative elapsed times.  It reports events for
      child process start/stop, thread start/stop, and per-thread function
      nesting.
    
    * GIT_TR2_EVENT is a new structured format. It writes event data as a
      series of JSON records.
    
    Calls to trace2 functions log to any of the 3 output targets enabled
    without the need to call different trace_printf* or trace_performance*
    routines.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler committed Oct 10, 2018
    Configuration menu
    Copy the full SHA
    312ccaa View commit details
    Browse the repository at this point in the history
  2. trace2: add trace2 tracing of major regions in wt-status

    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_PERF and GIT_TR2_EVENT trace target.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler committed Oct 10, 2018
    Configuration menu
    Copy the full SHA
    e58b118 View commit details
    Browse the repository at this point in the history
  3. trace2: classify some child processes

    Classify editor, pager, and sub-process child processes.
    
    The former two can be used to identify interactive commands,
    for example.  A later effort could classify other types of
    commands, such as "gc", "hook", and etc.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler committed Oct 10, 2018
    Configuration menu
    Copy the full SHA
    85d1645 View commit details
    Browse the repository at this point in the history
  4. trace2: add child classification for transport processes

    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler committed Oct 10, 2018
    Configuration menu
    Copy the full SHA
    52036b9 View commit details
    Browse the repository at this point in the history
  5. trace2: instrument reading and writing the index

    Add trace2 events when reading and writing the index.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler committed Oct 10, 2018
    Configuration menu
    Copy the full SHA
    8b6e8e9 View commit details
    Browse the repository at this point in the history
  6. gvfs:trace2: add region/data events for status deserialization

    Add trace2 region and data events describing attempts to deserialize
    status data using a status cache.
    
    A category:status, label:deserialize region is pushed around the
    deserialize code.
    
    Deserialization results when reading from a file are:
        category:status, path   = <path>
        category:status, polled = <number_of_attempts>
        category:status, result = "ok" | "reject"
    
    When reading from STDIN are:
        category:status, path   = "STDIN"
        category:status, result = "ok" | "reject"
    
    Status will fallback and run a normal status scan when a "reject"
    is reported (unless "--deserialize-wait=fail").  If "ok" is reported,
    status was able to use the status cache and avoid scanning the workdir.
    
    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler committed Oct 10, 2018
    Configuration menu
    Copy the full SHA
    e0f95f3 View commit details
    Browse the repository at this point in the history
  7. gvfs:trace2: add trace2 tracing around read_object_process

    Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
    jeffhostetler committed Oct 10, 2018
    Configuration menu
    Copy the full SHA
    8645713 View commit details
    Browse the repository at this point in the history