LLDB  mainline
TraceIntelPTBundleSaver.h
Go to the documentation of this file.
1 //===-- TraceIntelPTBundleSaver.h ----------------------------*- C++ //-*-===//
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 #ifndef LLDB_SOURCE_PLUGINS_TRACE_INTEL_PT_TRACEINTELPTBUNDLESAVER_H
10 #define LLDB_SOURCE_PLUGINS_TRACE_INTEL_PT_TRACEINTELPTBUNDLESAVER_H
11 
12 #include "TraceIntelPT.h"
13 
15 
16 namespace lldb_private {
17 namespace trace_intel_pt {
18 
20 public:
21  /// Save the Intel PT trace of a live process to the specified directory,
22  /// which will be created if needed. This will also create a file
23  /// \a <directory>/trace.json with the description of the trace
24  /// bundle, along with others files which contain the actual trace data.
25  /// The trace.json file can be used later as input for the "trace load"
26  /// command to load the trace in LLDB.
27  ///
28  /// \param[in] trace_ipt
29  /// The Intel PT trace to be saved to disk.
30  ///
31  /// \param[in] directory
32  /// The directory where the trace bundle will be created.
33  ///
34  /// \param[in] compact
35  /// Filter out information irrelevant to the traced processes in the
36  /// context switch and intel pt traces when using per-cpu mode. This
37  /// effectively reduces the size of those traces.
38  ///
39  /// \return
40  /// A \a FileSpec pointing to the bundle description file, or an \a
41  /// llvm::Error otherwise.
42  llvm::Expected<FileSpec> SaveToDisk(TraceIntelPT &trace_ipt,
43  FileSpec directory, bool compact);
44 };
45 
46 } // namespace trace_intel_pt
47 } // namespace lldb_private
48 
49 #endif // LLDB_SOURCE_PLUGINS_TRACE_INTEL_PT_TRACEINTELPTBUNDLESAVER_H
lldb_private::trace_intel_pt::TraceIntelPT
Definition: TraceIntelPT.h:24
TraceIntelPTJSONStructs.h
lldb_private::FileSpec
Definition: FileSpec.h:56
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::trace_intel_pt::TraceIntelPTBundleSaver::SaveToDisk
llvm::Expected< FileSpec > SaveToDisk(TraceIntelPT &trace_ipt, FileSpec directory, bool compact)
Save the Intel PT trace of a live process to the specified directory, which will be created if needed...
Definition: TraceIntelPTBundleSaver.cpp:338
lldb_private::trace_intel_pt::TraceIntelPTBundleSaver
Definition: TraceIntelPTBundleSaver.h:19
TraceIntelPT.h