Bug 1329291 - Unbreak build on non-SPS platforms after
bug 1142197. r?froydnj
MozReview-Commit-ID: LIfC5mj8uzL
--- a/tools/profiler/moz.build
+++ b/tools/profiler/moz.build
@@ -8,17 +8,16 @@ if CONFIG['MOZ_ENABLE_PROFILER_SPS']:
XPIDL_MODULE = 'profiler'
XPIDL_SOURCES += [
'gecko/nsIProfiler.idl',
'gecko/nsIProfileSaveEvent.idl',
]
EXPORTS += [
'public/GeckoProfilerFunc.h',
'public/GeckoProfilerImpl.h',
- 'public/GeckoProfilerTypes.h',
'public/ProfilerBacktrace.h',
'public/ProfilerMarkers.h',
'public/PseudoStack.h',
'public/shared-libraries.h',
]
EXPORTS.mozilla += [
'public/ProfileGatherer.h',
]
@@ -125,16 +124,17 @@ if CONFIG['MOZ_ENABLE_PROFILER_SPS']:
IPDL_SOURCES += [
'gecko/ProfilerTypes.ipdlh',
]
include('/ipc/chromium/chromium-config.mozbuild')
EXPORTS += [
'public/GeckoProfiler.h',
+ 'public/GeckoProfilerTypes.h',
]
if CONFIG['MOZ_TASK_TRACER']:
EXPORTS += [
'tasktracer/GeckoTaskTracer.h',
'tasktracer/GeckoTaskTracerImpl.h',
'tasktracer/SourceEventTypeMap.h',
'tasktracer/TracedTaskCommon.h',
--- a/tools/profiler/public/GeckoProfiler.h
+++ b/tools/profiler/public/GeckoProfiler.h
@@ -108,20 +108,18 @@ enum TracingMetadata {
#define PROFILER_MARKER_PAYLOAD(info, payload) do { mozilla::UniquePtr<ProfilerMarkerPayload> payloadDeletor(payload); } while (0)
// Main thread specilization to avoid TLS lookup for performance critical use.
#define PROFILER_MAIN_THREAD_LABEL(name_space, info, category) do {} while (0)
#define PROFILER_MAIN_THREAD_LABEL_PRINTF(name_space, info, category, format, ...) do {} while (0)
static inline void profiler_tracing(const char* aCategory, const char* aInfo,
TracingMetadata metaData = TRACING_DEFAULT) {}
-class ProfilerBacktrace;
-
static inline void profiler_tracing(const char* aCategory, const char* aInfo,
- ProfilerBacktrace* aCause,
+ UniqueProfilerBacktrace aCause,
TracingMetadata metaData = TRACING_DEFAULT) {}
// Initilize the profiler TLS, signal handlers on linux. If MOZ_PROFILER_STARTUP
// is set the profiler will be started. This call must happen before any other
// sampler calls. Particularly sampler_label/sampler_marker.
static inline void profiler_init(void* stackTop) {};
// Clean up the profiler module, stopping it if required. This function may
@@ -154,16 +152,19 @@ static inline bool profiler_is_paused()
static inline void profiler_pause() {}
static inline void profiler_resume() {}
// Immediately capture the current thread's call stack and return it
static inline UniqueProfilerBacktrace profiler_get_backtrace() { return nullptr; }
static inline void profiler_get_backtrace_noalloc(char *output, size_t outputSize) { return; }
+// Free a ProfilerBacktrace returned by profiler_get_backtrace()
+inline void ProfilerBacktraceDestructor::operator()(ProfilerBacktrace* aBacktrace) {}
+
static inline bool profiler_is_active() { return false; }
// Check if an external profiler feature is active.
// Supported:
// * gpu
static inline bool profiler_feature_active(const char*) { return false; }
// Internal-only. Used by the event tracer.