Files
palemoon27/tools/profiler/ProfilerIOInterposeObserver.cpp
T
roytam1 3e6694dfa6 import changes from rmottola/Arctic-Fox:
- Goanna->Gecko:  GoannaMediaPluginService & GoannaTouchDispatcher (1e10799bf)
- Goanna->Gecko:  GoannaProcess (dd671240a)
- Goanna->Gecko: goannamediaplugin (2a9423ba6)
- Goanna->Gecko: GoannaContentController (62e7c2f5f)
- Goanna->Gecko: GoannaProfiler & GoannaTaskTracer (376c45a3c)
2020-01-11 09:59:56 +08:00

31 lines
1.0 KiB
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/. */
#include "GeckoProfiler.h"
#include "ProfilerIOInterposeObserver.h"
#include "ProfilerMarkers.h"
using namespace mozilla;
void ProfilerIOInterposeObserver::Observe(Observation& aObservation)
{
if (!IsMainThread()) {
return;
}
ProfilerBacktrace* stack = profiler_get_backtrace();
nsCString filename;
if (aObservation.Filename()) {
filename = NS_ConvertUTF16toUTF8(aObservation.Filename());
}
IOMarkerPayload* markerPayload = new IOMarkerPayload(aObservation.Reference(),
filename.get(),
aObservation.Start(),
aObservation.End(),
stack);
PROFILER_MARKER_PAYLOAD(aObservation.ObservedOperationString(), markerPayload);
}