gecko-dev/mozglue/baseprofiler/core
Gerald Squelart 8ff93952a4 Bug 1737058 - Empty MOZ_PROFILER_SHUTDOWN in child processes, so they don't needlessly and dangerously write their profile to the same file - r=canaltinova
The user shouldn't set MOZ_PROFILER_SHUTDOWN to an empty string, it wouldn't work anyway.
So now there is an extra check for that, to avoid even attempting to write a profile when there is no actual filename.

Thanks to this, the parent process can now just re-set MOZ_PROFILER_SHUTDOWN to "" in its children, so that they won't try to output their own profile into the same file. (This used to mostly work, because the parent process was the last to write its profile; but anecdotal data shows this may not alwaybe be true.)

As a bonus optimization, this means that child processes don't waste time needlessly saving their profile to disk.

Differential Revision: https://phabricator.services.mozilla.com/D129237
2021-10-22 08:41:27 +00:00
..
vtune
EHABIStackWalk.cpp
EHABIStackWalk.h
PageInformation.cpp
PageInformation.h
PlatformMacros.h
ProfileBuffer.cpp
ProfileBuffer.h
ProfileBufferEntry.cpp
ProfileBufferEntry.h
ProfileJSONWriter.cpp
ProfiledThreadData.cpp
ProfiledThreadData.h
ProfilerBacktrace.cpp
ProfilerBacktrace.h
ProfilerMarkers.cpp
ProfilerUtils.cpp
ProfilingCategory.cpp
ProfilingStack.cpp
RegisteredThread.cpp
RegisteredThread.h
ThreadInfo.h
VTuneProfiler.cpp
VTuneProfiler.h
platform-linux-android.cpp
platform-macos.cpp
platform-win32.cpp
platform.cpp
platform.h
shared-libraries-linux.cc
shared-libraries-macos.cc
shared-libraries-win32.cc