llvm-project/lldb/source/Utility
Gaurav Gaur d30fd5c3a1 [trace][intel pt] Add a cgroup filter
It turns out that cgroup filtering is relatively trivial and works
really nicely. Thid diffs adds automatic cgroup filtering when in
per-cpu mode, unless a new --disable-cgroup-filtering flag is passed in
the start command. At least on Meta machines, all processes are spawned
inside a cgroup by default, which comes super handy, because per cpu
tracing is now much more precise.

A manual test gave me this result

- Without filtering:
    Total number of trace items: 36083
    Total number of continuous executions found: 229
    Number of continuous executions for this thread: 2
    Total number of PSB blocks found: 98
    Number of PSB blocks for this thread 2
    Total number of unattributed PSB blocks found: 38

- With filtering:
    Total number of trace items: 87756
    Total number of continuous executions found: 123
    Number of continuous executions for this thread: 2
    Total number of PSB blocks found: 10
    Number of PSB blocks for this thread 3
    Total number of unattributed PSB blocks found: 2

Filtering gives us great results. The number of instructions collected
more than double (probalby because we have less noise in the trace), and
we have much less unattributed PSBs blocks and unrelated PSBs in
general. The ones that are unrelated probably belong to other processes
in the same cgroup.

Differential Revision: https://reviews.llvm.org/D129257
2022-07-13 12:26:11 -07:00
..
ARM64_DWARF_Registers.h
ARM64_ehframe_Registers.h
ARM_DWARF_Registers.h
ARM_ehframe_Registers.h
ArchSpec.cpp [lldb] Fix reading i686-windows executables with GNU environment 2022-06-22 17:16:05 +03:00
Args.cpp [lldb] Add support for escaping fish arguments 2022-07-11 16:44:46 -07:00
Baton.cpp
Broadcaster.cpp Fix up the "lldb log break" channel output. 2022-03-03 12:10:39 -08:00
CMakeLists.txt [lldb] Introduce the concept of a log handler (NFC) 2022-06-16 13:34:28 -07:00
CompletionRequest.cpp
Connection.cpp
ConstString.cpp [lldb] Remove ConstString::StaticMemorySize 2022-01-26 09:13:46 -08:00
DataBufferHeap.cpp [lldb] Refactor DataBuffer so we can map files as read-only 2022-04-05 13:46:37 -07:00
DataBufferLLVM.cpp [lldb] Refactor DataBuffer so we can map files as read-only 2022-04-05 13:46:37 -07:00
DataEncoder.cpp Added the ability to cache the finalized symbol tables subsequent debug sessions to start faster. 2021-12-16 09:59:55 -08:00
DataExtractor.cpp [lldb/source/Utility/DataExtractor.cpp] Update for `llvm::MD5::MD5Result` API change 2022-04-05 21:47:45 -07:00
Environment.cpp Try to unbreak lldb build after 973519826e 2021-09-02 11:32:28 -04:00
Event.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
FileSpec.cpp Use static_cast from SmallString to std::string (NFC) 2022-06-04 22:09:27 -07:00
GDBRemote.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
IOObject.cpp
Instrumentation.cpp [LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB 2022-03-14 13:32:03 -07:00
LLDBAssert.cpp
LLDBLog.cpp Introduce new symbol on-demand for debug info 2022-04-26 10:42:06 -07:00
Listener.cpp [lldb] Rename Logging.h to LLDBLog.h and clean up includes 2022-02-03 14:47:01 +01:00
Log.cpp [lldb] Add a log dump command 2022-06-27 10:02:34 -07:00
NameMatches.cpp
PPC64LE_DWARF_Registers.h
PPC64_DWARF_Registers.h
ProcessInfo.cpp [lldb] Use value_or instead of getValueOr (NFC) 2022-06-19 09:12:01 -07:00
RegisterValue.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
RegularExpression.cpp
Reproducer.cpp [lldb] Remove FileSystem::Initialize from FileCollector 2022-03-03 13:22:38 -08:00
ReproducerProvider.cpp [lldb] Remove FileSystem::Initialize from FileCollector 2022-03-03 13:22:38 -08:00
Scalar.cpp [APInt] Normalize naming on keep constructors / predicate methods. 2021-09-09 09:50:24 -07:00
SelectHelper.cpp [lld] Don't use Optional::hasValue (NFC) 2022-06-26 19:29:40 -07:00
State.cpp
Status.cpp [LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB 2022-03-14 13:32:03 -07:00
Stream.cpp [LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB 2022-03-14 13:32:03 -07:00
StreamString.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
StringExtractor.cpp [LLDB] Applying clang-tidy modernize-use-default-member-init over LLDB 2022-03-14 13:32:03 -07:00
StringExtractorGDBRemote.cpp [lldb] [llgs] Support resuming one process with PID!=current via vCont 2022-06-24 17:20:23 +02:00
StringLexer.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
StringList.cpp [lldb] Add StringList::AppendString(const Twine&) (NFC) 2022-01-05 18:49:15 -08:00
StructuredData.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
TildeExpressionResolver.cpp [lldb] Replace default bodies of special member functions with = default; 2021-07-02 11:31:16 -07:00
Timer.cpp [lldb] Fix timer logging inverted quiet condition 2022-01-21 15:34:07 -08:00
TraceGDBRemotePackets.cpp [trace][intelpt] Support system-wide tracing [20] - Rename some fields in the schema 2022-06-16 11:42:22 -07:00
TraceIntelPTGDBRemotePackets.cpp [trace][intel pt] Add a cgroup filter 2022-07-13 12:26:11 -07:00
UUID.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
UnimplementedError.cpp
UriParser.cpp Don't use Optional::getValue (NFC) 2022-06-20 23:35:53 -07:00
UserID.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
UserIDResolver.cpp
UuidCompatibility.h
VASprintf.cpp [lldb][NFC] Use C++ versions of the deprecated C standard library headers 2021-05-26 12:46:12 +02:00
VMRange.cpp Use llvm::any_of and llvm::none_of (NFC) 2021-10-24 17:35:33 -07:00
XcodeSDK.cpp [LLDB] Applying clang-tidy modernize-use-equals-default over LLDB 2022-03-31 13:21:49 -07:00