Bug 1814908 - Remove the custom handling for the File IO markers r=julienw

Differential Revision: https://phabricator.services.mozilla.com/D169113
This commit is contained in:
Nazım Can Altınova 2023-02-15 15:53:28 +00:00
parent 3c7629ff11
commit 38a22ee248

View file

@ -91,7 +91,6 @@ void ProfilerIOInterposeObserver::Observe(Observation& aObservation) {
} }
AUTO_PROFILER_LABEL("ProfilerIOInterposeObserver", PROFILER); AUTO_PROFILER_LABEL("ProfilerIOInterposeObserver", PROFILER);
const bool doCaptureStack = !(features & ProfilerFeature::NoMarkerStacks);
if (IsMainThread()) { if (IsMainThread()) {
// This is the main thread. // This is the main thread.
// Capture a marker if any "IO" feature is on. // Capture a marker if any "IO" feature is on.
@ -109,7 +108,7 @@ void ProfilerIOInterposeObserver::Observe(Observation& aObservation) {
type, OTHER, type, OTHER,
MarkerOptions( MarkerOptions(
MarkerTiming::Interval(aObservation.Start(), aObservation.End()), MarkerTiming::Interval(aObservation.Start(), aObservation.End()),
MarkerStack::MaybeCapture(doCaptureStack)), MarkerStack::Capture()),
FileIOMarker, FileIOMarker,
// aOperation // aOperation
ProfilerString8View::WrapNullTerminatedString( ProfilerString8View::WrapNullTerminatedString(
@ -135,8 +134,7 @@ void ProfilerIOInterposeObserver::Observe(Observation& aObservation) {
// Share a backtrace between the marker on this thread, and the marker on // Share a backtrace between the marker on this thread, and the marker on
// the main thread. // the main thread.
UniquePtr<ProfileChunkedBuffer> backtrace = UniquePtr<ProfileChunkedBuffer> backtrace = profiler_capture_backtrace();
doCaptureStack ? profiler_capture_backtrace() : nullptr;
// Store the marker in the current thread. // Store the marker in the current thread.
PROFILER_MARKER( PROFILER_MARKER(
@ -201,7 +199,7 @@ void ProfilerIOInterposeObserver::Observe(Observation& aObservation) {
type, OTHER, type, OTHER,
MarkerOptions( MarkerOptions(
MarkerTiming::Interval(aObservation.Start(), aObservation.End()), MarkerTiming::Interval(aObservation.Start(), aObservation.End()),
doCaptureStack ? MarkerStack::Capture() : MarkerStack::NoStack(), MarkerStack::Capture(),
// Store this marker on the main thread. // Store this marker on the main thread.
MarkerThreadId::MainThread()), MarkerThreadId::MainThread()),
FileIOMarker, FileIOMarker,