Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 3a26ff6d authored by Primiano Tucci's avatar Primiano Tucci
Browse files

atrace: don't hard-fail if one of the categories doesn't exist

Before this CL:
`atrace --async_start sched wm foobar` would fail, without enabling
sched and wm if one of the categories (foobar) did not exist.

After this CL:
It prints an error but enables the other categories.

Note that the "error enabling tracing category" fprintf was
also redundant because setCategoryEnable() has already its
own fprintf.

This is to address bugs where people copy/paste a config from a new
device onto an old device, and then the whole userspace tracing fails
because one of the many atrace categories doesn't exist.

This makes it consistent with the behavior of ftrace, where we keep
going if some of the ftrace events doesn't exist.

Bug: 171085599
Test: manual. `perfetto -t 1s bionic am foobar -o trace` outputs a
      trace which contains wm and am events.
Change-Id: I5e807b6466a2cefc5a41ef53b197984a8308060c
parent 0b272119
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment