Skip to content

Commit 014d9fc

Browse files
branczclaude
andauthored
Add Hide CUDA/python/libc Internals preset filter (#6052)
* feat: Add "Hide CUDA Internals" preset filter Added a new preset filter to hide CUDA and NVIDIA GPU driver internal functions from profiles. This preset filters out frames from the following libraries: - libcudnn_engines_precompiled.so - libcupti.so - libparcgpcupti.so - libcudart.so - libcuda.so The preset follows the same pattern as the existing "Hide V8 internals" preset, using frame filters with "not_contains" match type on the binary field. * feat: Add "Hide Python Internals" preset filter Added a new preset filter to hide Python interpreter internal functions from profiles. This preset filters out: - Frames from binaries containing "python3" - Function names equal to "<interpreter trampoline>" - Function names equal to "<module>" This helps users focus on their application code rather than Python interpreter internals. * feat: Add "Hide libc" preset filter Added a new preset filter to hide C standard library functions from profiles. This preset filters out frames from binaries containing "libc.so". This helps users focus on their application code rather than standard C library internals. --------- Co-authored-by: Claude <[email protected]>
1 parent ed83f10 commit 014d9fc

File tree

1 file changed

+75
-0
lines changed
  • ui/packages/shared/profile/src/ProfileView/components/ProfileFilters

1 file changed

+75
-0
lines changed

ui/packages/shared/profile/src/ProfileView/components/ProfileFilters/filterPresets.ts

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,81 @@ export const filterPresets: FilterPreset[] = [
8787
},
8888
],
8989
},
90+
{
91+
key: 'hide_cuda_internals',
92+
name: 'Hide CUDA Internals',
93+
description: 'Excludes CUDA and NVIDIA GPU driver internal functions from the profile',
94+
filters: [
95+
{
96+
type: 'frame',
97+
field: 'binary',
98+
matchType: 'not_contains',
99+
value: 'libcudnn_engines_precompiled.so',
100+
},
101+
{
102+
type: 'frame',
103+
field: 'binary',
104+
matchType: 'not_contains',
105+
value: 'libcupti.so',
106+
},
107+
{
108+
type: 'frame',
109+
field: 'binary',
110+
matchType: 'not_contains',
111+
value: 'libparcgpcupti.so',
112+
},
113+
{
114+
type: 'frame',
115+
field: 'binary',
116+
matchType: 'not_contains',
117+
value: 'libcudart.so',
118+
},
119+
{
120+
type: 'frame',
121+
field: 'binary',
122+
matchType: 'not_contains',
123+
value: 'libcuda.so',
124+
},
125+
],
126+
},
127+
{
128+
key: 'hide_python_internals',
129+
name: 'Hide Python Internals',
130+
description: 'Excludes Python interpreter internal functions from the profile',
131+
filters: [
132+
{
133+
type: 'frame',
134+
field: 'binary',
135+
matchType: 'not_contains',
136+
value: 'python3',
137+
},
138+
{
139+
type: 'frame',
140+
field: 'function_name',
141+
matchType: 'not_equal',
142+
value: '<interpreter trampoline>',
143+
},
144+
{
145+
type: 'frame',
146+
field: 'function_name',
147+
matchType: 'not_equal',
148+
value: '<module>',
149+
},
150+
],
151+
},
152+
{
153+
key: 'hide_libc',
154+
name: 'Hide libc',
155+
description: 'Excludes C standard library functions from the profile',
156+
filters: [
157+
{
158+
type: 'frame',
159+
field: 'binary',
160+
matchType: 'not_contains',
161+
value: 'libc.so',
162+
},
163+
],
164+
},
90165
];
91166

92167
const presetKeys = new Set(filterPresets.map(preset => preset.key));

0 commit comments

Comments
 (0)