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
Loading
Please register or sign in to comment