LCOV - code coverage report
Current view: top level - tools/profiler/gecko - ProfilerIOInterposeObserver.cpp (source / functions) Hit Total Coverage
Test: output.info Lines: 0 11 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       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           0 : void ProfilerIOInterposeObserver::Observe(Observation& aObservation)
      12             : {
      13           0 :   if (!IsMainThread()) {
      14           0 :     return;
      15             :   }
      16             : 
      17           0 :   UniqueProfilerBacktrace stack = profiler_get_backtrace();
      18             : 
      19           0 :   nsCString filename;
      20           0 :   if (aObservation.Filename()) {
      21           0 :     filename = NS_ConvertUTF16toUTF8(aObservation.Filename());
      22             :   }
      23             : 
      24           0 :   profiler_add_marker(
      25             :     aObservation.ObservedOperationString(),
      26           0 :     MakeUnique<IOMarkerPayload>(aObservation.Reference(), filename.get(),
      27           0 :                                 aObservation.Start(), aObservation.End(),
      28           0 :                                 Move(stack)));
      29             : }

Generated by: LCOV version 1.13