Fixed --mem-stats flag.

This commit is contained in:
Andrey Shitov
2015-03-30 11:31:09 +03:00
parent 9746b2fd76
commit ac7edde72e
4 changed files with 21 additions and 21 deletions
-3
View File
@@ -66,9 +66,6 @@ project (JerryCore CXX C ASM)
CONFIG_ECMA_COMPACT_PROFILE_DISABLE_JSON_BUILTIN
CONFIG_ECMA_COMPACT_PROFILE_DISABLE_REGEXP_BUILTIN)
# Memory statistics
set(DEFINES_JERRY_MEMORY_STATISTICS MEM_STATS)
# Valgrind
set(DEFINES_JERRY_VALGRIND JERRY_VALGRIND)
+5 -5
View File
@@ -72,11 +72,11 @@ mem_finalize (bool is_show_mem_stats) /**< show heap memory stats
" Peak pools: %lu\n"
" Peak allocated chunks: %lu\n\n",
MEM_POOL_CHUNK_SIZE,
stats.pools_count,
stats.allocated_chunks,
stats.free_chunks,
stats.peak_pools_count,
stats.peak_allocated_chunks);
(unsigned long) stats.pools_count,
(unsigned long) stats.allocated_chunks,
(unsigned long) stats.free_chunks,
(unsigned long) stats.peak_pools_count,
(unsigned long) stats.peak_allocated_chunks);
#endif /* MEM_STATS */
}
+10 -10
View File
@@ -973,17 +973,17 @@ mem_heap_print (bool dump_block_headers, /**< print block headers */
" Peak allocated chunks count = %lu\n"
" Peak allocated= %lu bytes\n"
" Peak waste = %lu bytes\n",
mem_heap_stats.size,
(uint64_t) mem_heap_stats.size,
(uint64_t) MEM_HEAP_CHUNK_SIZE,
mem_heap_stats.blocks,
mem_heap_stats.allocated_blocks,
mem_heap_stats.allocated_chunks,
mem_heap_stats.allocated_bytes,
mem_heap_stats.waste_bytes,
mem_heap_stats.peak_allocated_blocks,
mem_heap_stats.peak_allocated_chunks,
mem_heap_stats.peak_allocated_bytes,
mem_heap_stats.peak_waste_bytes);
(uint64_t) mem_heap_stats.blocks,
(uint64_t) mem_heap_stats.allocated_blocks,
(uint64_t) mem_heap_stats.allocated_chunks,
(uint64_t) mem_heap_stats.allocated_bytes,
(uint64_t) mem_heap_stats.waste_bytes,
(uint64_t) mem_heap_stats.peak_allocated_blocks,
(uint64_t) mem_heap_stats.peak_allocated_chunks,
(uint64_t) mem_heap_stats.peak_allocated_bytes,
(uint64_t) mem_heap_stats.peak_waste_bytes);
}
#else /* MEM_STATS */
(void) dump_stats;