[PATCH] D145848: [Driver] Correct -f(no-)xray-function-index behavior

2023-03-11 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque accepted this revision. ianlevesque added a comment. This revision is now accepted and ready to land. Good catch, thanks for the fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D145848/new/ https://reviews.llvm.org/D145848 __

[PATCH] D129594: [InstrProf] Add options to profile function groups

2022-07-13 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque accepted this revision. ianlevesque added a comment. This revision is now accepted and ready to land. lgtm Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D129594/new/ https://reviews.llvm.org/D129594 _

[PATCH] D129594: [InstrProf] Add options to profile function groups

2022-07-13 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:2871 + if (NumGroups > 1) { +auto Group = llvm::MD5Hash(Fn->getName()) % NumGroups; +if (Group != getCodeGenOpts().ProfileSelectedFunctionGroup) In D87953 I used crc32 to

[PATCH] D89441: [xray] Honor xray-never function-instrument attribute

2021-01-19 Thread Ian Levesque via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG68a1f09107a4: [xray] Honor xray-never function-instrument attribute (authored by ianlevesque). Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D89441: RFC: Potential fixes to function-instrument=xray-never

2020-10-15 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque updated this revision to Diff 298534. ianlevesque added a comment. Apply the fix in XRayInstrumentation, add test cases. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89441/new/ https://reviews.llvm.org/D89441 Files: llvm/lib/CodeGen

[PATCH] D89441: RFC: Potential fixes to function-instrument=xray-never

2020-10-14 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque created this revision. ianlevesque added reviewers: dberris, MaskRay. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. ianlevesque requested review of this revision. When using https://reviews.llvm.org/D87953 I discovered that the fun

[PATCH] D87953: [xray] Function coverage groups

2020-09-24 Thread Ian Levesque via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6f7fbdd2857f: [xray] Function coverage groups (authored by ianlevesque). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87953/new/ https://reviews.llvm.org/D

[PATCH] D87953: [xray] Function coverage groups

2020-09-24 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque updated this revision to Diff 294213. ianlevesque added a comment. Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Add static function to the test case, update documentation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D87953: [xray] Function coverage groups

2020-09-24 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque added a comment. I can update the docs @MaskRay, not a problem. I'll tweak the test a little too per your comment. @dberris I think if we wanted to control it in a non-'random' (the crc32 was chosen so it would be consistent even though it's not really predictable up front) way we'

[PATCH] D87953: [xray] Function coverage groups

2020-09-24 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque added a comment. Thanks @MaskRay - I tried to answer that question in https://reviews.llvm.org/D87953#2286430. At present we are deploying instrumentation to an arbitrary subset of our application using the instruction threshold. I would like to make the selection of how many and wh

[PATCH] D87953: [xray] Function coverage groups

2020-09-23 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque updated this revision to Diff 293826. ianlevesque added a comment. Remove extraneous parameter validations. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87953/new/ https://reviews.llvm.org/D87953 Files: clang/include/clang/Basic/Cod

[PATCH] D87953: [xray] Function coverage groups

2020-09-22 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque added a comment. This is ready for another review, I think I addressed everything. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87953/new/ https://reviews.llvm.org/D87953 ___ cfe-commits mai

[PATCH] D87953: [xray] Function coverage groups

2020-09-21 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque updated this revision to Diff 293289. ianlevesque added a comment. const Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87953/new/ https://reviews.llvm.org/D87953 Files: clang/include/clang/Basic/CodeGenOptions.def clang/include/cla

[PATCH] D87953: [xray] Function coverage groups

2020-09-21 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque added a comment. In D87953#2284071 , @MaskRay wrote: > How large the overhead is? This is somewhat surprising to me. It is the binary size overhead, not the runtime overhead, that we are limited on (when deployed on Android). Repository:

[PATCH] D87953: [xray] Function coverage groups

2020-09-21 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque updated this revision to Diff 293278. ianlevesque added a comment. Address code review feedback Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87953/new/ https://reviews.llvm.org/D87953 Files: clang/include/clang/Basic/CodeGenOptions.

[PATCH] D87953: [xray] Function coverage groups

