History log of /external/valgrind/callgrind/fn.c
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
f4384f47ee6b6234dba548a775585c37af712edf 16-Dec-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Simplify the VG_(get_filename_linenum) interface by removing
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
/external/valgrind/callgrind/fn.c
10ef725f1e8e9f1615c483555348eb75b69c4713 27-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge revisions 14255, 14293, and 14294 from the BUF_REMOVAL branch to trunk.
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
/external/valgrind/callgrind/fn.c
536e3d733b5fa756266321e14d67b6df742af8de 26-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge r14289 from the BUF_REMOVAL branch to trunk.
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
/external/valgrind/callgrind/fn.c
46cc04521acf2827eb33310fadc119bf2dc039e4 25-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge r14202 from the BUF_REMOVAL branch to trunk.
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
/external/valgrind/callgrind/fn.c
0f157ddb404bcde7815a1c5bf2d7e41c114f3d73 18-Oct-2013 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates (20XY-2012 ==> 20XY-2013)


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13658 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
3e7986312a0ffc7646b0552d4c4ea3744a870e73 24-Nov-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix some casts that removed const-ness as pointed out by
GCC's -Wcast-qual.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13138 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
19f91bbaedb4caef8a60ce94b0f507193cc0bc10 10-Nov-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix more Char/HChar mixups. Closing in...


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13119 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
dbb3584f591710a15a437918c0fc27e300993566 27-Oct-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> More Char/HChar fixes and constification.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13088 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
25f6c57962b259a52e3e617eb96fa14d6fdbe364 21-Oct-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix a few Char/HChar mixups in callgrind.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13069 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
03f8d3fc25f5a45c5826259d1b33b7f310117279 05-Aug-2012 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates to include 2012.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12843 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
ec062e8d96a361af9905b5447027819dfbfee01a 23-Oct-2011 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update all copyright dates, from 20xy-2010 to 20xy-2011.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12206 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
9eecbbb9a9cbbd30b903c09a9e04d8efc20bda33 03-May-2010 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates to 2010.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11121 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
e3f1e5988a94af9230f67273ca9236c4d7e8b8da 31-Jul-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> (almost completely just function renaming):

* VG_(find_seginfo): incrementally rearrange the DebugInfo list, like
most of the other list-searching functions do.

* rename all VG_(*seginfo*) functions exported from m_debuginfo to
VG_(*DebugInfo*). "seginfo" was a historical name which was mostly
but not completely, done away with some time back.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10678 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
0f33adf91a51bfedbd1d2ec40014c9c470fa5b0e 15-Jul-2009 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge callgrind/ changes from branches/MESSAGING_TIDYUP r10464.
See trunk r10465 commit message for details.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10471 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
0b23d6eb63a4146dfa17304a2e76ce91f4d5e001 15-Jun-2009 weidendo <weidendo@a5019735-40e9-0310-863c-91ae7b9d1cf9> Avoid variable name "new", use more concrete name instead

Also confusing for syntax highlighter/indexer of some editors/IDEs

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10320 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
ae54ba4720e5f1b4c3391a343b5139d91021946e 18-May-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Whitespace tweak.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9891 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
85f79da547f4b5755061429e970941fbe2803548 18-May-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge part of r9250 (add unused attribute to callgrind/fn.c:check_code()
from the DARWIN branch.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9890 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
9f207460d70d38c46c9e81996a3dcdf90961c6db 10-Mar-2009 njn <njn@a5019735-40e9-0310-863c-91ae7b9d1cf9> Updated copyright years.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@9344 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
234780c1f9b86bb5b809fd874c0f3712c606bec4 18-Dec-2008 weidendo <weidendo@a5019735-40e9-0310-863c-91ae7b9d1cf9> Callgrind: add code pattern for runtime_resolve on OpenSuse11.0/x86

OpenSuse 11.0 has glibc 2.8, which changed the assembly code for
runtime_resolve. This patch rearranges the code search such that
multiple variants can be scanned.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8841 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
9c606bd8634cd6b67bb41fa645b5c639668cfa2d 18-Sep-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge all remaining changes from branches/PTRCHECK. These are some
relatively minor extensions to m_debuginfo, a major overhaul of
m_debuginfo/readdwarf3.c to get its space usage under control, and
changes throughout the system to enable heap-use profiling.

The majority of the merged changes were committed into
branches/PTRCHECK as the following revs: 8591 8595 8598 8599 8601 and
8161.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8621 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
a0b6b2cf9abc7b0d87be1215a245eaccc0452af9 07-Jul-2008 bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merged FORMATCHECK branch (r8368) to trunk.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8369 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
b8b79addf04dd5d0b558916e26df0b1927cbd758 03-Mar-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Merge in the DATASYMS branch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7540 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
4d474d086188fd1f29fa97dbd84d8ea2e589a9b8 11-Feb-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates ("200X-2007" --> "200X-2008").


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7398 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
3db4322b64387313672aa525deb6c3c04fcf1134 17-Sep-2007 weidendo <weidendo@a5019735-40e9-0310-863c-91ae7b9d1cf9> callgrind: Use directory in debug info when available

Prepend the file name of a source file with the directory
if that is available. This not only gets rid of problems with the
same file name used in different paths of a project, but lets
the annotation work out of the box without having to specify any
source directory.
Works both with callgrind_annotate and KCachegrind without any
changes there.

Inspired by Nick's change to cachegrind doing the same thing
in r6839 (and gets rid of a FIXME in the source)



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6850 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
9ebd6e0c607fa30301b1325874eb8de871c21cc5 08-Jan-2007 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Update copyright dates.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6488 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
45057907429928e628b9934079a62e59d3df7242 06-Jun-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> More copyright updates.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5955 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
8c2a6cacabcfb1271a9f8f83d10e2f3a46941eed 22-May-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Change ifdefs to select per-platform, not per-arch.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5918 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
a59aeefbfedf81257a164c234ff55743a56099b7 22-May-2006 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix crash on ppc64-linux.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5917 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
a762b0f082d37b630c72d1d6388b34f76c851c76 01-May-2006 weidendo <weidendo@a5019735-40e9-0310-863c-91ae7b9d1cf9> Callgrind: Improve self-hosting with outer callgrind tool

This adds an option to change the default handling of jumps
between functions. Usually, a jump between functions is
interpreted as call, because such jumps are typically
generated by compilers on tail recursion optimization, and
we want to present this as call to the user. Thus, such
a jump pushes a call onto callgrinds shadow stack.
The option "--pop-on-jump" changes this to pop+push the
shadow callstack: then, a jump between functions is seen
as a return to the caller and a new call.

The default behaviour is _bad_ for using callgrind with
self-hosting. Valgrinds inner loop VG_(run_innerloop)
jumps to generated code, and this code jumps back to
the inner loop. Thus, every executed BB adds 2 calls
to an ever increasing shadow call stack, leading to
memory consumption increasing with runtime :-(

So: For self-hosting valgrind with an outer callgrind,
always use option "--pop-on-jump" for the outer callgrind.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5869 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c
a17f2a36b7fde9ee842f92412eacbf94b66af59d 20-Mar-2006 weidendo <weidendo@a5019735-40e9-0310-863c-91ae7b9d1cf9> Callgrind merge: code


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5780 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/callgrind/fn.c