llvm-project/lldb/test/API/commands
Walter Erquinigo bdf3e7e5b8 [trace][intelpt] Add task timer classes
I'm adding two new classes that can be used to measure the duration of long
tasks as process and thread level, e.g. decoding, fetching data from
lldb-server, etc. In this first patch, I'm using it to measure the time it takes
to decode each thread, which is printed out with the `dump info` command. In a
later patch I'll start adding process-level tasks and I might move these
classes to the upper Trace level, instead of having them in the intel-pt
plugin. I might need to do that anyway in the future when we have to
measure HTR. For now, I want to keep the impact of this change minimal.

With it, I was able to generate the following info of a very big trace:

```
(lldb) thread trace dump info                                                                                                            Trace technology: intel-pt

thread #1: tid = 616081
  Total number of instructions: 9729366

  Memory usage:
    Raw trace size: 1024 KiB
    Total approximate memory usage (excluding raw trace): 123517.34 KiB
    Average memory usage per instruction (excluding raw trace): 13.00 bytes

  Timing:
    Decoding instructions: 1.62s

  Errors:
    Number of TSC decoding errors: 0
```

As seen above, it took 1.62 seconds to decode 9.7M instructions. This is great
news, as we don't need to do any optimization work in this area.

Differential Revision: https://reviews.llvm.org/D123357
2022-04-12 13:08:03 -07:00
..
add-dsym/uuid [lldb] Reduce code duplication around inferior building 2021-10-19 12:09:41 +02:00
apropos [lldb/test] Added lldbutil function to test a breakpoint 2021-11-17 08:37:30 +00:00
breakpoint [lldb] Warn the user about starting the --func-regex parameter with an asterisk 2020-05-06 12:37:52 +02:00
command Fix a mistyping introduced with the new container command. 2022-04-05 09:42:05 -07:00
disassemble/basic [lldb] Introduce createTestTarget for creating a valid target in API tests 2021-05-24 16:18:44 +02:00
expression [lldb] Skip a bunch of tests that shouldn't run remotely 2022-04-08 10:46:34 -07:00
frame [lldb] Allow to register frame recognizers applied beyond the first instruction 2021-08-29 17:28:46 +02:00
gui [lldb][gui] make 'step out' step out of the selected frame 2022-04-05 08:29:13 +02:00
help [Bug 49018][lldb] Fix incorrect help text for 'memory write' command 2021-11-26 19:14:26 +05:30
log [lldb] Remove support for replaying the test suite from a reproducer 2021-09-30 10:47:19 -07:00
memory [lldb] Unify two versions of TestMemoryRead 2021-12-08 13:27:56 +01:00
platform [lldb] Skip a bunch of tests that shouldn't run remotely 2022-04-08 10:46:34 -07:00
process [lldb] Skip several lldb tests that are flaky on Windows 2021-10-13 09:46:41 -07:00
quit
register/register [LLDB] Fix window bot failure 2022-02-03 11:27:48 -08:00
reproducer/invalid-args
session [lldb] Remove support for replaying the test suite from a reproducer 2021-09-30 10:47:19 -07:00
settings [lldb] Fix TestQuoting when run remotely 2022-04-08 10:46:34 -07:00
source/info
statistics/basic Fix a double debug info size counting in top level stats for "statistics dump". 2022-02-10 10:55:18 -08:00
target [lldb] Correctly display the number of types found 2022-01-15 10:31:49 -08:00
thread [lldb] Fix thread syncrhonization TestThreadBacktraceRepeat 2022-02-15 08:58:39 +01:00
trace [trace][intelpt] Add task timer classes 2022-04-12 13:08:03 -07:00
version
watchpoints [lldb] Replace asserts on .Success() with assertSuccess() 2022-02-14 08:31:17 -08:00