locked
logman -ct option RRS feed

  • Question

  • Hi,

    I cannot find any good information of what -ct option for "logman create trace" command is about:

     -ct <perf|system|cycle>       Event Trace Session clock type.

    Can you please explain perf, system and cycle values?

    Thanks a lot!


    Martin Kulov
    www.kulov.net

    VSTS MVP, MCT, MCSD, MCPD, INETA Speaker
    Monday, October 5, 2009 11:22 PM

Answers

  • The same information can be found in the "tracelog" documentation, which is a similar tool available in the WDK:
    http://msdn.microsoft.com/en-us/library/dd852200.aspx

    Cycle
    Uses the processor frequency (also called "CPU ticks") to measure the time of each trace message. This timer provides the highest possible resolution, but it is so sensitive that it is prone to error, especially on power-managed systems and multiprocessor computers. Instead, PerfCounter is recommended for high-resolution tracing.

    PerfCounter
    Records the value of the high-resolution performance counter clock, rather than lower-resolution system time, with each trace message. Because the performance counter clock counts in approximately 100-nanosecond units, it provides a unique time stamp for each event.
    SystemTime
    Records the system time, rather than the high-resolution performance counter clock time, with each trace message. Because the system timer has a resolution of 10 milliseconds (compared to 100 nanoseconds for the performance counter clock), multiple events can have the same system time.

    Kevin
    • Proposed as answer by Kevin Woley Monday, November 9, 2009 9:13 PM
    • Marked as answer by Martin Kulov Tuesday, November 10, 2009 12:43 AM
    Monday, November 9, 2009 9:12 PM

All replies

  • I think the answer lies in the xperf documentation:

    "Clock Type: Each logging session can use one of three different clocks to provide Event Timestamps.  The primary difference between the three is in resolution and expense to retrieve.  The three types are Cycle (CPU Cycle Resolution), PerfCounter (Performance Frequency resolution, which could be 100 nanosecond or better), SystemTime (10 millisecond resolution).  If you intend to merge multiple logs the same clock must be used for all logs.  Currently, PerfCounter is the default clock type for Vista and later operating systems; SystemTime was the default in pre-Vista operating systems.  We strongly recommend all performance traces are taken with PerfCounter. "

    If I understand correcly this is the time when a sample is collected from the system:

    Cycle - on every cpu cycle we have a sample traced
    SystemTime - on every clock tick we have a sample traced
    PerfCounter - (when this one gets a sample?)

    Thank you!
    Martin Kulov
    www.kulov.net

    VSTS MVP, MCT, MCSD, MCPD, INETA Speaker
    • Proposed as answer by Kevin Woley Monday, November 9, 2009 9:13 PM
    Wednesday, October 7, 2009 1:35 AM
  • The same information can be found in the "tracelog" documentation, which is a similar tool available in the WDK:
    http://msdn.microsoft.com/en-us/library/dd852200.aspx

    Cycle
    Uses the processor frequency (also called "CPU ticks") to measure the time of each trace message. This timer provides the highest possible resolution, but it is so sensitive that it is prone to error, especially on power-managed systems and multiprocessor computers. Instead, PerfCounter is recommended for high-resolution tracing.

    PerfCounter
    Records the value of the high-resolution performance counter clock, rather than lower-resolution system time, with each trace message. Because the performance counter clock counts in approximately 100-nanosecond units, it provides a unique time stamp for each event.
    SystemTime
    Records the system time, rather than the high-resolution performance counter clock time, with each trace message. Because the system timer has a resolution of 10 milliseconds (compared to 100 nanoseconds for the performance counter clock), multiple events can have the same system time.

    Kevin
    • Proposed as answer by Kevin Woley Monday, November 9, 2009 9:13 PM
    • Marked as answer by Martin Kulov Tuesday, November 10, 2009 12:43 AM
    Monday, November 9, 2009 9:12 PM