Skip to content
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

inverted --source-filter #203

Open
grandinj opened this issue May 26, 2020 · 3 comments
Open

inverted --source-filter #203

grandinj opened this issue May 26, 2020 · 3 comments

Comments

@grandinj
Copy link

awesome tool!

could we get an inverted --source-filter please? i.e. to exclude stuff from the report.

because it appears to be unreasonably hard to generate a negative regular expression that RE2 will accept.

For example, trying to exclude c++ std library classes:

bloaty -d shortsymbols,fullsymbols --source-filter ^[^s][^t][^d] instdir/program/libsclo.so
@haberman
Copy link
Member

Yes I think this is a great idea.

Biggest question is how to specify this on the command line. The first things that come to mind are:

bloaty --source-filter !std

or:

bloaty --source-filter ~std

But unfortunately both of those have special meanings for the shell.

@grandinj
Copy link
Author

git has --not e.g. see

https://git-scm.com/docs/git-grep#Documentation/git-grep.txt---and

--source-filter-not
or
--not-source-filter

also works for me.

Or convince the RE people to support the perl
?!
operator :-)

@vinuraja
Copy link

+1. I was recently working with bloaty and this is a feature I'm really missing.

learn-more added a commit to learn-more/bloaty that referenced this issue Aug 15, 2021
learn-more added a commit to learn-more/bloaty that referenced this issue Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants