mirror of
https://github.com/HeyPuter/firefox.git
synced 2026-11-30 14:17:36 -10:00
This patch reduces the differences between builds where the profiler is enabled and those where the profiler is disabled. It does this by removing numerous MOZ_GECKO_PROFILER checks. These changes have the following consequences. - Various functions and classes are now defined in all builds, and so can be used unconditionally: profiler_add_marker(), profiler_set_js_context(), profiler_clear_js_context(), profiler_get_pseudo_stack(), AutoProfilerLabel. (They are effectively no-ops in non-profiler builds, of course.) - The no-op versions of PROFILER_* are now gone. The remaining versions are almost no-ops when the profiler isn't built.
31 lines
795 B
C++
31 lines
795 B
C++
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef PROFILERIOINTERPOSEOBSERVER_H
|
|
#define PROFILERIOINTERPOSEOBSERVER_H
|
|
|
|
#include "mozilla/IOInterposer.h"
|
|
#include "nsISupportsImpl.h"
|
|
|
|
namespace mozilla {
|
|
|
|
/**
|
|
* This class is the observer that calls into the profiler whenever
|
|
* main thread I/O occurs.
|
|
*/
|
|
class ProfilerIOInterposeObserver final : public IOInterposeObserver
|
|
{
|
|
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(ProfilerIOInterposeObserver)
|
|
|
|
public:
|
|
virtual void Observe(Observation& aObservation);
|
|
|
|
protected:
|
|
virtual ~ProfilerIOInterposeObserver() {}
|
|
};
|
|
|
|
} // namespace mozilla
|
|
|
|
#endif // PROFILERIOINTERPOSEOBSERVER_H
|