Revert "[libc] Breakup freelist_malloc into separate files" (#119749)
[llvm-project.git] / lldb / source / Plugins / TraceExporter / ctf / TraceExporterCTF.cpp
blobe98e2c83e6498a121b892b21e5c6b6e5e909d5b8
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 //===----------------------------------------------------------------------===//
9 #include "TraceExporterCTF.h"
11 #include <memory>
13 #include "CommandObjectThreadTraceExportCTF.h"
14 #include "lldb/Core/PluginManager.h"
16 using namespace lldb;
17 using namespace lldb_private;
18 using namespace lldb_private::ctf;
19 using namespace llvm;
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>();