[PATCH] D39114: [XRay] Initial XRay in Darwin Support

2017-11-09 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris planned changes to this revision. dberris added a comment. In https://reviews.llvm.org/D39114#920591, @kubamracek wrote: > > When linking the final binary, the XRay runtime can't seem to find the > > `__{start,stop}_xray_{fn_idx,instr_map}` symbols. I've marked them weak, > > but they s

[PATCH] D39114: [XRay] Initial XRay in Darwin Support

2017-11-09 Thread Kuba (Brecka) Mracek via Phabricator via cfe-commits
kubamracek added a comment. > When linking the final binary, the XRay runtime can't seem to find the > `__{start,stop}_xray_{fn_idx,instr_map}` symbols. I've marked them weak, but > they seem to either not be resolved when statically linking the binary. The > dynamic lib version of the XRay run

[PATCH] D39114: [XRay] Initial XRay in Darwin Support

2017-11-09 Thread Kuba (Brecka) Mracek via Phabricator via cfe-commits
kubamracek added a comment. Thanks for working on this! Can we split the patch and land parts that are LGTM? It's getting a bit crowded here. I think the ASM changes should be a separate patch, and the test changes as well, probably. https://reviews.llvm.org/D39114 _

[PATCH] D39114: [XRay] Initial XRay in Darwin Support

2017-11-09 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added subscribers: pelikan, echristo. dberris added a comment. Got some good progress on finally being able to make this work... here's the current state: - When linking the final binary, the XRay runtime can't seem to find the `__{start,stop}_xray_{fn_idx,instr_map}` symbols. I've mark

[PATCH] D39114: [XRay] Initial XRay in Darwin Support

2017-11-09 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris updated this revision to Diff 19. dberris added a comment. - fixup: Use ASM macros for darwin assembly - fixup: support weak symbols for Darwin linkage - fixup: qualify symbols, use macros, limit weak symbols - fixup: move test cases from Linux up one directory - fixup: make clang link

[PATCH] D39114: [XRay] Initial XRay in Darwin Support

2017-11-09 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added a comment. In https://reviews.llvm.org/D39114#914098, @kubamracek wrote: > Hi and sorry for replying so late! All of the changes LGTM with a few nits. All good, thanks for having a look! >> Assembly for Darwin x86_64 and how we avoid the ELF'isms (do we need to >> implement darw

[PATCH] D39114: [XRay] Initial XRay in Darwin Support

2017-11-09 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris updated this revision to Diff 122210. dberris marked an inline comment as done. dberris added a comment. - fixup: Use ASM macros for darwin assembly - fixup: support weak symbols for Darwin linkage https://reviews.llvm.org/D39114 Files: clang/lib/Driver/XRayArgs.cpp compiler-rt/cmak

[PATCH] D39114: [XRay] Initial XRay in Darwin Support

2017-11-02 Thread Kuba (Brecka) Mracek via Phabricator via cfe-commits
kubamracek added a comment. Also, please make sure this builds and tests pass before actually landing this patch. FYI, there are bots that run on older macOS versions (10.11 for sure, probably even older). https://reviews.llvm.org/D39114 ___ cfe-c

[PATCH] D39114: [XRay] Initial XRay in Darwin Support

2017-11-02 Thread Kuba (Brecka) Mracek via Phabricator via cfe-commits
kubamracek accepted this revision. kubamracek added a comment. This revision is now accepted and ready to land. Hi and sorry for replying so late! All of the changes LGTM with a few nits. > Assembly for Darwin x86_64 and how we avoid the ELF'isms (do we need to > implement darwin-specific assemb

[PATCH] D39114: [XRay] Initial XRay in Darwin Support

2017-11-01 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added a comment. @kubamracek -- if you don't mind having a look at this, I'm looking for thoughts/feedback on how we can address the "blockers": - Assembly for Darwin x86_64 and how we avoid the ELF'isms (do we need to implement darwin-specific assembly for MachO?) - Syscalls, testing,

[PATCH] D39114: [XRay] Initial XRay in Darwin Support

2017-10-20 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris created this revision. Herald added a subscriber: mgorny. This is a work-in-progress change that attempts to allow us to build and use the XRay runtime in Darwin. Current state: - Assembler files are broken due to assumptions about ELFisms. - Test infrastructure is laid out, but we aren't