|
From: <sv...@va...> - 2016-10-05 14:58:15
|
Author: sewardj
Date: Wed Oct 5 15:58:08 2016
New Revision: 16022
Log:
Merge from trunk:
r16006 dhat: add "tot-blocks-allocd" metric
Modified:
branches/VALGRIND_3_12_BRANCH/ (props changed)
branches/VALGRIND_3_12_BRANCH/exp-dhat/dh_main.c
branches/VALGRIND_3_12_BRANCH/exp-dhat/docs/dh-manual.xml
Modified: branches/VALGRIND_3_12_BRANCH/exp-dhat/dh_main.c
==============================================================================
--- branches/VALGRIND_3_12_BRANCH/exp-dhat/dh_main.c (original)
+++ branches/VALGRIND_3_12_BRANCH/exp-dhat/dh_main.c Wed Oct 5 15:58:08 2016
@@ -1065,8 +1065,9 @@
" sort the allocation points by the metric\n"
" defined by <string>, thusly:\n"
" max-bytes-live maximum live bytes [default]\n"
-" tot-bytes-allocd total allocation (turnover)\n"
+" tot-bytes-allocd bytes allocated in total (turnover)\n"
" max-blocks-live maximum live blocks\n"
+" tot-blocks-allocd blocks allocated in total (turnover)\n"
);
}
@@ -1175,6 +1176,9 @@
static ULong get_metric__max_blocks_live ( APInfo* api ) {
return api->max_blocks_live;
}
+static ULong get_metric__tot_blocks ( APInfo* api ) {
+ return api->tot_blocks;
+}
/* Given a string, return the metric-access function and also a Bool
indicating whether we want increasing or decreasing values of the
@@ -1200,6 +1204,11 @@
*increasingP = False;
return True;
}
+ if (0 == VG_(strcmp)(metric_name, "tot-blocks-allocd")) {
+ *get_metricP = get_metric__tot_blocks;
+ *increasingP = False;
+ return True;
+ }
return False;
}
Modified: branches/VALGRIND_3_12_BRANCH/exp-dhat/docs/dh-manual.xml
==============================================================================
--- branches/VALGRIND_3_12_BRANCH/exp-dhat/docs/dh-manual.xml (original)
+++ branches/VALGRIND_3_12_BRANCH/exp-dhat/docs/dh-manual.xml Wed Oct 5 15:58:08 2016
@@ -372,16 +372,17 @@
allocation points according to some metric, and shows the
highest scoring entries. <varname>--sort-by</varname>
selects the metric used for sorting:</para>
- <para><varname>max-bytes-live </varname> maximum live bytes [default]</para>
- <para><varname>tot-bytes-allocd </varname> total allocation (turnover)</para>
- <para><varname>max-blocks-live </varname> maximum live blocks</para>
+ <para><varname>max-bytes-live </varname> maximum live bytes [default]</para>
+ <para><varname>tot-bytes-allocd </varname> bytes allocates in total (turnover)</para>
+ <para><varname>max-blocks-live </varname> maximum live blocks</para>
+ <para><varname>tot-blocks-allocd </varname> blocks allocated in total (turnover)</para>
<para>This controls the order in which allocation points are
displayed. You can choose to look at allocation points with
- the highest maximum liveness, or the highest total turnover, or
- by the highest number of live blocks. These give usefully
- different pictures of program behaviour. For example, sorting
- by maximum live blocks tends to show up allocation points
- creating large numbers of small objects.</para>
+ the highest number of live bytes, or the highest total byte turnover, or
+ by the highest number of live blocks, or the highest total block
+ turnover. These give usefully different pictures of program behaviour.
+ For example, sorting by maximum live blocks tends to show up allocation
+ points creating large numbers of small objects.</para>
</listitem>
</varlistentry>
|