-
Notifications
You must be signed in to change notification settings - Fork 717
Commit
These are experimental features. We shall allow callers to decide whether to turn them on or off until we can refactor the implmenetations out to form decoupled classses.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,6 +41,13 @@ public SampleProfilerThreadTimeComputer(TraceLog eventLog, SymbolReader symbolRe | |
/// If set we compute thread time using Tasks | ||
/// </summary> | ||
public bool UseTasks; | ||
|
||
/// <summary> | ||
/// Track additional info on like EventName or so. | ||
/// Default to true to keep backward compatibility. | ||
/// </summary> | ||
public bool TrackAdditionalInfo = true; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
xiaomi7732
Author
Member
|
||
|
||
/// <summary> | ||
/// Use start-stop activities as the grouping construct. | ||
/// </summary> | ||
|
@@ -202,17 +209,20 @@ public void GenerateThreadTimeStacks(MutableTraceEventStackSource outputStackSou | |
|
||
StackSourceCallStackIndex stackIndex = GetCallStack(data, thread); | ||
|
||
// Tack on additional info about the event. | ||
var fieldNames = data.PayloadNames; | ||
for (int i = 0; i < fieldNames.Length; i++) | ||
// Tack on additional info about the event. | ||
if (TrackAdditionalInfo) | ||
{ | ||
var fieldName = fieldNames[i]; | ||
var value = data.PayloadString(i); | ||
var fieldNodeName = "EventData: " + fieldName + "=" + value; | ||
var fieldNodeIndex = m_outputStackSource.Interner.FrameIntern(fieldNodeName); | ||
stackIndex = m_outputStackSource.Interner.CallStackIntern(fieldNodeIndex, stackIndex); | ||
var fieldNames = data.PayloadNames; | ||
for (int i = 0; i < fieldNames.Length; i++) | ||
{ | ||
var fieldName = fieldNames[i]; | ||
var value = data.PayloadString(i); | ||
var fieldNodeName = "EventData: " + fieldName + "=" + value; | ||
var fieldNodeIndex = m_outputStackSource.Interner.FrameIntern(fieldNodeName); | ||
stackIndex = m_outputStackSource.Interner.CallStackIntern(fieldNodeIndex, stackIndex); | ||
} | ||
stackIndex = m_outputStackSource.Interner.CallStackIntern(m_outputStackSource.Interner.FrameIntern("EventName: " + data.ProviderName + "/" + data.EventName), stackIndex); | ||
} | ||
stackIndex = m_outputStackSource.Interner.CallStackIntern(m_outputStackSource.Interner.FrameIntern("EventName: " + data.ProviderName + "/" + data.EventName), stackIndex); | ||
|
||
m_threadState[(int)thread.ThreadIndex].LogThreadStack(data.TimeStampRelativeMSec, stackIndex, thread, this, false); | ||
}; | ||
|
💡 you can use this to mark experimental code: