[PATCH] D45474: [XRay][clang+compiler-rt] Support build-time mode selection

2018-04-09 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris created this revision. dberris added reviewers: echristo, eizan, chandlerc. Herald added subscribers: mgrang, mgorny. This patch implements the `-fxray-modes=` flag which allows users building with XRay instrumentation to decide which modes to pre-package into the binary being linked. The

[PATCH] D44878: libFuzzer OpenBSD support

2018-04-10 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added a comment. In the interest of better documentation, can you please update the description of this change to reflect what we're trying to achieve here? Something more descriptive than "libFuzzer OpenBSD Support" that substantiates the change, along with related changes to other pro

[PATCH] D45474: [XRay][clang+compiler-rt] Support build-time mode selection

2018-04-10 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris updated this revision to Diff 141940. dberris marked an inline comment as done. dberris added a comment. Revert unnecessary one-liner change. https://reviews.llvm.org/D45474 Files: clang/include/clang/Driver/Options.td clang/include/clang/Driver/XRayArgs.h clang/lib/Driver/ToolCha

[PATCH] D45474: [XRay][clang+compiler-rt] Support build-time mode selection

2018-04-10 Thread Dean Michael Berris via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL329772: [XRay][clang+compiler-rt] Support build-time mode selection (authored by dberris, committed by ). Herald added a subscriber: delcypher. Changed prior to commit: https://reviews.llvm.org/D45474?v

[PATCH] D44878: Adding fuzzer flags support to OpenBSD driver

2018-04-10 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added a comment. ACK -- let me land now. :) https://reviews.llvm.org/D44878 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D44878: Adding fuzzer flags support to OpenBSD driver

2018-04-10 Thread Dean Michael Berris via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC329779: Adding fuzzer flags support to OpenBSD driver (authored by dberris, committed by ). Repository: rC Clang https://reviews.llvm.org/D44878 Files: lib/Driver/ToolChains/OpenBSD.cpp Index: lib

[PATCH] D44970: [XRay][clang] Add flag to choose instrumentation bundles

2018-04-11 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris updated this revision to Diff 141958. dberris marked an inline comment as done. dberris added a comment. Herald added a subscriber: mgorny. - Rebase - Address comments to use a bitmask/bitset for instrumentation bundle https://reviews.llvm.org/D44970 Files: clang/include/clang/Basic/X

[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-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-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 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 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 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][darwin] Initial XRay in Darwin Support

2017-11-09 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris updated this revision to Diff 122352. dberris retitled this revision from "[XRay] Initial XRay in Darwin Support" to "[XRay][darwin] Initial XRay in Darwin Support". dberris edited the summary of this revision. dberris removed subscribers: echristo, pelikan. dberris added a comment. This r

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

2017-11-09 Thread Dean Michael Berris via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL317875: [XRay][darwin] Initial XRay in Darwin Support (authored by dberris). Changed prior to commit: https://reviews.llvm.org/D39114?vs=122352&id=122391#toc Repository: rL LLVM https://reviews.llvm

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

2017-11-09 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added a comment. Landing now, will deal with the test and dynamic/ Comment at: compiler-rt/trunk/lib/xray/xray_trampoline_x86_64.S:75 - .globl __xray_FunctionEntry + .globl ASM_TSAN_SYMBOL(__xray_FunctionEntry) .align 16, 0x90 kuba

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

2017-11-09 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added a comment. Reverted in https://reviews.llvm.org/rL317877 -- I'm going to try again next week instead. Repository: rL LLVM https://reviews.llvm.org/D39114 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org

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

2017-11-19 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris reopened this revision. dberris added a comment. This revision is now accepted and ready to land. Hi @kubamracek -- do you know how to work around the lack of `clock_gettime` from the 10.11 SDK? The build bots will complain again if this lands, and it'd be a real shame if we didn't get

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

2017-11-19 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#929706, @kubamracek wrote: > Can we just not use clock_gettime on Darwin and instead use > mach_absolute_time? That's a good suggestion. Let me make that change. Thanks! Repository: rL LL

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

2017-11-19 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris updated this revision to Diff 123529. dberris added a comment. This revision is now accepted and ready to land. Remove some uses of clock_gettime from XRay naive mode logging and some support libraries. Up next should be the FDR mode calls to clock_gettime. https://reviews.llvm.org/D39

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

2017-11-19 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris planned changes to this revision. dberris added a comment. The FDR mode calls to `clock_gettime` needs a bit more attention, let me try and isolate those before attempting to land again. https://reviews.llvm.org/D39114 ___ cfe-commits maili

[PATCH] D30388: [XRay] Add -fxray-{always, never}-instrument= flags to clang

2017-03-14 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added a comment. Ping? https://reviews.llvm.org/D30388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D30018: [XRay] Add __xray_customeevent(...) as a clang-supported builtin

2017-03-21 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added a reviewer: rnk. dberris added a subscriber: rnk. dberris added a comment. @rnk -- if you have time, a review for this would be appreciated too. https://reviews.llvm.org/D30018 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D30388: [XRay] Add -fxray-{always, never}-instrument= flags to clang

2017-03-23 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris updated this revision to Diff 92766. dberris marked 2 inline comments as done. dberris added a comment. - fixup: address reviewer comments https://reviews.llvm.org/D30388 Files: include/clang/AST/ASTContext.h include/clang/Basic/LangOptions.def include/clang/Basic/LangOptions.h

[PATCH] D30388: [XRay] Add -fxray-{always, never}-instrument= flags to clang

2017-03-23 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added a comment. In https://reviews.llvm.org/D30388#707719, @rnk wrote: > I think you need some driver logic to make sure the xray lists show up in .d > files so that modifications to them trigger rebuilds in most build systems. > See the SanitizerArgs.cpp driver logic for this. Good

[PATCH] D31313: [XRay] Do not depend on C++ stdlib for XRay builds

2017-03-23 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris created this revision. Now that XRay doesn't require a runtime dependency on a C++ standard library, we remove that dependency from the clang linker flags. https://reviews.llvm.org/D31313 Files: lib/Driver/ToolChains/Gnu.cpp Index: lib/Driver/ToolChains/Gnu.cpp =

[PATCH] D31313: [XRay] Do not depend on C++ stdlib for XRay builds

2017-03-23 Thread Dean Michael Berris via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL298670: [XRay] Do not depend on C++ stdlib for XRay builds (authored by dberris). Changed prior to commit: https://reviews.llvm.org/D31313?vs=92884&id=92886#toc Repository: rL LLVM https://reviews.l

[PATCH] D31382: [XRay][clang] Remove dependency on libatomic for XRay builds

2017-03-26 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris created this revision. This change depends on https://reviews.llvm.org/D31381 where we change the implementation to use sanitizer_common provided atomic operations library. Fixes http://llvm.org/PR32274. https://reviews.llvm.org/D31382 Files: lib/Driver/ToolChains/Gnu.cpp Index: l

[PATCH] D31382: [XRay][clang] Remove dependency on libatomic for XRay builds

2017-03-27 Thread Dean Michael Berris via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL298835: [XRay][clang] Remove dependency on libatomic for XRay builds (authored by dberris). Changed prior to commit: https://reviews.llvm.org/D31382?vs=93097&id=93101#toc Repository: rL LLVM https:/

[PATCH] D30388: [XRay] Add -fxray-{always, never}-instrument= flags to clang

2017-03-29 Thread Dean Michael Berris via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. dberris marked an inline comment as done. Closed by commit rL299041: [XRay] Add -fxray-{always,never}-instrument= flags to clang (authored by dberris). Changed prior to commit: https://reviews.llvm.org/D30388?vs=92766&id=

[PATCH] D30388: [XRay] Add -fxray-{always, never}-instrument= flags to clang

2017-03-29 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added inline comments. Comment at: include/clang/Driver/XRayArgs.h:22 +class XRayArgs { + std::vector AlwaysInstrumenFiles; + std::vector NeverInstrumentFiles; rnk wrote: > Any reason to omit the 't' in "InstrumentFiles"? Wow, good catch -- no good reas

[PATCH] D31491: [XRay][clang] Fix the -fxray-instruction-threshold flag processing

2017-03-30 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris created this revision. The refactoring introduced a regression in the flag processing for -fxray-instruction-threshold which causes it to not get passed properly. This change should restore the previous behaviour. https://reviews.llvm.org/D31491 Files: lib/Driver/XRayArgs.cpp lib/Fr

[PATCH] D31491: [XRay][clang] Fix the -fxray-instruction-threshold flag processing

2017-03-30 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added inline comments. Comment at: test/CodeGen/xray-instruction-threshold.cpp:11 + +// CHECK-DAG: define i32 @_Z3foov() #[[THRESHOLD:[0-9]+]] { +// CHECK-DAG: define i32 @_Z3barv() #[[NEVERATTR:[0-9]+]] { rnk wrote: > Any reason to use -DAG on the decls?

[PATCH] D31491: [XRay][clang] Fix the -fxray-instruction-threshold flag processing

2017-03-30 Thread Dean Michael Berris via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. dberris marked an inline comment as done. Closed by commit rL299126: [XRay][clang] Fix the -fxray-instruction-threshold flag processing (authored by dberris). Changed prior to commit: https://reviews.llvm.org/D31491?vs=93

[PATCH] D28001: [X86] Teach Clang about -mfentry flag

2017-01-30 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris accepted this revision. dberris added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D28001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[PATCH] D29704: [XRay] [clang] Allow logging the first argument of a function call.

2017-02-09 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris accepted this revision. dberris added a comment. This revision is now accepted and ready to land. Just a minor comment -- I suspect you're going to wait until the patch to LLVM lands? Comment at: lib/Sema/SemaDeclAttr.cpp:4407 + + // It isn't a parameter index [0;n),

[PATCH] D30018: [XRay] Add __xray_customeevent(...) as a clang-supported builtin

2017-02-15 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris created this revision. Herald added a subscriber: mehdi_amini. We define the `__xray_customeevent` builtin that gets translated to IR calls to the correct intrinsic. The default implementation of this is a no-op function. The codegen side of this follows the following logic: - When `-fxra

[PATCH] D30118: [XRay] Merge xray clang flag tests, and add powerpc64le.

2017-02-17 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris accepted this revision. dberris added a comment. This revision is now accepted and ready to land. LGTM Actually, now that you mention this, I don't think there was a good reason to do it this way. Thanks @timshen! https://reviews.llvm.org/D30118

[PATCH] D30388: [XRay] Add -fxray-{always, never}-instrument= flags to clang

2017-02-26 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris created this revision. Herald added subscribers: mgorny, jfb. The -fxray-always-instrument= and -fxray-never-instrument= flags take filenames that are used to imbue the XRay instrumentation attributes using a whitelist mechanism (similar to the sanitizer special cases list). We use the sam

[PATCH] D30388: [XRay] Add -fxray-{always, never}-instrument= flags to clang

2017-02-26 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris planned changes to this revision. dberris added a comment. Need to undo some unnecessary formatting changes.. https://reviews.llvm.org/D30388 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D30388: [XRay] Add -fxray-{always, never}-instrument= flags to clang

2017-02-26 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris updated this revision to Diff 89830. dberris added a comment. - fixup: undo clang-format on ASTContext.h - fixup: undo clang-formatting whole file - fixup: undo clang-format on file https://reviews.llvm.org/D30388 Files: include/clang/AST/ASTContext.h include/clang/Basic/LangOptions

[PATCH] D29704: [XRay] [clang] Allow logging the first argument of a function call.

2017-03-05 Thread Dean Michael Berris via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL296999: [XRay] [clang] Allow logging the first argument of a function call. (authored by dberris). Changed prior to commit: https://reviews.llvm.org/D29704?vs=90431&id=90651#toc Repository: rL LLVM

[PATCH] D30018: [XRay] Add __xray_customeevent(...) as a clang-supported builtin

2017-05-08 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added inline comments. Comment at: lib/Headers/xrayintrin.h:28 +extern "C" { +inline void __xray_customevent(const char*, size_t) { + // Does nothing by design. The intent is the compiler's back-end will handle rnk wrote: > I don't think you need this he

[PATCH] D30018: [XRay] Add __xray_customeevent(...) as a clang-supported builtin

2017-05-08 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris updated this revision to Diff 98129. dberris marked 6 inline comments as done. dberris added a comment. Address comments. https://reviews.llvm.org/D30018 Files: include/clang/Basic/Builtins.def lib/CodeGen/CGBuiltin.cpp test/CodeGen/xray-customevent.cpp Index: test/CodeGen/xray-

[PATCH] D30018: [XRay] Add __xray_customeevent(...) as a clang-supported builtin

2017-05-08 Thread Dean Michael Berris via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. dberris marked an inline comment as done. Closed by commit rL302492: [XRay] Add __xray_customeevent(...) as a clang-supported builtin (authored by dberris). Changed prior to commit: https://reviews.llvm.org/D30018?vs=9812

[PATCH] D30018: [XRay] Add __xray_customeevent(...) as a clang-supported builtin

2017-05-08 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris marked an inline comment as done. dberris added a comment. Thanks @rnk! Comment at: lib/CodeGen/CGBuiltin.cpp:2748 +if (const auto *XRayAttr = +this->CurFuncDecl->getAttr()) { + if (XRayAttr->neverXRayInstrument()) rnk wrote: > rnk

[PATCH] D33392: [XRay][clang] Allow imbuing arg1 logging attribute via -fxray-always-instrument=

2017-05-21 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris created this revision. This change allows us to add arg1 logging support to functions through the special case list provided through -fxray-always-instrument=. This is useful for adding arg1 logging to functions that are either in headers that users don't have control over (i.e. cannot cha

[PATCH] D117929: [XRay] Add support for RISCV

2022-01-25 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris requested changes to this revision. dberris added a comment. This revision now requires changes to proceed. It looks like you'll need to address the lint issues (using clang-format). I'm not an expert on RISCV assembly so you might need to get someone familiar with the ISA reviewing this

[PATCH] D113638: [xray] Add support for hexagon architecture

2021-12-15 Thread Dean Michael Berris via Phabricator via cfe-commits
dberris added a comment. Whoops -- sorry, I had forgotten to change my email settings and missed this. Thanks for the patch, it's exciting to see XRay being supported in the Hexagon architecture! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D11363

<    1   2