diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /tools/profiler/public/ProfilerControl.h | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | tools/profiler/public/ProfilerControl.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/profiler/public/ProfilerControl.h b/tools/profiler/public/ProfilerControl.h index 466d15eb69..ac145fac00 100644 --- a/tools/profiler/public/ProfilerControl.h +++ b/tools/profiler/public/ProfilerControl.h @@ -40,6 +40,8 @@ static inline void profiler_init(void* stackTop) {} static inline void profiler_shutdown( IsFastShutdown aIsFastShutdown = IsFastShutdown::No) {} +static inline void profiler_lookup_download_directory() {} + #else // !MOZ_GECKO_PROFILER # include "BaseProfiler.h" @@ -123,6 +125,18 @@ void profiler_ensure_started( const char** aFilters, uint32_t aFilterCount, uint64_t aActiveTabID, const mozilla::Maybe<double>& aDuration = mozilla::Nothing()); +// Tell the profiler to look up the download directory for writing profiles. +// With some features, such as signal control, we need to know the location of +// a directory where we can save profiles to disk. Because we start the +// profiler before we start the directory service, we can't access the +// download directory at profiler startup. Similarly, when we need to get the +// directory, we often can't, as we're running in non-main-thread contexts +// that don't have access to the directory service. This function gives us a +// third option, by giving us a hook to look for the download directory when +// the time is right. This might be triggered internally (e.g. when we start +// profiling), or externally, e.g. after the directory service is initialised. +void profiler_lookup_download_directory(); + //--------------------------------------------------------------------------- // Control the profiler //--------------------------------------------------------------------------- |