Go to file
Dean Michael Berris 01fd7c8bd4 [XRay][CodeGen] Use the current function symbol as the associated symbol for the instrumentation map
Summary:
XRay had been assuming that the previous section is the "text" section
of the function when lowering the instrumentation map. Unfortunately
this is not a safe assumption, because we may be coming from lowering
debug type information for the function being lowered.

This fixes an issue with combining -gsplit-dwarf, -generate-type-units,
-debug-compile and -fxray-instrument for sole member functions. When the
split dwarf section is stripped, we're left with references from the
xray_instr_map to the debug section. The change now uses the function's
symbol instead of the previous section's start symbol.

We found the bug while attempting to strip the split debug sections off
an XRay-instrumented object file, which had a peculiar edge-case for
single-function classes where the single function is being lowered.
Because XRay had assocaited the instrumentation map for a function to
the debug types section instead of the function's section, the objcopy
call will fail due to the misplaced reference from the xray_instr_map
section.

Reviewers: pcc, dblaikie, echristo

Subscribers: llvm-commits, aprantl

Differential Revision: https://reviews.llvm.org/D37791

llvm-svn: 313233
2017-09-14 07:08:23 +00:00
clang [Headers] Fix the return type of _InterlockedCompareExchange_rel 2017-09-14 07:04:59 +00:00
clang-tools-extra [clang-tidy] fixed misc-unused-parameters omitting parameters default value 2017-09-13 14:55:13 +00:00
compiler-rt [sanitizer] Move IsStackOverflow into SignalContext 2017-09-14 03:23:02 +00:00
debuginfo-tests Restrict debuginfo-tests to native configurations. 2017-09-08 17:10:48 +00:00
libclc Add native_recip(x) as ((1)/(x)) 2017-09-13 01:40:25 +00:00
libcxx Use CMAKE_AR instead of the system default 'ar' for merging static libraries 2017-09-13 06:55:44 +00:00
libcxxabi Reland "When built with ASan, __cxa_throw calls __asan_handle_no_return" 2017-09-13 23:35:07 +00:00
libunwind Revert r312240 2017-08-31 15:51:23 +00:00
lld Remove {get,set}Align accessor functions and use Alignment member variable instead. 2017-09-13 21:54:55 +00:00
lldb Commands are -d to break modify, not -C. 2017-09-14 00:27:36 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm [XRay][CodeGen] Use the current function symbol as the associated symbol for the instrumentation map 2017-09-14 07:08:23 +00:00
openmp Read blocktime value set by kmp_set_blocktime() before reading from KMP_BLOCKTIME 2017-09-05 15:45:48 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly Unroll and separate the remaining parts of isolation 2017-09-11 17:46:47 +00:00