Bug 1322471 - Report the true thread name for content process threads in the profile, and add a processType field. r?BenWa
MozReview-Commit-ID: 52Eb3Rks9mE
--- a/tools/profiler/core/ThreadProfile.cpp
+++ b/tools/profiler/core/ThreadProfile.cpp
@@ -103,31 +103,20 @@ void ThreadProfile::StreamJSON(Spliceabl
mUniqueStacks.reset();
}
void ThreadProfile::StreamSamplesAndMarkers(SpliceableJSONWriter& aWriter, double aSinceTime,
UniqueStacks& aUniqueStacks)
{
#ifndef SPS_STANDALONE
- // Thread meta data
- if (XRE_GetProcessType() == GeckoProcessType_Plugin) {
- // TODO Add the proper plugin name
- aWriter.StringProperty("name", "Plugin");
- } else if (XRE_GetProcessType() == GeckoProcessType_Content) {
- // This isn't going to really help once we have multiple content
- // processes, but it'll do for now.
- aWriter.StringProperty("name", "Content");
- } else {
- aWriter.StringProperty("name", Name());
- }
-#else
- aWriter.StringProperty("name", Name());
+ aWriter.StringProperty("processType", XRE_ChildProcessTypeToString(XRE_GetProcessType()));
#endif
+ aWriter.StringProperty("name", Name());
aWriter.IntProperty("tid", static_cast<int>(mThreadId));
aWriter.StartObjectProperty("samples");
{
{
JSONSchemaWriter schema(aWriter);
schema.WriteField("stack");
schema.WriteField("time");