Bug 1287392 - Part 7: Change definition of VPtr of TaskTracer. r=cyu
authorThinker K.F. Li <thinker@codemud.net>
Tue, 22 Nov 2016 00:14:00 +0800
changeset 323919 48d6e51b95ea59d4ee1e4e091c12ee2cef27b40a
parent 323918 01a2259e75ccb1132a4303fde2667340981eea2d
child 323920 df33b1b46ef3d0626361f6e8191ba0c0a29db64f
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
reviewerscyu
bugs1287392
milestone53.0a1
Bug 1287392 - Part 7: Change definition of VPtr of TaskTracer. r=cyu
tools/profiler/tasktracer/GeckoTaskTracer.cpp
--- a/tools/profiler/tasktracer/GeckoTaskTracer.cpp
+++ b/tools/profiler/tasktracer/GeckoTaskTracer.cpp
@@ -82,34 +82,34 @@ CreateSourceEvent(SourceEventType aType)
   uint64_t newId = GenNewUniqueTaskId();
   TraceInfo* info = GetOrCreateTraceInfo();
   ENSURE_TRUE_VOID(info);
 
   info->mCurTraceSourceId = newId;
   info->mCurTraceSourceType = aType;
   info->mCurTaskId = newId;
 
-  uintptr_t namePtr;
+  uintptr_t* namePtr;
 #define SOURCE_EVENT_NAME(type)         \
   case SourceEventType::type:           \
   {                                     \
-    namePtr = (uintptr_t)&CreateSourceEvent##type; \
+    namePtr = (uintptr_t*)&CreateSourceEvent##type; \
     break;                              \
   }
 
   switch (aType) {
 #include "SourceEventTypeMap.h"
     default:
       MOZ_CRASH("Unknown SourceEvent.");
   }
 #undef SOURCE_EVENT_NAME
 
   // Log a fake dispatch and start for this source event.
   LogDispatch(newId, newId, newId, aType);
-  LogVirtualTablePtr(newId, newId, &namePtr);
+  LogVirtualTablePtr(newId, newId, namePtr);
   LogBegin(newId, newId);
 }
 
 static void
 DestroySourceEvent()
 {
   // Log a fake end for this source event.
   TraceInfo* info = GetOrCreateTraceInfo();
@@ -345,17 +345,17 @@ LogVirtualTablePtr(uint64_t aTaskId, uin
   MutexAutoLock lock(info->mLogsMutex);
   // Log format:
   // [4 taskId address]
   nsCString* log = info->AppendLog();
   if (log) {
     // Since addr2line used by SPS addon can not solve non-function
     // addresses, we use the first entry of vtable as the symbol to
     // solve.  We should find a better solution later.
-    log->AppendPrintf("%d %lld %p", ACTION_GET_VTABLE, aTaskId, *aVptr);
+    log->AppendPrintf("%d %lld %p", ACTION_GET_VTABLE, aTaskId, aVptr);
   }
 }
 
 AutoSourceEvent::AutoSourceEvent(SourceEventType aType)
   : AutoSaveCurTraceInfo()
 {
   CreateSourceEvent(aType);
 }