19 Commits

Author SHA1 Message Date
c8ef
59770a4382
[NFC] Correct imprecise file location in the comment. (#115630) 2024-11-10 15:23:58 +08:00
c8ef
b57b3f6425
[NFC] Simple typo correction. (#114548) 2024-11-02 00:40:57 +08:00
Mircea Trofin
f32e5bdcef
[NFC] Rename the Nr abbreviation to Num (#107151)
It's more clear. (This isn't exhaustive).
2024-09-05 12:34:47 -07:00
NAKAMURA Takumi
9d15fc0060 Quick fix for a waning in clang_rt.ctx_profile [-Wgnu-anonymous-struct]
`__sanitizer_siginfo` has been introduced in D142117.
(llvmorg-16-init-17950-ged9ef9b4f248)
It is incompatible to -pedantic.

`clang_rt.ctx_profile` has been introduced in #92456.
2024-05-19 15:52:40 +09:00
NAKAMURA Takumi
f87ed54e49 Reformat 2024-05-19 15:51:47 +09:00
Mircea Trofin
58c778565c [nfc][ctx_profile] Fix printf - related -Wformat-pedantic 2024-05-18 08:46:26 -07:00
Mircea Trofin
cfe9deb135 Reapply "[ctx_profile] Integration test (#92456)"
This reverts commit 881f20e958e80bd30463fc57d2d3e891bcb8a571.

Passing -ldl -lpthread explicitly
2024-05-17 21:55:39 -07:00
Aiden Grossman
881f20e958 Revert "[ctx_profile] Integration test (#92456)"
This reverts commit 487d5af6482ea5f074c12d29d7e376d3fc697706.

This was causing failures on some buildbots.
https://lab.llvm.org/buildbot/#/builders/247/builds/18559
2024-05-17 23:59:28 +00:00
Mircea Trofin
487d5af648
[ctx_profile] Integration test (#92456)
Compile with clang a program that's instrumented for contextual profiling and verify a profile can be collected.
2024-05-17 11:08:14 -07:00
Mircea Trofin
77a59c3210
[ctx_profile] Fix signed-ness in CtxInstrProfilingTest.cpp
Follow-up from `265953c`
2024-05-10 11:27:44 -07:00
Mircea Trofin
265953cc26 [ctx_profile] Arena should zero-initialize its allocation area. 2024-05-10 10:43:22 -07:00
Mircea Trofin
0fd017ce43 [nfc][ctx_profile] Move CtxInstrContextNode.h in include
Follow-up from PR #91669.
2024-05-09 17:30:46 -07:00
Mircea Trofin
e4763ca83b
[ctx_profile] Pull ContextNode in a .inc file (#91669)
This pulls out `ContextNode` as we need to use it pretty much as-is to implement a writer. The writer will be implemented on the LLVM side because it takes a dependency on BitStreamWriter.

Since we can't reuse a header between compiler-rt and llvm, we use a header file which is copied on both sides, and test that the 2 copies are identical.

The changes adds the necessary other stuff for compiler-rt/ctx_profile testing.
2024-05-09 16:58:40 -07:00
Mircea Trofin
8755d24cb3 [compiler-rt][ctx_profile] Fix signed-ness warnings in test
Follow-up from PR ##89838. Some build bots warn-as-error
about signed/unsigned comparison in CtxInstrProfilingTest.

Example: https://lab.llvm.org/buildbot/#/builders/37/builds/34610
2024-05-07 23:27:54 -07:00
Mircea Trofin
ccf765cfd5
[compiler-rt][ctx_profile] Add the instrumented contextual profiling APIs (#89838)
APIs for contextual profiling. `ContextNode` is the call context-specific counter buffer. `ContextRoot` is associated to those functions that constitute roots into interesting call graphs, and is the object on which we hang off `Arena`s for allocating `ContextNode`s, as well as the `ContextNode` corresponding to such functions. Graphs of `ContextNode`s are accessible by one thread at a time.

(Tracking Issue: #89287, more details in the RFC referenced there)
2024-05-07 15:01:15 -07:00
Mircea Trofin
579efe011b Temporarily remove clang_rt.ctx_profile target
Trying to address the build failure on the `clang-ve-ninja`bot, which
appears hard to repro locally. The target isn't needed currently (there
are unit tests exercising the new functionality). Removing it for now
to green-ify the build bot.
2024-04-23 00:46:52 +02:00
Mircea Trofin
a3e7a125e1 Reapply "[compiler-rt][ctx_instr] Add ctx_profile component" (#89625)
This reverts commit 8b2ba6a144e728ee4116e2804e9b5aed8824e726.

The uild errors (see below) were likely due to the same issue PR #88074 fixed. Addressed by following that PR.

https://lab.llvm.org/buildbot/#/builders/165/builds/52789
https://lab.llvm.org/buildbot/#/builders/91/builds/25273
2024-04-22 22:33:09 +02:00
Mircea Trofin
8b2ba6a144
Revert "[compiler-rt][ctx_instr] Add ctx_profile component" (#89625)
Reverts llvm/llvm-project#89304

Some build bot failures - will fix and reland.

Example: https://lab.llvm.org/buildbot/#/builders/165/builds/52789
2024-04-22 09:35:49 -07:00
Mircea Trofin
6ad22c879a
[compiler-rt][ctx_instr] Add ctx_profile component (#89304)
Add the component structure for contextual instrumented PGO and the bump allocator + test.

(Tracking Issue: #89287, RFC referenced there)
2024-04-22 09:24:22 -07:00