Skip to content

Commit

Permalink
Add units to Callgrind label for memory size and update BlockCount
Browse files Browse the repository at this point in the history
…to `Call_Count` (#95)


Co-authored-by: Arnaud Le Blanc <[email protected]>
  • Loading branch information
samlitowitz and arnaud-lb authored Nov 30, 2023
1 parent 877dfc4 commit 00984ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions memprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -1507,11 +1507,11 @@ static zend_bool dump_callgrind(php_stream * stream) {
size_t total_count;

return (
stream_printf(stream, "version: 1\n") &&
stream_printf(stream, "cmd: unknown\n") &&
stream_printf(stream, "positions: line\n") &&
stream_printf(stream, "events: MemorySize BlocksCount\n") &&
stream_printf(stream, "\n") &&
stream_printf(stream, "version: 1\n") &&
stream_printf(stream, "cmd: unknown\n") &&
stream_printf(stream, "positions: line\n") &&
stream_printf(stream, "events: Memory_Size_(bytes) BlocksCount\n") &&
stream_printf(stream, "\n") &&

dump_frame_callgrind(stream, &root_frame, "root", &total_size, &total_count) &&

Expand Down
2 changes: 1 addition & 1 deletion tests/003.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Warning: Calling memprof_enable() manually may not work as expected because of P
version: 1
cmd: unknown
positions: line
events: MemorySize BlocksCount
events: Memory_Size_(bytes) BlocksCount

fl=%s/tests/common.php
fn=Eater::eat
Expand Down

0 comments on commit 00984ee

Please sign in to comment.