History log of /external/valgrind/coregrind/m_debuginfo/priv_misc.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c474069560175a011af75868e0cbe66a6646f8a1 25-May-2015 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Some platforms such as x86 and amd64 have efficient unaligned access.
On these platforms, implement read_/write_<type> by doing a direct
access, rather than calling a function that will read or write
'byte per byte'.

For platforms that do not have efficient unaligned access,
or that do not support at all unaligned access, call function
readUAS_/writeUAS_<type> that works as before.

Currently, direct acecss is activated only for x86 and amd64.
Unclear what other platforms support (efficiently) unaligned access.

On unwind intensive code (such as perf/memrw on amd64), this patch
gives up to 5% improvement.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@15290 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/priv_misc.h
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/coregrind/m_debuginfo/priv_misc.h
518850bf0da07ed3e2244e307268ae0fd80e93a8 23-Oct-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Constify coregrind.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14656 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/priv_misc.h
bf0ea23aef2a2a1c5aac02ada367ca6f983cbcb7 14-Sep-2014 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> ML_(dinfo_zalloc/strdup) never return NULL. Remove pointless
asserts at call sites.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14534 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/priv_misc.h
0b9d0646949bd382758763664d3bf2d6115993ae 30-Jun-2014 philippe <philippe@a5019735-40e9-0310-863c-91ae7b9d1cf9> Implement VG_(arena_realloc_shrink) similar to realloc, but can
only decrease the size of a block, does not change the address,
does not need to alloc another block and copy the memory,
and (if big enough) makes the excess memory available for other
allocations.

VG_(arena_realloc_shrink) is then used for debuginfo storage.c
(replacing an allocation + copy).
Also use it in the dedup pool, to recuperate the unused
memory of the last pool.
This also allows to re-increase the string pool size to the original
3.9.0 value of 64Kb. All this slightly decrease the peak and in use
memory of dinfo.

VG_(arena_realloc_shrink) will also be used to implement (in another patch)
a dedup pool which "numbers" the allocated elements.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@14122 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/priv_misc.h
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/coregrind/m_debuginfo/priv_misc.h
535fb1b49a80f2e880f755ee618381de3e222ddf 15-Sep-2013 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Fix coregrind header files such that they can be included without
having to worry what other header files may have to be included
beforehand.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13549 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/priv_misc.h
1636d33c13958b9c0e7d3059cdd5005746418eb2 15-Nov-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Char/HChar fixups for m_debuginfo and m_gdbserver.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13122 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/priv_misc.h
54fe2021b87b9e5edb8ec8070f47b86d5cafb8aa 28-Oct-2012 florian <florian@a5019735-40e9-0310-863c-91ae7b9d1cf9> Char/HChar and constness fixes. Mostly cost center
on allocators which is always a const HChar *


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13089 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/priv_misc.h
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/coregrind/m_debuginfo/priv_misc.h
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/coregrind/m_debuginfo/priv_misc.h
86781fabbfc019b752f9605e487cfce77b2a592a 05-Oct-2011 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> More fixes for unaligned accesses in the debuginfo code. BZ#282527.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12102 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/priv_misc.h
fd892fc2654e6eae5e40f401a230e0fb80d6362f 02-Oct-2011 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Add read_Addr and use it so that we work on systems where an address
is bigger that an int.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12084 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/priv_misc.h
d32fb2b481ee4eda50a62e49d25199e0174940e0 02-Oct-2011 tom <tom@a5019735-40e9-0310-863c-91ae7b9d1cf9> Move read_<type> routines from readdwarf.c to be module level
routines in misc.c so that other parts of the debuginfo module
can access them.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@12081 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/priv_misc.h
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/coregrind/m_debuginfo/priv_misc.h
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/coregrind/m_debuginfo/priv_misc.h
50fde23467d92281b32dd537d0d9a590263628c3 20-Oct-2008 sewardj <sewardj@a5019735-40e9-0310-863c-91ae7b9d1cf9> Dwarf3 variable & type reader: use 64-bit numbers throughout to
represent the sizes of types, even on 32-bit hosts, where a type with
a size >= 2^32 is, well, if not meaningless, then at least impossible
to instantiate. This is of course motivated by reality .. on ppc32
SUSE11.0, the debuginfo for glibc-2.8 appears to contain a declaration
amounting to

char __EH_FRAME_BEGIN__ [4294967296]

Really.



git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8683 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/priv_misc.h
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/coregrind/m_debuginfo/priv_misc.h
5dd8e6ab3b998e323eb293e561b62505a44f3144 22-Mar-2008 bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> Moved macro's that specify branch prediction hints to include/pub_tool_basics.h

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7745 a5019735-40e9-0310-863c-91ae7b9d1cf9
/external/valgrind/coregrind/m_debuginfo/priv_misc.h
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/coregrind/m_debuginfo/priv_misc.h