Bug 719536 - Expose shared library offsets for proper symbolication. r=jmuizelaar
authorBenoit Girard <b56girard@gmail.com>
Fri, 13 Apr 2012 16:33:53 -0400
changeset 91642 a93b99783b8c
parent 91641 4a6a021e38ca
child 91643 be00c204c582
push id22465
push usermak77@bonardo.net
push dateSat, 14 Apr 2012 11:58:29 +0000
treeherdermozilla-central@6880c195054f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmuizelaar
bugs719536
milestone14.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 719536 - Expose shared library offsets for proper symbolication. r=jmuizelaar
tools/profiler/nsProfiler.cpp
tools/profiler/shared-libraries.h
--- a/tools/profiler/nsProfiler.cpp
+++ b/tools/profiler/nsProfiler.cpp
@@ -90,16 +90,17 @@ nsProfiler::GetProfile(char **aProfile)
 }
 
 static void
 AddSharedLibraryInfoToStream(std::ostream& aStream, SharedLibrary& aLib)
 {
   aStream << "{";
   aStream << "\"start\":" << aLib.GetStart();
   aStream << ",\"end\":" << aLib.GetEnd();
+  aStream << ",\"offset\":" << aLib.GetOffset();
   aStream << ",\"name\":\"" << aLib.GetName() << "\"";
 #ifdef XP_WIN
   aStream << ",\"pdbSignature\":\"" << aLib.GetPdbSignature().ToString() << "\"";
   aStream << ",\"pdbAge\":" << aLib.GetPdbAge();
   aStream << ",\"pdbName\":\"" << aLib.GetPdbName() << "\"";
 #endif
   aStream << "}";
 }
--- a/tools/profiler/shared-libraries.h
+++ b/tools/profiler/shared-libraries.h
@@ -128,16 +128,17 @@ public:
     mPdbName = NULL;
 #endif
     free(mName);
     mName = NULL;
   }
 
   uintptr_t GetStart() const { return mStart; }
   uintptr_t GetEnd() const { return mEnd; }
+  uintptr_t GetOffset() const { return mOffset; }
 #ifdef XP_WIN
   nsID GetPdbSignature() const { return mPdbSignature; }
   uint32_t GetPdbAge() const { return mPdbAge; }
   char* GetPdbName() const { return mPdbName; }
 #endif
   char* GetName() const { return mName; }
 
 private: