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

Refactor the printing of memory usage statistics #960

Merged

Conversation

akosthekiss
Copy link
Member

Make the internal heap and pools memory usage statistics APIs more
similar: how the print functions are named, where they are
implemented, and which parts of them are guarded by MEM_STATS.
Also, adapt unit tests to the changes.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss [email protected]

@akosthekiss akosthekiss added the enhancement An improvement label Mar 10, 2016
{
printf ("Pools stats:\n");
printf (" Chunk size: %zu\n"
" Pool chunks: %zu\n"
Copy link
Member

Choose a reason for hiding this comment

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

Why two printf?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've copied them over from existing code. Shall I rewrite them?

Copy link
Contributor

Choose a reason for hiding this comment

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

+1 to use one printf

@LaszloLango
Copy link
Contributor

LGTM

Make the internal heap and pools memory usage statistics APIs more
similar: how the print functions are named, where they are
implemented, and which parts of them are guarded by `MEM_STATS`.
Also, adapt unit tests to the changes.

JerryScript-DCO-1.0-Signed-off-by: Akos Kiss [email protected]
@akosthekiss akosthekiss force-pushed the mem-stats-print-refactor branch from e20f74e to 66c94b7 Compare March 11, 2016 09:53
@akosthekiss
Copy link
Member Author

Updated to use a single printf for each stat print.

@zherczeg
Copy link
Member

LGTM

@akosthekiss akosthekiss merged commit 66c94b7 into jerryscript-project:master Mar 11, 2016
@akosthekiss akosthekiss deleted the mem-stats-print-refactor branch March 11, 2016 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants