commit | 01f4ad74ce79cd9a72c7ad4cb312be7de4be2b9a | [log] [tgz] |
---|---|---|
author | Ryan Savitski <rsavitski@google.com> | Mon Apr 04 13:17:29 2022 +0100 |
committer | Ryan Savitski <rsavitski@google.com> | Mon Apr 04 13:17:29 2022 +0100 |
tree | a24c1b034ef6f3f9191ce3a827a54145db7c3147 | |
parent | 006d75d219745f48dd0b8e3f490c0a352ca0e79f [diff] |
traced_perf: support wildcards in /proc/pid/cmdline matching This changes the semantics of the |target_cmdline| and |exclude_cmdline| config fields. Normally we should've introduced a separate proto field for this, but the change is compatible with vast majority of existing configs, so it's less hassle for both us and users to reuse the field. See go/perfetto-profiler-globs. There are two compatibility cases to consider: (a) old config expecting canonicalization + new profiler binary (b) new config with a wildcard + old profiler binary For (a), the primary difference is how a pattern with a fully qualified path is treated. "/bin/echo" would previously canonicalize to "echo", and match against anything with that suffix in argv0. Now we'll match only against that particular fully qualified path. For (b), the old implementation will try to do exact string comparisons, so patterns with wildcards will effectively match nothing. Configs that want to remain compatible with both versions of the profiler can specify several versions of the same target_cmdline, as the field is repeated. It'll potentially match more than before, but only in corner cases. Bug: 201273553 Change-Id: I48991992fb9456cfe11cab7ac7a92d7fff4ac71c
Perfetto is a production-grade open-source stack for performance instrumentation and trace analysis. It offers services and libraries and for recording system-level and app-level traces, native + java heap profiling, a library for analyzing traces using SQL and a web-based UI to visualize and explore multi-GB traces.
See https://perfetto.dev/docs or the /docs/ directory for documentation.