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 94955 a93b99783b8c80955114a96209212b556eae8188
parent 94954 4a6a021e38cab64c8910ac4fa39ae81e9b484a9a
child 94956 be00c204c58283c7551039c47d699b83195145d6
push id886
push userlsblakk@mozilla.com
push dateMon, 04 Jun 2012 19:57:52 +0000
treeherdermozilla-beta@bbd8d5efd6d1 [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: