Add wall clock analysis (#184)

* Add combined on-CPU and off-CPU profiler script

- Implemented a new profiling tool that captures both on-CPU and off-CPU activity for a specified process.
- The script runs 'oncputime' and 'offcputime' tools simultaneously and combines their results into a unified flamegraph.
- Added functionality to discover threads and profile them individually if the application is multi-threaded.
- Included error handling for tool execution and output processing.
- Created methods for generating flamegraph data and SVG visualizations.
- Added command-line argument parsing for user-defined profiling parameters.
- Implemented detailed analysis reports for both individual threads and overall profiling results.

* feat: integrate blazesym v0.2.0 for improved symbol resolution and add test program for memory leak detection

* docs: update README to enhance wall clock profiling tutorial with detailed explanations and examples

* feat: add wallclock-profiler tests to CI workflow for tool validation

* fix: rename combined_profiler.py to wallclock_profiler.py in test scripts and usage examples
This commit is contained in:
云微
2025-09-30 22:11:52 -07:00
committed by GitHub
parent da67bfcf24
commit 70451702f0
31 changed files with 8584 additions and 53 deletions

View File

@@ -62,6 +62,13 @@ jobs:
make -C src/30-sslsniff
sudo timeout -s 2 3 src/30-sslsniff/sslsniff || if [ $? = 124 ]; then exit 0; else exit $?; fi
- name: test 32 wallclock-profiler
run: |
make -C src/32-wallclock-profiler
# Test individual tools can be built and show help
src/32-wallclock-profiler/oncputime --help || true
src/32-wallclock-profiler/offcputime --help || true
- name: test 33 funclatency
run: |
make -C src/33-funclatency