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

libheaptrace: Add dual sorted reporting feature #11

Closed
wants to merge 1 commit into from

Conversation

Bojun-Seo
Copy link
Collaborator

Add dual option for sort feature
dual option will report size as well as count sorted results.
Usage example:

$ heaptrace --sort dual a.out

This PR is to resolve following issue.
#9

In fact, I'm reluctant on this patch.
First, the code is clean but not readable(in my opinion).
Second, the report is not kind to user.

Add 'dual' option for sort feature
'dual' option will report size as well as count sorted results
Usage example:
$ heaptrace --sort dual a.out

Signed-off-by: Bojun Seo <[email protected]>
@honggyukim
Copy link
Owner

Thanks for the PR, but I think printing both sort orders isn't related to --sort option. I will think about another approach and get back to you later.

honggyukim added a commit that referenced this pull request Jan 21, 2023
Bojun requested to make heaptrace support multiple sort keys because
sometimes it's useful to show the memory allocation status based on both
size and count orders.

If someone wants to show allocation status based on count and size, then
it can be requested as follows.

  $ heaptrace -s size,count <target program>

The sort orders can be separated by commas(',').

Another small change is that it removes heap traced allocation size.

Closes: #9, #11
Signed-off-by: Honggyu Kim <[email protected]>
@honggyukim
Copy link
Owner

I've merged the patches I mentioned at #9 so this can be closed.

@honggyukim honggyukim closed this Jan 21, 2023
@Bojun-Seo Bojun-Seo deleted the dual branch December 18, 2023 02:27
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.

2 participants