How to use xperf in buffering mode to take last events RRS feed

  • Question

  • Hi

    I have not found good examples, how to use xperf in buffering mode (or something like that).

    I would want to record my last events to memory (circular buffer) continously. And sometimes (when problems occurs) i want to take "snapsot" from memory to etl-file. Then it is possible to see what has happened before problem was occured.

    By the way are there exist some another forums to ask that kind of question ? This forum seem to be almost dead sometimes. Difficult to got answers.

    Thursday, May 24, 2012 3:33 PM

All replies

  • Hi,

    I think one way which could help you is to use the Stack Walking function.

    So may you can start the deep trace closed before you know that you will see the issue.
    And then use the stack walk to hit the point.

    Best regards 


    Thursday, May 24, 2012 4:36 PM
  • Hi

    I already use stackwalk (xperf -on base -stackwalk Profile), but i think that is not main point.

    I would want to use only command line (from .bat-files). I would need two .bat-files (for example):

    - start_writing_to_circular_buffer.bat (This is started at the beginning of the tracing)

    - take_snapshot_from_circular_buffer_to_etl_file.bat (This is started many times: every time it is a need to take "snapshot")

    My software knows correct time for "snapshot", when it calls take_snapshot_from_circular_buffer_to_etl_file.bat.

    Friday, May 25, 2012 11:01 AM
  • Hi

    I think i did it :)

    Start bufferging (for kernel and user):

      xperf -on base -stackwalk Profile -minbuffers 16 -maxbuffers 1024 -flushtimer 0 -Buffering -start UserTrace -on My-Provider -minbuffers 16 -maxbuffers 1024 -flushtimer 0 -Buffering

    Take snapshot from buffers:

      xperf -flush -f kernel.etl

      xperf -flush UserTrace -f user.etl

    I was not so difficult, but i did not found good examples from documentation and net. So i had to try and test.

    Thursday, May 31, 2012 8:05 AM
  • Hi,

    I am struggling to buffer the trace under winxp, however the parameters work fine for win7.

    xperf.exe -on Diag -BufferSize 1024 -MinBuffers 32 -MaxBuffers 32 -ClockType PerfCounter -Buffering

    Is buffering mode not supported under winxp?

    Here the error I get under winXP SP3.

    xperf: error: NT Kernel Logger: The specified path is invalid. (0xa1).


    Thursday, January 8, 2015 5:42 PM