1 //===-- TraceExporterCTF.cpp ----------------------------------------------===//
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
7 //===----------------------------------------------------------------------===//
9 #include "TraceExporterCTF.h"
13 #include "CommandObjectThreadTraceExportCTF.h"
14 #include "lldb/Core/PluginManager.h"
17 using namespace lldb_private
;
18 using namespace lldb_private::ctf
;
21 LLDB_PLUGIN_DEFINE(TraceExporterCTF
)
23 //------------------------------------------------------------------
24 // PluginInterface protocol
25 //------------------------------------------------------------------
27 static CommandObjectSP
28 GetThreadTraceExportCommand(CommandInterpreter
&interpreter
) {
29 return std::make_shared
<CommandObjectThreadTraceExportCTF
>(interpreter
);
32 void TraceExporterCTF::Initialize() {
33 PluginManager::RegisterPlugin(GetPluginNameStatic(),
34 "Chrome Trace Format Exporter", CreateInstance
,
35 GetThreadTraceExportCommand
);
38 void TraceExporterCTF::Terminate() {
39 PluginManager::UnregisterPlugin(CreateInstance
);
42 Expected
<TraceExporterUP
> TraceExporterCTF::CreateInstance() {
43 return std::make_unique
<TraceExporterCTF
>();