Skip to content

Commit 97ba561

Browse files
branczclaude
andauthored
Add frame filters to exclude async and error handling functions (#6196)
* Add Rust frame filter predicates to futures and panic presets Add 5 predicates to hide_rust_futures (poll, {closure#, {async_block#, invoke, {async_fn#) and 3 to hide_rust_panic_backtrace (catch_unwind<, call_once<, do_call<) to filter out common Rust async/futures and panic infrastructure frames from profiles. https://claude.ai/code/session_014AR8EUAyaeqpQuAhb5tEA9 * Add more Rust frame filter predicates to tokio and futures presets Add "not contains tokio::runtime" to hide_tokio_frames, and "not equals run", "not starts with try_poll" to hide_rust_futures. Skip "not starts with poll" as it already exists. https://claude.ai/code/session_014AR8EUAyaeqpQuAhb5tEA9 --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent c96a763 commit 97ba561

1 file changed

Lines changed: 66 additions & 0 deletions

File tree

  • ui/packages/shared/profile/src/ProfileView/components/ProfileFilters

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

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,12 @@ export const filterPresets: FilterPreset[] = [
197197
matchType: 'not_starts_with',
198198
value: '<tokio::',
199199
},
200+
{
201+
type: 'frame',
202+
field: 'function_name',
203+
matchType: 'not_contains',
204+
value: 'tokio::runtime',
205+
},
200206
],
201207
},
202208
{
@@ -228,6 +234,48 @@ export const filterPresets: FilterPreset[] = [
228234
matchType: 'not_contains',
229235
value: 'core::future::future::Future',
230236
},
237+
{
238+
type: 'frame',
239+
field: 'function_name',
240+
matchType: 'not_starts_with',
241+
value: 'poll',
242+
},
243+
{
244+
type: 'frame',
245+
field: 'function_name',
246+
matchType: 'not_starts_with',
247+
value: 'try_poll',
248+
},
249+
{
250+
type: 'frame',
251+
field: 'function_name',
252+
matchType: 'not_starts_with',
253+
value: '{closure#',
254+
},
255+
{
256+
type: 'frame',
257+
field: 'function_name',
258+
matchType: 'not_starts_with',
259+
value: '{async_block#',
260+
},
261+
{
262+
type: 'frame',
263+
field: 'function_name',
264+
matchType: 'not_equal',
265+
value: 'invoke',
266+
},
267+
{
268+
type: 'frame',
269+
field: 'function_name',
270+
matchType: 'not_equal',
271+
value: 'run',
272+
},
273+
{
274+
type: 'frame',
275+
field: 'function_name',
276+
matchType: 'not_starts_with',
277+
value: '{async_fn#',
278+
},
231279
],
232280
},
233281
{
@@ -253,6 +301,24 @@ export const filterPresets: FilterPreset[] = [
253301
matchType: 'not_starts_with',
254302
value: 'std::sys::backtrace',
255303
},
304+
{
305+
type: 'frame',
306+
field: 'function_name',
307+
matchType: 'not_starts_with',
308+
value: 'catch_unwind<',
309+
},
310+
{
311+
type: 'frame',
312+
field: 'function_name',
313+
matchType: 'not_starts_with',
314+
value: 'call_once<',
315+
},
316+
{
317+
type: 'frame',
318+
field: 'function_name',
319+
matchType: 'not_starts_with',
320+
value: 'do_call<',
321+
},
256322
],
257323
},
258324
];

0 commit comments

Comments
 (0)