Coverage Report

Created: 2022-07-16 07:03

/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/source/Plugins/TraceExporter/ctf/TraceExporterCTF.cpp
Line
Count
Source (jump to first uncovered line)
1
//===-- TraceExporterCTF.cpp ----------------------------------------------===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
9
#include "TraceExporterCTF.h"
10
11
#include <memory>
12
13
#include "CommandObjectThreadTraceExportCTF.h"
14
#include "lldb/Core/PluginManager.h"
15
16
using namespace lldb;
17
using namespace lldb_private;
18
using namespace lldb_private::ctf;
19
using namespace llvm;
20
21
LLDB_PLUGIN_DEFINE(TraceExporterCTF)
22
23
//------------------------------------------------------------------
24
// PluginInterface protocol
25
//------------------------------------------------------------------
26
27
static CommandObjectSP
28
6.21k
GetThreadTraceExportCommand(CommandInterpreter &interpreter) {
29
6.21k
  return std::make_shared<CommandObjectThreadTraceExportCTF>(interpreter);
30
6.21k
}
31
32
3.61k
void TraceExporterCTF::Initialize() {
33
3.61k
  PluginManager::RegisterPlugin(GetPluginNameStatic(),
34
3.61k
                                "Chrome Trace Format Exporter", CreateInstance,
35
3.61k
                                GetThreadTraceExportCommand);
36
3.61k
}
37
38
3.60k
void TraceExporterCTF::Terminate() {
39
3.60k
  PluginManager::UnregisterPlugin(CreateInstance);
40
3.60k
}
41
42
0
Expected<TraceExporterUP> TraceExporterCTF::CreateInstance() {
43
0
  return std::make_unique<TraceExporterCTF>();
44
0
}