@@ -74,26 +74,50 @@ After post-processing:
7474
7575## 🎯 Selective Tracing (Kernel-Based Filtering)
7676
77- If you only want to trace specific kernels:
77+ You can now trace specific kernels using the ` DYNAMIC_KERNEL_RANGE ` environment variable.
7878
79- Trace kernels 3 to 5:
80- ``` bash
81- export DYNAMIC_KERNEL_LIMIT_START=3
82- export DYNAMIC_KERNEL_LIMIT_END=5
83- ```
79+ ### Usage
8480
85- Trace only kernel 3:
86- ``` bash
87- export DYNAMIC_KERNEL_LIMIT_START=3
88- export DYNAMIC_KERNEL_LIMIT_END=3
89- ```
81+ Set ` DYNAMIC_KERNEL_RANGE ` to specify which kernel IDs (and optionally names) to trace. Supported formats:
82+
83+ - ** Single ID:**
84+ ``` bash
85+ export DYNAMIC_KERNEL_RANGE=" 3"
86+ ```
87+ Traces only kernel 3.
88+
89+ - ** Range:**
90+ ``` bash
91+ export DYNAMIC_KERNEL_RANGE=" 5-8"
92+ ```
93+ Traces kernels 5 through 8 (inclusive).
9094
91- Disable all tracing but list kernels in ` stats.csv ` :
95+ - ** Open-ended Range:**
96+ ``` bash
97+ export DYNAMIC_KERNEL_RANGE=" 10-"
98+ ```
99+ Traces from kernel 10 onward.
100+
101+ - ** Multiple Ranges (space-separated):**
102+ ``` bash
103+ export DYNAMIC_KERNEL_RANGE=" 2 5-8 10-"
104+ ```
105+
106+ - ** With Name Filters (regex):**
107+ ``` bash
108+ export DYNAMIC_KERNEL_RANGE=" 5-8@kernel_a.*,kernel_b.*"
109+ ```
110+ Traces kernels 5–8 * only* if their names match ` kernel_a.* ` or ` kernel_b.* ` .
111+
112+ ### To Disable Tracing But Still List Kernels
113+
114+ To list kernel metadata in ` stats.csv ` without generating traces, we set the DYNAMIC_KERNEL_RANGE to very large number :
92115``` bash
93- export DYNAMIC_KERNEL_LIMIT_START= 1000000
116+ export DYNAMIC_KERNEL_RANGE= " 1000000"
94117```
95118
96- This is helpful for identifying kernel IDs without producing large trace files.
119+ This is useful for discovering kernel IDs and names without producing large trace files.
120+
97121
98122---
99123
0 commit comments