aboutsummaryrefslogtreecommitdiff
path: root/callgrind
AgeCommit message (Collapse)Author
2015-09-07Rephrase Callgrind manual about limiting event aggregationweidendo
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15637 a5019735-40e9-0310-863c-91ae7b9d1cf9
2015-08-21Update copyright dates, to include 2015. No functional change.sewardj
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15577 a5019735-40e9-0310-863c-91ae7b9d1cf9
2015-08-05Fix printf format inconsistencies as pointed out by gcc -Wformat-signedness.florian
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15498 a5019735-40e9-0310-863c-91ae7b9d1cf9
2015-07-21Bug 345248 - add support for Solaris OS in valgrindsewardj
Authors of this port: Petr Pavlu setup@dagobah.cz Ivo Raisr ivosh@ivosh.net Theo Schlossnagle theo@omniti.com git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15426 a5019735-40e9-0310-863c-91ae7b9d1cf9
2015-07-05Fix typos in source code. Patch by Dmitriy (olshevskiy87@bk.ru).florian
Fixes BZ #349874 git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15394 a5019735-40e9-0310-863c-91ae7b9d1cf9
2015-06-26Minor shuffling in Callgrind format docweidendo
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15360 a5019735-40e9-0310-863c-91ae7b9d1cf9
2015-06-26Complete/Fix Callgrind format specification.weidendo
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15358 a5019735-40e9-0310-863c-91ae7b9d1cf9
2015-02-18Fix Bug #344314 callgrind_annotate ... commands containing newlinesweidendo
Escape newlines in command arguments for "cmd:" header field in dumps We could do unescaping in callgrind_annotate, but a escaped command even seems better there. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14947 a5019735-40e9-0310-863c-91ae7b9d1cf9
2015-02-13Add command line flag --max-threads=<integer> to increase the number offlorian
threads that valgrind can handle. No recompile is needed. Part of fixing BZ #337869. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14932 a5019735-40e9-0310-863c-91ae7b9d1cf9
2015-02-06Fix undefined behaviours when shifting.florian
Found by libubsan. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14913 a5019735-40e9-0310-863c-91ae7b9d1cf9
2015-02-05Allow the user to specify precise-exception behaviour for translationssewardj
made from file-backed mappings (AOT code, basically) that is different from the default behaviour as specified by --vex-iropt-register-updates. New flag is --px-file-backed=, with the same possible args as --vex-iropt-register-updates has. Add a new flag --px-default, which is a short alias for --vex-iropt-register-updates. Add one line of stats output when --stats=yes, showing counts of how many translations have been made under each of the 4 different PX optimisation settings. No user-visible change if you don't use the new flags. Relies on VEX API change in r3084. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14906 a5019735-40e9-0310-863c-91ae7b9d1cf9
2015-01-13Export VG_(discard_tranalsations_safely) to the tools. It isflorian
only allowed to be called in certain contexts which is enforced at runtime. Change callgrind accordingly. New header file pub_tool_transtab.h added. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14867 a5019735-40e9-0310-863c-91ae7b9d1cf9
2015-01-08Add VG_(gettimeofday) such that callgrind can use it withoutflorian
a bloody hack. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14857 a5019735-40e9-0310-863c-91ae7b9d1cf9
2015-01-08Callgrind: fix BB discardingweidendo
When the info struct for a BB is created, we use the first guest instruction address as key to insert the info into a hash table. We should do the same when discarding. This actually is not a real problem, as Callgrind obviously is used very rarely with redirections. But we should be consistent with cachegrind. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14856 a5019735-40e9-0310-863c-91ae7b9d1cf9
2015-01-04Change most remaining use of Addr64 in coregrind and the tools to Addr.florian
Tracking VEX r3056. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14846 a5019735-40e9-0310-863c-91ae7b9d1cf9
2015-01-02Track the IMark changes in VEX r3055.florian
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14844 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-12-19Buffer audit. Resize a few.florian
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14824 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-12-16Simplify the VG_(get_filename_linenum) interface by removingflorian
the dirname_available parameter. It's redundant. The value of the returned directory name can be tested instead. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14814 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-12-14Remove callgrind's percentify and commify functions as well as theflorian
assorted buffers that go with them. Part of fixing BZ #337869. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14810 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-12-12Add limited support for printing floating point numbers toflorian
VG_(debugLog_vprintf). Remove function VG_(percentify) and fix up its call sites (part of fixing BZ #337869. Allow the width in a format specification to be '*', i.e. the width is given as an additional function argument. The limitations for printing floating point numbers are: (1) %f is the only supported format. Width and precision can be specified. (2) Funny numbers (NaN and such) are not supported. (3) Floating point numbers need to be benign in the sense that their integral part fits into an ULong. This is good enough for our purposes. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14806 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-11-29Fix BZ 334802. Patch by Mark Wielaard with a few mods to make it apply.florian
r14794 is related as well. Also: remove -Wno-format-zero-length from compile options. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14795 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-11-13Audit two buffer sizes.florian
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14720 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-11-13Merge revisions 14445 and 14446 from the BUF_REMOVAL branch to trunk.florian
Two things: - remove the buffer argument from VG_(DebugInfo_sect_kind) - allocate AddrInfo::SectKind::objname dynamically git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14719 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-11-11Merge r14340,14346-14348,14352,14354-14355 from the BUF_REMOVAL branch toflorian
trunk. Convert callgrind to use VG_(fprintf). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14713 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-11-06Merge revisions 14366 and 14367 from the BUF_REMOVAL branch to trunk.florian
In function dump_state_togdb use VG_(gdb_printf) directly. No need to write to a buffer first. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14700 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-11-06Merge revisions 14344 and 14345 from the BUF_REMOVAL branch to trunk.florian
Basically: CLG_(sprint_eventmapping) --> CLG_(eventmapping_as_string) CLG_(sprint_mappingcost) --> CLG_(mappingcost_as_string) The new functions return the string in a dynamically allocated buffer that caller ought to free. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14699 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-11-04Merge r14339 from BUF_REMOVAL branch to trunk.florian
Prepare print_file function to be converted to use VG_(fprintf). Basically get rid of arithmetic involving the output buffer. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14687 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-10-27Merge revisions 14255, 14293, and 14294 from the BUF_REMOVAL branch to trunk.florian
The functions VG_(get_filename) and VG_(get_filename_lineno) now return a pointer to filename and directory name instead of copying them into buffers passed in from the caller. The returned strings are persistent as long as the DebugInfo to which they belong is not discarded. The caller therefore needs to stash them away as needed. Function VG_(strncpy_safely) has been removed as it is no longer needed. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14668 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-10-26Merge r14289 from the BUF_REMOVAL branch to trunk.florian
Change CLG_(get_debug_info) to not build up an absolute pathname in its 'file' parameter. Instead give it an additional parameter to hold the directory name. Callers can then build up the absolute pathname if needed. This change will come in handy soonish when VG_(get_filename_lineno) will be changed and those buffers will disappear. The change has a bit of ripple to get_fn_node_inseg and CLG_(get_file_node). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14666 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-10-25Merge r14202 from the BUF_REMOVAL branch to trunk.florian
This patch changes the interface and behaviour of VG_(demangle) and VG_(maybe_Z_demangle). Instead of copying the demangled name into a fixed sized buffer that is passed in from the caller (HChar *buf, Int n_buf), the demangling functions will now return a pointer to the full-length demangled name (HChar **result). It is the caller's responsiblilty to make a copy if needed. This change in function parameters ripples upward - first: to get_sym_name - then to the convenience wrappers - VG_(get_fnname) - VG_(get_fnname_w_offset) - VG_(get_fnname_if_entry) - VG_(get_fnname_raw) - VG_(get_fnname_no_cxx_demangle) - VG_(get_datasym_and_offset) The changes in foComplete then forces the arguments of - VG_(get_objname) to be changed as well There are some issues regarding the ownership and persistence of character strings to consider. In general, the returned character string is owned by "somebody else" which means the caller must not free it. Also, the caller must not modify the returned string as it possibly points to read only memory. Additionally, the returned string is not necessarily persistent. Here are the scenarios: - the returned string is a demangled function name in which case the memory holding the string will be freed when the demangler is called again. - the returned string hangs off of a DebugInfo structure in which case it will be freed when the DebugInfo is discarded - the returned string hangs off of a segment in the address space manager in which case it may be overwritten when the segment is merged with another segment So the rule of thunb here is: if in doubt strdup the string. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14664 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-10-01Merge revisions 14337, 14596 from the BUF_REMOVAL branch to trunk.florian
Change callgrind's init_cmdbuf function to allocate a large enough buffer for the command line. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14597 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-09-30Merge six easy pieces from the BUF_REMOVAL branch:florian
r14271 Audit a few buffer sizes, increase one. r14280 Audit buffer size. r14296 Remove a few unneeded header files. r14310 Replace fixed size buffers with a large enough buffers. r14338 Remove a dead assignment in print_bbcs and make global variable print_fd a local variable. r14359 Remove a benign macro redefinition in cachegrind. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14595 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-09-24Ripple from constifying parameters of instrumentation functions andflorian
callbacks from VexTranslateArgs. See VEX r2958. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14564 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-09-12VG_(malloc/calloc/strdup) never return NULL (and never will).florian
So it's pointless to test or assert their return values. Remove code doing so. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14528 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-09-11Remove some unneded checks as identified by IBM's BEAM checker.florian
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14518 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-09-07update callgrind and cachegrind filtering logic following rev 14469philippe
rev 14469 gives better description of the tweak done to the simulated cache. Update filtering logic to filter this (variable) tweaking msg. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14486 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-08-25Cleanup: remove unused macros.florian
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14360 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-08-23Remove unused functions and prototypes.florian
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14342 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-08-23Remove unused function CLG_(sprint_cost).florian
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14341 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-08-22Cleanup. Cost array was never called anyway.weidendo
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14334 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-08-22Remove benign macro redefinition.florian
Give current_jccs internal linkage. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14332 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-08-22Align header comment with other filesweidendo
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14330 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-08-20Clean up confusion about VG_(args_the_exename) which was believed toflorian
possibly be NULL in several places. Nowadays, VG_(ii_create_image) will terminate the process if VG_(args_the_exename) is NULL. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14323 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-08-20Remove unused functions CLG_(get_out_file) and CLG_(get_out_directory).florian
Looks like these were leftovers from early days -- perhaps r7235. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14321 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-08-18Remove a few unused macro definitions.florian
Move exported global variables to the proper section in the header file. No functional change. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14306 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-06-23Update the copyright notice in files ending in '.in' because theflorian
script change-copyright-year did not handle them. Update the script as well. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14087 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-06-20Remove unused function swapfunc().sewardj
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14066 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-03-19VG_(strlen) ( const HChar* str ) does not count the null terminator '\0' at thedejanj
end of the string, so we need to add an extra element in string 's' for the null terminator. VG_(strcpy) ( HChar* dest, const HChar* src ) function copies the string pointed to by src, including the null terminator ('\0'), to the buffer pointed to by dest. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13880 a5019735-40e9-0310-863c-91ae7b9d1cf9
2014-01-11add --vgdb-prefix arg to callgrind_controlphilippe
If valgrind is started with --vgdb-prefix arg, then callgrind_control cannot find and control this valgrind. So, add an (optional) argument to callgrind_control, and have callgrind tool report the needed vgdb prefix argument if the user supplied this arg. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13769 a5019735-40e9-0310-863c-91ae7b9d1cf9
2013-12-17Callgrind: support printing stats via vgdbweidendo
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13763 a5019735-40e9-0310-863c-91ae7b9d1cf9