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

Add sorting on totals #10

Merged
merged 2 commits into from
Jul 13, 2018
Merged

Add sorting on totals #10

merged 2 commits into from
Jul 13, 2018

Conversation

hmvp
Copy link
Contributor

@hmvp hmvp commented Jul 9, 2018

Should fix #1

Also switched to structopt for commandline parsing and ran the formatter

Copy link
Owner

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

src/main.rs Outdated
bin: Option<String>,

/// Set the sort order to number of instantiations
#[structopt(short = "i", long = "sort-insts")]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please pick a different name for this flag. "Inst" commonly stands for "instruction" not "instantiation", especially in the context of LLVM. For example InstCombine, MCInst, RISCVInstPrinter.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, any suggestions? I have very little opinion on this

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bloaty has a -s <sortby> flag which seems reasonable to me. In our case it could be -s lines (the default) or -s copies with long equivalents --sort=lines and --sort=copies.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed it to that

Copy link
Owner

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nicely done, thank you.

@dtolnay dtolnay merged commit 58426b2 into dtolnay:master Jul 13, 2018
@dtolnay
Copy link
Owner

dtolnay commented Jul 13, 2018

I published 0.1.4 with this flag.

@hmvp hmvp deleted the sorting branch July 16, 2018 12:30
@dtolnay dtolnay mentioned this pull request Nov 21, 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

Successfully merging this pull request may close these issues.

Flag to sort by number of instantiations
2 participants