Displaying 10 results from an estimated 10 matches for "__llvm_profile_raw_version".
2018 May 09
2
lld + ThinLTO + fprofile-generate causes duplicate symbol errors
...ing Peter to comment on the linker resolution issue.
>From adding save-temps, it looks like lld and gold are giving different
resolutions to the symbols, which is presumably creating this issue:
(first file is with lld and second is with gold)
$ diff a.out.resolution.txt gold/
4c4
< -r=a.o,__llvm_profile_raw_version,plx
---
> -r=a.o,__llvm_profile_raw_version,l
8,9c8,9
< -r=b.o,__llvm_profile_raw_version,x
< -r=b.o,__llvm_profile_filename,x
---
> -r=b.o,__llvm_profile_raw_version,l
> -r=b.o,__llvm_profile_filename,l
I.e. with lld they are all marked as exported.
Peter, any ideas?
Teresa
On...
2018 May 09
2
lld + ThinLTO + fprofile-generate causes duplicate symbol errors
The duplicate symbol errors are for __llvm_profile_filename and
__llvm_profile_raw_version.
IIUC, these are supposed to be weak symbols but Thin LTO seems to break
this in some way. This does't happen with gold or no LTO or full LTO.
$ cat > a.c
extern int foo();
int main() {
return foo();
}
$ cat > b.c
int foo() {
return 0;
}
$ clang a.c -fprofile-generate -flto=thin...
2018 May 09
0
lld + ThinLTO + fprofile-generate causes duplicate symbol errors
The problem is that ThinLTO is not dropping the non-prevailing definitions,
and they end up being emitted into the object file for b.o.
$ ../ra/bin/llvm-dis -o - b.o0.0.preopt.bc | grep __llvm_prof
$__llvm_profile_raw_version = comdat any
$__llvm_profile_filename = comdat any
@__llvm_profile_raw_version = constant i64 72057594037927940, comdat
@__llvm_profile_filename = constant [19 x i8] c"default_%m.profraw\00",
comdat
lld ignores comdats in LTO object files because it expects all comdats to
have already be...
2018 May 11
1
lld + ThinLTO + fprofile-generate causes duplicate symbol errors
...9, 2018 at 11:26 AM Peter Collingbourne <peter at pcc.me.uk> wrote:
> The problem is that ThinLTO is not dropping the non-prevailing
> definitions, and they end up being emitted into the object file for b.o.
>
> $ ../ra/bin/llvm-dis -o - b.o0.0.preopt.bc | grep __llvm_prof
> $__llvm_profile_raw_version = comdat any
> $__llvm_profile_filename = comdat any
> @__llvm_profile_raw_version = constant i64 72057594037927940, comdat
> @__llvm_profile_filename = constant [19 x i8] c"default_%m.profraw\00",
> comdat
>
> lld ignores comdats in LTO object files because it expects a...
2018 May 09
2
lld + ThinLTO + fprofile-generate causes duplicate symbol errors
...gt;
>>>
>>> Thanks,
>>> Teresa
>>>
>>> On Tue, May 8, 2018 at 7:50 PM Pirama Arumuga Nainar via llvm-dev <
>>> llvm-dev at lists.llvm.org> wrote:
>>>
>>>> The duplicate symbol errors are for __llvm_profile_filename and __llvm_profile_raw_version.
>>>> IIUC, these are supposed to be weak symbols but Thin LTO seems to break
>>>> this in some way. This does't happen with gold or no LTO or full LTO.
>>>>
>>>> $ cat > a.c
>>>> extern int foo();
>>>>
>>>>...
2018 May 09
0
lld + ThinLTO + fprofile-generate causes duplicate symbol errors
...;> Thanks,
>>>> Teresa
>>>>
>>>> On Tue, May 8, 2018 at 7:50 PM Pirama Arumuga Nainar via llvm-dev <
>>>> llvm-dev at lists.llvm.org> wrote:
>>>>
>>>>> The duplicate symbol errors are for __llvm_profile_filename and __llvm_profile_raw_version.
>>>>> IIUC, these are supposed to be weak symbols but Thin LTO seems to break
>>>>> this in some way. This does't happen with gold or no LTO or full LTO.
>>>>>
>>>>> $ cat > a.c
>>>>> extern int foo();
>>>&...
2018 May 09
2
lld + ThinLTO + fprofile-generate causes duplicate symbol errors
...t from
> head. What version is your clang?
>
(and your lld)
>
> Thanks,
> Teresa
>
> On Tue, May 8, 2018 at 7:50 PM Pirama Arumuga Nainar via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
>> The duplicate symbol errors are for __llvm_profile_filename and __llvm_profile_raw_version.
>> IIUC, these are supposed to be weak symbols but Thin LTO seems to break
>> this in some way. This does't happen with gold or no LTO or full LTO.
>>
>> $ cat > a.c
>> extern int foo();
>>
>> int main() {
>> return foo();
>> }
>&g...
2018 May 09
0
lld + ThinLTO + fprofile-generate causes duplicate symbol errors
...'t reproduce with either lld or gold, using a compiler built from
head. What version is your clang?
Thanks,
Teresa
On Tue, May 8, 2018 at 7:50 PM Pirama Arumuga Nainar via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
> The duplicate symbol errors are for __llvm_profile_filename and __llvm_profile_raw_version.
> IIUC, these are supposed to be weak symbols but Thin LTO seems to break
> this in some way. This does't happen with gold or no LTO or full LTO.
>
> $ cat > a.c
> extern int foo();
>
> int main() {
> return foo();
> }
>
> $ cat > b.c
> int foo() {...
2018 May 09
0
lld + ThinLTO + fprofile-generate causes duplicate symbol errors
...;>
> (and your lld)
>
>
>>
>> Thanks,
>> Teresa
>>
>> On Tue, May 8, 2018 at 7:50 PM Pirama Arumuga Nainar via llvm-dev <
>> llvm-dev at lists.llvm.org> wrote:
>>
>>> The duplicate symbol errors are for __llvm_profile_filename and __llvm_profile_raw_version.
>>> IIUC, these are supposed to be weak symbols but Thin LTO seems to break
>>> this in some way. This does't happen with gold or no LTO or full LTO.
>>>
>>> $ cat > a.c
>>> extern int foo();
>>>
>>> int main() {
>>>...
2017 Oct 26
2
Profiling data structure
On Wed, Oct 25, 2017 at 09:13:54AM -0700, Xinliang David Li wrote:
> On Wed, Oct 25, 2017 at 12:26 AM, Roger Pau Monné via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
> > Hello,
> >
> > I've been working on implementing some basic functionality in order to
> > use the llvm profiling functionality inside of a kernel (the Xen
> > hypervisor).