diff --git a/toolkit/components/telemetry/Telemetry.cpp b/toolkit/components/telemetry/Telemetry.cpp index bf0ffcd838f..4ea3425668e 100644 --- a/toolkit/components/telemetry/Telemetry.cpp +++ b/toolkit/components/telemetry/Telemetry.cpp @@ -2245,8 +2245,19 @@ GetStackAndModules(const std::vector& aPCs) #ifdef MOZ_ENABLE_PROFILER_SPS for (unsigned i = 0, n = rawModules.GetSize(); i != n; ++i) { const SharedLibrary &info = rawModules.GetEntry(i); + const std::string &name = info.GetName(); + std::string basename = name; +#ifdef XP_MACOSX + // FIXME: We want to use just the basename as the libname, but the + // current profiler addon needs the full path name, so we compute the + // basename in here. + size_t pos = name.rfind('/'); + if (pos != std::string::npos) { + basename = name.substr(pos + 1); + } +#endif ProcessedStack::Module module = { - info.GetName(), + basename, info.GetBreakpadId() }; Ret.AddModule(module);