perfview icon indicating copy to clipboard operation
perfview copied to clipboard

Verbosity Level Not Shown in the commandLine Property of the PerfView/CommandLineParameters

Open mrsharm opened this issue 3 years ago • 1 comments

This seems like a bug where despite adding the /ClrEventLevel:Verbose to collect a trace with all CLR Verbose events via perfview using a command such as:

PerfView start /AcceptEULA /NoGUI /Merge:true /zip:false /sessionName:e9a042b3-a75e-47f6-813f-afc5cf323f52 /GCCollectOnly /ClrEventLevel:Verbose /LogFile:C:\\V8\\heapcount_1\verbose.txt /DataFile:C:\\V8\\heapcount_1\verbose.etl

the PerfView/CommandLineParameters event doesn't mention this additional detail:

Event Name                      Time MSecProcess Name    commandLine                                                                                                                                                                                                                                                               Rest  
PerfView/CommandLineParameters  1,735.222PerfView (27240) "/DataFile:C:\V8\heapcount_1\verbose.etl" /BufferSizeMB:256 /StackCompression /KernelEvents:Process /ClrEvents:GC /NoGui /SessionName:fd0f4705-d616-4faa-bcdb-c0c196777e5f /LogFile:"C:\V8\heapcount_1\verbose.txt" /NoRundown /NoNGenRundown /Merge:True /GCCollectOnly      
PerfView/CommandLineParameters208,645.495PerfView (20216) "/DataFile:C:\V8\heapcount_1\verbose.etl" /BufferSizeMB:256 /StackCompression /KernelEvents:Process /ClrEvents:GC /NoGui /SessionName:fd0f4705-d616-4faa-bcdb-c0c196777e5f /LogFile:"C:\V8\heapcount_1\verbose.txt" /NoRundown /NoNGenRundown /Merge:True /GCCollectOnly      
PerfView/CommandLineParameters214,751.470PerfView (20216) "/DataFile:C:\V8\heapcount_1\verbose.etl" /BufferSizeMB:256 /StackCompression /KernelEvents:Process /ClrEvents:GC /NoGui /SessionName:fd0f4705-d616-4faa-bcdb-c0c196777e5f /LogFile:"C:\V8\heapcount_1\verbose.txt" /NoRundown /NoNGenRundown /Merge:True /GCCollectOnly      

The expected behavior is to be able to observe what verbosity level is being passed in for ClrEvents as the issue here is that the non-verbose commandline parameters are the same and thereby could be a point of confusion to those who rely on the event to decide what type of trace is captured.

Verbose CLR events not specified:

Event Name                      Time MSecProcess Name    commandLine                                                                                                                                                                                                                                                                                                 Rest  
PerfView/CommandLineParameters    531.885PerfView (19496) "/DataFile:C:\\V8\\heapcount_1\gc.etl" /BufferSizeMB:256 /StackCompression /KernelEvents:Process /ClrEventLevel:Informational /ClrEvents:GC /NoGui /SessionName:161f9269-73bf-49b0-8f48-cb53204a15d2 /LogFile:"C:\\V8\\heapcount_1\gc.txt" /NoRundown /NoNGenRundown /Merge:True /Zip:False /GCCollectOnly      
PerfView/CommandLineParameters205,659.995PerfView (7856) "/DataFile:C:\\V8\\heapcount_1\gc.etl" /BufferSizeMB:256 /StackCompression /KernelEvents:Process /ClrEventLevel:Informational /ClrEvents:GC /NoGui /SessionName:161f9269-73bf-49b0-8f48-cb53204a15d2 /LogFile:"C:\\V8\\heapcount_1\gc.txt" /NoRundown /NoNGenRundown /Merge:True /Zip:False /GCCollectOnly      
PerfView/CommandLineParameters210,603.619PerfView (7856) "/DataFile:C:\\V8\\heapcount_1\gc.etl" /BufferSizeMB:256 /StackCompression /KernelEvents:Process /ClrEventLevel:Informational /ClrEvents:GC /NoGui /SessionName:161f9269-73bf-49b0-8f48-cb53204a15d2 /LogFile:"C:\\V8\\heapcount_1\gc.txt" /NoRundown /NoNGenRundown /Merge:True /Zip:False /GCCollectOnly      

CC: @Maoni0

mrsharm avatar Sep 01 '22 07:09 mrsharm

@mrsharm, apologies for the delay on this. The reason that this happens is because Verbose is considered to be the default value for /ClrEventLevel. The expectation is that if the value is the default value, then it won't get shown, though I'm sure there are cases where that doesn't happen. The code responsible for this is at https://github.com/microsoft/perfview/blob/main/src/PerfView/CommandProcessor.cs#L2930.

brianrob avatar Oct 27 '22 21:10 brianrob