diff options
author | sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2010-10-13 14:04:25 +0000 |
---|---|---|
committer | sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2010-10-13 14:04:25 +0000 |
commit | eb795f8c30b460f84ba1ceee8437f2b29981b7bb (patch) | |
tree | 6f4ca4e67d8f47bf3baf11b0666be1b8c8420a8e /exp-dhat | |
parent | 813e31d2068c6c8f65cbf3e7cd31822b94e1c073 (diff) |
* cosmetic output changes
* add an assertion that the core block lookup routine works sanely
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11436 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'exp-dhat')
-rw-r--r-- | exp-dhat/dh_main.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/exp-dhat/dh_main.c b/exp-dhat/dh_main.c index 60a24288..28e6d8ca 100644 --- a/exp-dhat/dh_main.c +++ b/exp-dhat/dh_main.c @@ -114,7 +114,9 @@ static Block* find_Block_containing ( Addr a ) return NULL; tl_assert(foundval == 0); // we don't store vals in the interval tree tl_assert(foundkey != 1); - return (Block*)foundkey; + Block* res = (Block*)foundkey; + tl_assert(res != &fake); + return res; } // delete a block; asserts if not found. (viz, 'a' must be @@ -959,7 +961,7 @@ static void dh_print_usage(void) " --sort-by=string\n" " sort the allocation points by the metric\n" " defined by <string>, thusly:\n" -" max-bytes-live maximum live bytes\n" +" max-bytes-live maximum live bytes [default]\n" " tot-bytes-allocd total allocation (turnover)\n" " max-blocks-live maximum live blocks\n" ); @@ -997,9 +999,9 @@ static void show_APInfo ( APInfo* api ) bufA[0] = 'N'; bufA[1] = 'a'; bufA[2] = 'N'; } - VG_(umsg)("max_live: %'llu in %'llu blocks\n", + VG_(umsg)("max-live: %'llu in %'llu blocks\n", api->max_bytes_live, api->max_blocks_live); - VG_(umsg)("tot_alloc: %'llu in %'llu blocks (avg size %s)\n", + VG_(umsg)("tot-alloc: %'llu in %'llu blocks (avg size %s)\n", api->tot_bytes, api->tot_blocks, bufA); tl_assert(api->tot_blocks >= api->max_blocks_live); @@ -1033,7 +1035,7 @@ static void show_APInfo ( APInfo* api ) VG_(pp_ExeContext)(api->ap); if (api->histo && api->xsize_tag == Exactly) { - VG_(umsg)("\nAggregated access counts by offset\n"); + VG_(umsg)("\nAggregated access counts by offset:\n"); VG_(umsg)("\n"); UWord i; if (api->xsize > 0) |