2020-09-21 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque marked 7 inline comments as done. ianlevesque added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:814 +auto FuncGroups = CGM.getCodeGenOpts().XRayTotalFunctionGroups; +if (FuncGroups > 1) { + auto FuncName = ArrayRef(CurFn->getName().

[PATCH] D87953: [xray] Function coverage groups

2020-09-19 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:817 +CurFn->getName().bytes_end()); + auto Group = crc32(FuncName) % FuncGroups; + if (Group != CGM.getCodeGenOpts().XRaySelectedFunctionGroup &&

[PATCH] D87953: [xray] Function coverage groups

2020-09-18 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque created this revision. ianlevesque added reviewers: dberris, MaskRay, kyulee. Herald added subscribers: cfe-commits, dang. Herald added a project: clang. ianlevesque requested review of this revision. Add the ability to selectively instrument a subset of functions by dividing the func

[PATCH] D81995: [xray] Option to omit the function index

2020-06-17 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque marked 2 inline comments as done. ianlevesque added inline comments. Comment at: clang/include/clang/Basic/CodeGenOptions.def:114 +///< Set with -fno-xray-function-index to omit the index section. +CODEGENOPT(XRayOmitFunctionIndex , 1, 0) + MaskRay wr

[PATCH] D81995: [xray] Option to omit the function index

2020-06-17 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque marked 4 inline comments as done. ianlevesque added inline comments. Comment at: clang/include/clang/Basic/CodeGenOptions.def:114 +///< Set with -fno-xray-function-index to omit the index section. +CODEGENOPT(XRayOmitFunctionIndex , 1, 0) + MaskRay wr

[PATCH] D81995: [xray] Option to omit the function index

2020-06-17 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque marked 3 inline comments as done. ianlevesque added inline comments. Comment at: clang/include/clang/Basic/CodeGenOptions.def:114 +///< Set with -fno-xray-function-index to omit the index section. +CODEGENOPT(XRayOmitFunctionIndex , 1, 0) + MaskRay wr

[PATCH] D81995: [xray] Option to omit the function index

2020-06-17 Thread Ian Levesque via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7c7c8e0da4e0: [xray] Option to omit the function index (authored by ianlevesque). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D81995/new/ https://reviews.l

[PATCH] D81995: [xray] Option to omit the function index

2020-06-17 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque created this revision. ianlevesque added reviewers: dberris, MaskRay, johnislarry. Herald added subscribers: llvm-commits, Sanitizers, cfe-commits, arphaman, hiraditya. Herald added projects: clang, Sanitizers, LLVM. Add a flag to omit the xray_fn_idx to cut size overhead and relocati

[PATCH] D77191: [clang][xray] Add xray attributes to functions without decls too

2020-03-31 Thread Ian Levesque via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbb3111cbaf7b: [clang][xray] Add xray attributes to functions without decls too (authored by ianlevesque). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77191

[PATCH] D77191: [clang][xray] Add xray attributes to functions without decls too

2020-03-31 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque created this revision. ianlevesque added reviewers: dberris, MaskRay, smeenai. Herald added a project: clang. Herald added a subscriber: cfe-commits. This allows instrumenting things like global initializers Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D77191 File

[PATCH] D73842: [xray][clang] Always add xray-skip-entry/exit and xray-ignore-loops attrs

2020-02-11 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque added a comment. In D73842#1869890 , @smeenai wrote: > Is it worth adding a test that a function with an explicit xray-instrument > attribute also has these other attributes applied? The existing tests from when the feature was added covered

[PATCH] D73842: [xray][clang] Always add xray-skip-entry/exit and xray-ignore-loops attrs

2020-02-11 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque updated this revision to Diff 243981. ianlevesque added a comment. Address code review feedback on the tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73842/new/ https://reviews.llvm.org/D73842 Files: clang/include/clang/Driver/

[PATCH] D73842: [xray][clang] Always add xray-skip-entry/exit and xray-ignore-loops attrs

2020-02-10 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque updated this revision to Diff 243749. ianlevesque added a comment. Now with 100% more tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73842/new/ https://reviews.llvm.org/D73842 Files: clang/include/clang/Driver/XRayArgs.h clan

[PATCH] D73842: [xray][clang] Always add xray-skip-entry/exit and xray-ignore-loops attrs

2020-02-06 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque added a comment. @hiraditya or @smeenai can i get a merge? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73842/new/ https://reviews.llvm.org/D73842 ___ cfe-commits mailing list cfe-commits@

[PATCH] D73842: [xray][clang] Always add xray-skip-entry/exit and xray-ignore-loops attrs

2020-02-05 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque updated this revision to Diff 242800. ianlevesque added a comment. Address code review nits Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73842/new/ https://reviews.llvm.org/D73842 Files: clang/include/clang/Driver/XRayArgs.h clang

[PATCH] D73842: [xray][clang] Always add xray-skip-entry/exit and xray-ignore-loops attrs

2020-02-03 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque marked 2 inline comments as done. ianlevesque added inline comments. Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:832 +Fn->addFnAttr("xray-skip-exit"); + } + if (!CGM.getCodeGenOpts().XRayInstrumentationBundle.has( @hiraditya I

[PATCH] D73842: [xray][clang] Always add xray-skip-entry/exit and xray-ignore-loops attrs

2020-02-01 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque created this revision. ianlevesque added reviewers: hiraditya, smeenai, dberris. Herald added a project: clang. Herald added a subscriber: cfe-commits. The function attributes xray-skip-entry, xray-skip-exit, and xray-ignore-loops were only being applied if a function had an xray-instr

[PATCH] D72890: [xray] Allow instrumenting only function entry and/or only function exit

2020-01-17 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque updated this revision to Diff 238866. ianlevesque added a comment. Add x86 tests Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72890/new/ https://reviews.llvm.org/D72890 Files: clang/include/clang/Basic/XRayInstr.h clang/include/cl

[PATCH] D72873: [clang][xray] Add -fxray-ignore-loops option

2020-01-17 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque marked an inline comment as done. ianlevesque added inline comments. Comment at: clang/test/CodeGen/xray-ignore-loops.cpp:5 + return 1; +} + hiraditya wrote: > I think we need one more test case of a function having a loop. I'm not opposed but the lo

[PATCH] D72890: [xray] Allow instrumenting only function entry and/or only function exit

2020-01-16 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque created this revision. ianlevesque added a reviewer: dberris. Herald added subscribers: llvm-commits, cfe-commits, hiraditya. Herald added projects: clang, LLVM. Extend -fxray-instrumentation-bundle to split function-entry and function-exit into two separate options, so that it is poss

[PATCH] D72873: [clang][xray] Add -fxray-ignore-loops option

2020-01-16 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque created this revision. ianlevesque added a reviewer: dberris. Herald added a project: clang. Herald added a subscriber: cfe-commits. ianlevesque updated this revision to Diff 238600. ianlevesque added a comment. fix clang-format XRay allows tuning by minimum function size, but also a

[PATCH] D72873: [clang][xray] Add -fxray-ignore-loops option

2020-01-16 Thread Ian Levesque via Phabricator via cfe-commits
ianlevesque updated this revision to Diff 238600. ianlevesque added a comment. fix clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D72873/new/ https://reviews.llvm.org/D72873 Files: clang/include/clang/Basic/CodeGenOptions.def clang/