Fix 376257 - helgrind history full speed up using a cached stack

This patch implements the flag --delta-stacktrace=yes/no.
Yes indicates to calculate the full history stack traces by
changing just the last frame if no call/return instruction was
executed.
This can speed up helgrind by up to 25%.

This flags is currently set to yes only on linux x86 and amd64, as some
platform dependent validation of the used heuristics is needed before
setting the default to yes on a platform. See function check_cached_rcec_ok
in libhb_core.c for more details about how to validate/check the behaviour
on a new platform.
This commit is contained in:
Philippe Waroquiers
2017-11-02 21:33:35 +01:00
parent 6a55b1e82c
commit 619fb35df7
15 changed files with 665 additions and 86 deletions

View File

@@ -61,6 +61,20 @@ extern void VG_(assert_fail) ( Bool isCore, const HChar* expr, const HChar* file
Int line, const HChar* fn,
const HChar* format, ... );
/* Show the state of various threads related information, such
as the guest stacktrace for each thread.
Mostly for debugging V.
The following activates optional output:
host_stacktrace : shows the host stacktrace.
stack_usage True means:
shows how much of the valgrind stack was used.
shows the client stack range
exited_thread_slots : show information for thread slots that were used
but the thread has now exited. */
extern void VG_(show_sched_status) ( Bool host_stacktrace,
Bool stack_usage,
Bool exited_threads);
#endif // __PUB_TOOL_LIBCBASSERT_H
/*--------------------------------------------------------------------*/