Skip to content

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 akiss@inf.u-szeged.hu

@akosthekiss akosthekiss added the enhancement An improvement label Mar 10, 2016
mem_pools_stats_print (void)
{
printf ("Pools stats:\n");
printf (" Chunk size: %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 akiss@inf.u-szeged.hu
@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