-
Notifications
You must be signed in to change notification settings - Fork 480
[TrackEvent] Tweak category/tags filters priority #1432
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
I'm generally onboard with such a change, but I'm a bit scared if we are silently breaking some configs people already use. We would definitely have to announce this in the changelog, maybe do some form of audit of existing configs by major customers. @ddiproietto should take a look too :) |
I think this is actually also swapping the last two lines, i.e.
|
Expending on this: I don't have a strong opinion on how this should be interpreted, but I think the similar situation with tags I gave in the description (E.g. disabled_tags: "slow", enabled_tags: "navigation") should be interpreted as "navigation.debug" is disabled. |
Thanks for doing this! Useless complaint: this still doesn't give us perfect control over tracing categories. An explicit priority based approach (iptables style) woud be more powerful, but perhaps not worth it, due to the complexity and performance (I believe NameMatchesPattern has to be reasonably fast for dynamic categories). So this is fine. W.R.T. the breaking change, I think chromium is the more advanced user of this. (we cannot know all the users and all their configs, though). After review, I would announce the change on https://groups.google.com/g/perfetto-dev, and give people one week to complain. If we have no complaints, I would go ahead with this. |
If you want to pile up another breaking change, I was thinking we could disable all categories that don't match anything by default. We had some discussions a year ago and people were generally on board. (totally up to you if you want to do this separately). |
Also, can I ask you to check in a test like:
that covers most of the scenarios in the bug, BEFORE submitting this PR? That way we can check what's changing? Thanks! |
I tried this out and it showed a lot of tests in perfetto need updating (they use the empty track event config). I'm a bit opposed to piling up this change because there's lower benefit (it's easy to add disable_categories = [*] everywhere), and risks blocking the API change I want to get in in this CL.
Done here: https://github.com/google/perfetto/pull/1484/files |
This adds TrackEvent tests in preparation for API changes in #1432 Bug: chromium:260418655
Announce sent and CHANGELOG updated, PTAnL? |
This PR tweaks priority of category and tags filter to fit Chromium use cases:
E.g. disabled_tags: "slow", enabled_tags: "navigation"
Expectation: categories with "navigation" tags are enabled, but not if "slow" tag is specified.
E.g. enabled_tags: "navigation"
Expectation: categories with "navigation" tags are enabled, including ones with the "slow" tag
We can't specify enabled_tags: "slow" because that would enable all "slow" categories.
So before logic ranks (in this order):
After logic ranks:
Bug: chromium:260418655