locked
How do you use Marks in Xperf? RRS feed

  • Question

  • Hi all

    Xperf -help mark isn't all that helpful.  I've seen an Xperf trace that has a "Marks" category included in the output - specifically for Explorer start events ...

    ExplorerStartup
    ExplorerStartMsgLoop
    ExplorerDesktopReady
    ExplorerStartMenuReady

    How do you achieve this sort of logging?

    Thanks

    MrR
    Saturday, March 28, 2009 7:05 AM

Answers

  • Hi MrR,

    It appears marks can be added to an active trace by manually executing xperf -m "WhateverYouWant", and at the time you execute that command, that string will appear in the Marks section of the output.

    I just ran a simple test with the following commands, and got the string following -m to appear in the Marks section...
    xperf -on diageasy
    xperf -m "This is a test of marks"
    xperf -stop
    xperf \kernel.etl
    Sunday, March 29, 2009 3:05 AM

All replies

  • Hi MrR,

    It appears marks can be added to an active trace by manually executing xperf -m "WhateverYouWant", and at the time you execute that command, that string will appear in the Marks section of the output.

    I just ran a simple test with the following commands, and got the string following -m to appear in the Marks section...
    xperf -on diageasy
    xperf -m "This is a test of marks"
    xperf -stop
    xperf \kernel.etl
    Sunday, March 29, 2009 3:05 AM
  • Thanks.  Interesting thing about the example I was talking about is that the marks signify explorer start events and they were automated.  I'm trying to figure out how you'd automate Marks in this way - obviously xbootmgr as opposed to xperf.

    Cheers

    MrR
    Sunday, March 29, 2009 6:01 AM
  • Do you think the mark addtions were automated, or perhaps done directly by explorer?  It looks like ntdll!EtwSetMark is not documented, but it appears to just call NtEventTrace with a "flags" value of 6.  Maybe explorer is calling the function?
    Sunday, March 29, 2009 7:30 AM
  • OK this looks like an XP thing. If you run xbootmgr -trace boot -numruns 1 -postbootdelay 120 -traceflags BASE+CSWITCH+DISK_IO_INIT under XP, you get the Marks I was talking about. Under Vista or Windows 7 - not there. MrR
    Monday, March 30, 2009 1:18 AM