Massif verbose output showing the code location that increases the stack.
488026 Use of `sizeof` instead of `strlen
488379 --track-fds=yes errors that cannot be suppressed with --xml-file=
488441 Add tests for --track-fds=yes --xml=yes and fd suppression tests
+489040 massif trace change to show the location increasing the stack
To see details of a given bug, visit
https://bugs.kde.org/show_bug.cgi?id=XXXXXX
be done:
InlIPCursor *iipc = VG_(new_IIPC)(ep, eip);
do {
- buf = VG_(describe_IP)(eip, iipc);
+ buf = VG_(describe_IP)(ep, eip, iipc);
... use buf ...
} while (VG_(next_IIPC)(iipc));
VG_(delete_IIPC)(iipc);
- To only describe eip, without the inlined calls at eip, give a NULL iipc:
- buf = VG_(describe_IP)(eip, NULL);
+ To only describe eip, without the inlined calls at eip, give a NULL iipc, e.g.:
+ buf = VG_(describe_IP)(VG_(current_DiEpoch)(), eip, NULL);
Note, that the returned string is allocated in a static buffer local to
VG_(describe_IP). That buffer will be overwritten with every invocation.
true, but doing otherwise accurately is difficult. Furthermore,
starting at zero better indicates the size of the part of the main
stack that a user program actually has control over.</para>
+ <para>If you give at least 4 <option>-v</option> verbosity arguments,
+ then massif produces a trace for each stack increase and decrease.
+ The stack increase trace contains the IP address that increased the stack.
+ Note that to get fully precise IP address, you must specify the options
+ <option>-px-default=unwindregs-at-mem-access
+ --px-file-backed=unwindregs-at-mem-access</option>.
+ </para>
</listitem>
</varlistentry>
static INLINE void new_mem_stack_2(SizeT len, const HChar* what)
{
if (have_started_executing_code) {
- VERB(3, "<<< new_mem_stack (%lu)\n", len);
+ if (UNLIKELY(VG_(clo_verbosity) > 3)) {
+ const ThreadId cur_tid = VG_(get_running_tid) ();
+ const Addr cur_IP = VG_(get_IP) (cur_tid);
+ VERB(3, "<<< new_mem_stack (%lu) tid %u IP %s\n",
+ len, cur_tid,
+ VG_(describe_IP)(VG_(current_DiEpoch)(), cur_IP, NULL));
+ }
n_stack_allocs++;
update_stack_stats(len);
maybe_take_snapshot(Normal, what);