You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add thread filtering support for gdb-oneapi callstack capture.
Add two new environment variables to control thread selection during
callstack capture:
- STAT_GDB_MAX_THREADS: Limit capture to first N threads
- STAT_INTELGT_EXPR_FILTER: Filter threads using GDB expression
STAT_INTELGT_MAX_THREADS=100 will capture the first 100 threads.
STAT_INTELGT_EXPR_FILTER allows selective thread capture using GDB
expressions (e.g., "\$_thread <= 50" to capture only threads 1-50).
Updated documentation to describe both environment variables with
usage examples. The user guide pdf file is also regenerated accordingly.
Signed-off-by: Abdul Basit Ijaz <abdul.b.ijaz@intel.com>
Set to a positive integer to limit the number of threads used for call-stack capture. STAT will capture stack traces from only the first N threads. For example, <literal>STAT_INTELGT_MAX_THREADS=100</literal> will capture the first 100 threads. If the value is not a positive integer, this setting is ignored and all threads are captured.
Set to a GDB expression to selectively filter threads for call-stack capture. Only threads where the expression evaluates to true (non-zero) will have their stack traces captured. The new line characters and system commands keywords like <literal>shell, call, python, source, dump, restore</literal> are not allowed. The expression is evaluated in the context of each thread using GDB's thread apply command. For example, <literal>STAT_INTELGT_EXPR_FILTER="\$_thread <= 50"</literal> will capture only threads with ID 50 or lower. The expression must be a valid GDB expression that returns a boolean value.
218
+
</para>
219
+
<para>
220
+
<emphasis role="bold">Security Note:</emphasis> This expression is directly evaluated by GDB. For security, the expression is validated to reject dangerous GDB commands such as <literal>shell, call, python</literal> and multi-line input. Only use this feature in trusted environments where environment variables are controlled.
0 commit comments