Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/tools/profiler/gecko/ProfilerIOInterposeObserver.cpp
Line
Count
Source (jump to first uncovered line)
1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
 * License, v. 2.0. If a copy of the MPL was not distributed with this
3
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5
#include "GeckoProfiler.h"
6
#include "ProfilerIOInterposeObserver.h"
7
#include "ProfilerMarkerPayload.h"
8
9
using namespace mozilla;
10
11
void ProfilerIOInterposeObserver::Observe(Observation& aObservation)
12
0
{
13
0
  if (!IsMainThread()) {
14
0
    return;
15
0
  }
16
0
17
0
  UniqueProfilerBacktrace stack = profiler_get_backtrace();
18
0
19
0
  nsString filename;
20
0
  aObservation.Filename(filename);
21
0
  profiler_add_marker(
22
0
    aObservation.ObservedOperationString(),
23
0
    MakeUnique<IOMarkerPayload>(aObservation.Reference(),
24
0
                                NS_ConvertUTF16toUTF8(filename).get(),
25
0
                                aObservation.Start(), aObservation.End(),
26
0
                                std::move(stack)));
27
0
}