[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-09-20 Thread Rich Kadel via Phabricator via cfe-commits
richkadel added a comment. I don't know if this is helpful or not, but we ran into a problem, recently, on Fuchsia when upgrading Clang (I believe to LLVM 14), and realized that the LLVM tools from Clang's version of LLVM were in compatible with the Rust profraw files. Since you're probably

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-09-16 Thread Philippe Antoine via Phabricator via cfe-commits
catenacyber added a comment. Should I propose a simple patch to bump INSTR_PROF_RAW_VERSION ? Or will it be part of something bigger, taken care of by someone else ? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104556/new/

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-09-15 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D104556#3001497 , @catenacyber wrote: > Should we still bump `INSTR_PROF_RAW_VERSION ` so that we are able to > distinguish profraw files produced by clang13 and the ones produced by > clang14 ? > > Right now, both produce

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-09-15 Thread Philippe Antoine via Phabricator via cfe-commits
catenacyber added a comment. Should we still bump `INSTR_PROF_RAW_VERSION ` so that we are able to distinguish profraw files produced by clang13 and the ones produced by clang14 ? Right now, both produce `LLVM raw profile data, version 7` Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-09-13 Thread Philippe Antoine via Phabricator via cfe-commits
catenacyber added a comment. > Even if `INSTR_PROF_RAW_VERSION` is bumped, I think it is very likely your > Rust downstream will observe an `if (GET_VERSION(Version) != > RawInstrProf::Version)` error in llvm-profdata, > because from your description it seems you are likely mixing raw profile

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-09-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D104556#2998159 , @catenacyber wrote: >> .profraw are files with the raw profile format. The compiler-rt/lib/profile >> runtime and llvm-profdata only support one version at any commit. > > Ok. > >> Mixing .profraw files

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-09-13 Thread Philippe Antoine via Phabricator via cfe-commits
catenacyber added a comment. > .profraw are files with the raw profile format. The compiler-rt/lib/profile > runtime and llvm-profdata only support one version at any commit. Ok. > Mixing .profraw files produced by different compiler-rt/lib/profile runtimes > is unsupported. I do not think I

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-09-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D104556#2998137 , @catenacyber wrote: >> Bump the raw profile format version to 6. (Last bump happened in 2019-10.) > > This does not seem to be in the patch, ie no change of > `INSTR_PROF_RAW_VERSION` in

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-09-13 Thread Philippe Antoine via Phabricator via cfe-commits
catenacyber added a comment. > Bump the raw profile format version to 6. (Last bump happened in 2019-10.) This does not seem to be in the patch, ie no change of `INSTR_PROF_RAW_VERSION` in compiler-rt/include/profile/InstrProfData.inc Is that missing ? Repository: rG LLVM Github Monorepo

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-09-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D104556#2998091 , @catenacyber wrote: > Thanks for the quick reply > >> I don't think this change is responsible. This has been tested by many C++ >> downstream groups. > > What did I do wrong ? > Adding this only commit

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-09-13 Thread Philippe Antoine via Phabricator via cfe-commits
catenacyber added a comment. Thanks for the quick reply > I don't think this change is responsible. This has been tested by many C++ > downstream groups. What did I do wrong ? Adding this only commit makes the scenario fail. > Rust should use upgrade its lib/ProfileData and

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-09-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D104556#2997674 , @catenacyber wrote: > This commit has broken oss-fuzz workflow for rust projects. > I do not know if the fix is > https://reviews.llvm.org/rG66e2772e4285588ccc3bcdb5f392c8326debbd7d > > Scenario is > >

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-09-13 Thread Philippe Antoine via Phabricator via cfe-commits
catenacyber added a comment. This commit has broken oss-fuzz workflow for rust projects. I do not know if the fix is https://reviews.llvm.org/rG66e2772e4285588ccc3bcdb5f392c8326debbd7d Scenario is export RUSTFLAGS="--cfg fuzzing -Cdebuginfo=1 -Cforce-frame-pointers -Zinstrument-coverage -C

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-07-31 Thread Fangrui Song 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 rGa1532ed27582: [InstrProfiling] Make CountersPtr in __profd_ relative (authored by MaskRay). Changed prior to commit:

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-07-29 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. release/13.x has been created. This if merged will go into 14.x. We have plenty of time making more format changes if needed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104556/new/ https://reviews.llvm.org/D104556

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-07-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. @davidxl @vsk  I am happy to postpone this after 13.0.0 is branched - so that we can adjust the format while only bumping the version once. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104556/new/

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-07-05 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. @davidxl @vsk  Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104556/new/ https://reviews.llvm.org/D104556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-07-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 356310. MaskRay marked an inline comment as done. MaskRay added a comment. Move ConstantExpr::getSub from .inc to InstrProfiling.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104556/new/

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-07-03 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 356271. MaskRay edited the summary of this revision. MaskRay added a comment. Drop version 5 compatibility because the Linux kernel patch is suspended. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104556/new/

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-07-02 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. I'm happy with this. Comment at: compiler-rt/include/profile/InstrProfData.inc:79 +INSTR_PROF_DATA(const IntPtrT, IntPtrTy, CounterPtr, +

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-06-28 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. Ping:) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104556/new/ https://reviews.llvm.org/D104556 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-06-24 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D104556#2837136 , @mstorsjo wrote: > In D104556#2837104 , @rnk wrote: > >> Swift wanted the same thing, so I think the answer is yes, we should ask. > > What would the benefit of that

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-06-23 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. In D104556#2837104 , @rnk wrote: > In D104556#2837006 , @MaskRay wrote: > >> Is it possible to ask MSVC to add the 64-bit `IMAGE_REL_AMD64_REL64` and >> `IMAGE_REL_ARM64_REL64`? >>

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-06-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D104556#2837006 , @MaskRay wrote: > Is it possible to ask MSVC to add the 64-bit `IMAGE_REL_AMD64_REL64` and > `IMAGE_REL_ARM64_REL64`? > Newer compiler metadata techniques can benefit from using the same mechanism > for all

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-06-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added a comment. In D104556#2836900 , @rnk wrote: > In D104556#2831787 , @MaskRay wrote: > >> Hmm, IMGREL (`IMAGE_REL_AMD64_ADDR32NB`) looks useful and is an alternative >> solution to PC-relative

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-06-23 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. In D104556#2831787 , @MaskRay wrote: > Hmm, IMGREL (`IMAGE_REL_AMD64_ADDR32NB`) looks useful and is an alternative > solution to PC-relative relocations in ELF / relocation subtraction in Mach-O. > But leveraging it seems to need

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-06-23 Thread Vedant Kumar via Phabricator via cfe-commits
vsk added a comment. A one-time exception to the .profraw compatibility policy sounds reasonable to me. A little more context: llvm has historically rev'd the .profraw format with abandon to deliver performance/size improvements (as David & co. did with name compression) and new functionality

[PATCH] D104556: [InstrProfiling] Make CountersPtr in __profd_ relative

2021-06-21 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay updated this revision to Diff 353519. MaskRay edited the summary of this revision. MaskRay added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. Mention the one-time exception for .profraw compatibility Repository: rG LLVM Github Monorepo CHANGES