History log of /llvm-project/bolt/runtime/instr.cpp (Results 1 – 25 of 53)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-18.1.8, llvmorg-18.1.7
# 219ea267 21-May-2024 Heewon Cho <heewon6752@gmail.com>

[BOLT][NFC] Remove dead initialization code (#92952)

Addressing #81441


Revision tags: llvmorg-18.1.6, llvmorg-18.1.5, llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3, llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5
# 1a2f8336 09-Nov-2023 spaette <111918424+spaette@users.noreply.github.com>

[BOLT] Fix typos (#68121)

Closes https://github.com/llvm/llvm-project/issues/63097

Before merging please make sure the change to
bolt/include/bolt/Passes/StokeInfo.h is correct.

bolt/include/

[BOLT] Fix typos (#68121)

Closes https://github.com/llvm/llvm-project/issues/63097

Before merging please make sure the change to
bolt/include/bolt/Passes/StokeInfo.h is correct.

bolt/include/bolt/Passes/StokeInfo.h

```diff
// This Pass solves the two major problems to use the Stoke program without
- // proting its code:
+ // probing its code:
```

I'm still not happy about the awkward wording in this comment.

bolt/include/bolt/Passes/FixRelaxationPass.h

```
$ ed -s bolt/include/bolt/Passes/FixRelaxationPass.h <<<'9,12p'
// This file declares the FixRelaxations class, which locates instructions with
// wrong targets and fixes them. Such problems usually occures when linker
// relaxes (changes) instructions, but doesn't fix relocations types properly
// for them.
$
```


bolt/docs/doxygen.cfg.in
bolt/include/bolt/Core/BinaryContext.h
bolt/include/bolt/Core/BinaryFunction.h
bolt/include/bolt/Core/BinarySection.h
bolt/include/bolt/Core/DebugData.h
bolt/include/bolt/Core/DynoStats.h
bolt/include/bolt/Core/Exceptions.h
bolt/include/bolt/Core/MCPlusBuilder.h
bolt/include/bolt/Core/Relocation.h
bolt/include/bolt/Passes/FixRelaxationPass.h
bolt/include/bolt/Passes/InstrumentationSummary.h
bolt/include/bolt/Passes/ReorderAlgorithm.h
bolt/include/bolt/Passes/StackReachingUses.h
bolt/include/bolt/Passes/StokeInfo.h
bolt/include/bolt/Passes/TailDuplication.h
bolt/include/bolt/Profile/DataAggregator.h
bolt/include/bolt/Profile/DataReader.h
bolt/lib/Core/BinaryContext.cpp
bolt/lib/Core/BinarySection.cpp
bolt/lib/Core/DebugData.cpp
bolt/lib/Core/DynoStats.cpp
bolt/lib/Core/Relocation.cpp
bolt/lib/Passes/Instrumentation.cpp
bolt/lib/Passes/JTFootprintReduction.cpp
bolt/lib/Passes/ReorderData.cpp
bolt/lib/Passes/RetpolineInsertion.cpp
bolt/lib/Passes/ShrinkWrapping.cpp
bolt/lib/Passes/TailDuplication.cpp
bolt/lib/Rewrite/BoltDiff.cpp
bolt/lib/Rewrite/DWARFRewriter.cpp
bolt/lib/Rewrite/RewriteInstance.cpp
bolt/lib/Utils/CommandLineOpts.cpp
bolt/runtime/instr.cpp
bolt/test/AArch64/got-ld64-relaxation.test
bolt/test/AArch64/unmarked-data.test
bolt/test/X86/Inputs/dwarf5-cu-no-debug-addr-helper.s
bolt/test/X86/Inputs/linenumber.cpp
bolt/test/X86/double-jump.test
bolt/test/X86/dwarf5-call-pc-function-null-check.test
bolt/test/X86/dwarf5-split-dwarf4-monolithic.test
bolt/test/X86/dynrelocs.s
bolt/test/X86/fallthrough-to-noop.test
bolt/test/X86/tail-duplication-cache.s
bolt/test/runtime/X86/instrumentation-ind-calls.s

show more ...


Revision tags: llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4
# 87e9c424 24-Aug-2023 Elvina Yakubova <elvina.yakubova@huawei.com>

[BOLT][Instrumentation] AArch64 instrumentation support in runtime

This commit adds support for AArch64 in instrumentation runtime library,
including AArch64 system calls.
Also this commit divides s

[BOLT][Instrumentation] AArch64 instrumentation support in runtime

This commit adds support for AArch64 in instrumentation runtime library,
including AArch64 system calls.
Also this commit divides syscalls into target-specific files.

Reviewed By: rafauler, yota9

Differential Revision: https://reviews.llvm.org/D151942

show more ...


Revision tags: llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init
# a86dd9ae 29-Jun-2023 Denis Revunov <revunov.denis@huawei-partners.com>

[BOLT][Instrumentation] Fix indirect call profile in PIE

Because indirect call tables use static addresses for call sites, but pc
values recorded by runtime may be subject to ASLR in PIE, we couldn'

[BOLT][Instrumentation] Fix indirect call profile in PIE

Because indirect call tables use static addresses for call sites, but pc
values recorded by runtime may be subject to ASLR in PIE, we couldn't
find indirect call descriptions by their runtime address in PIE. It
resulted in [unknown] entries in profile for all indirect calls. We need
to substract base address of .text from runtime addresses to get the
corresponding static addresses. Here we create a getter for base address
of .text and substract it's return value from recorded PC values. It
converts them to static addresses, which then may be used to find the
corresponding indirect call descriptions.

Reviewed By: rafauler

Differential Revision: https://reviews.llvm.org/D154121

show more ...


# a7992981 04-Jul-2023 Denis Revunov <revunov.denis@huawei-partners.com>

[BOLT][Instrumentation] Keep profile open in WatchProcess

When a binary is instrumented with --instrumentation-sleep-time and
instrumentation-wait-forks options and lauched, the profile is
periodica

[BOLT][Instrumentation] Keep profile open in WatchProcess

When a binary is instrumented with --instrumentation-sleep-time and
instrumentation-wait-forks options and lauched, the profile is
periodically written until all the forks die. The problem is that we
cannot wait for the whole process tree, and we have no way to tell when
it's safe to read the profile. Hovewer, if we keep profile open
throughout the life of the process tree, we can use fuser to determine
when writing is finished.

Reviewed By: rafauler

Differential Revision: https://reviews.llvm.org/D154436

show more ...


# 60bbddf3 04-Jul-2023 Denis Revunov <revunov.denis@huawei-partners.com>

[BOLT][Instrumentation][NFC] Define and use more syscall constants

Reviewed By: Amir

Differential Revision: https://reviews.llvm.org/D154419


# 0cc19b56 20-Jun-2023 Denis Revunov <revunov.denis@huawei-partners.com>

Reland "[BOLT][Instrumentation] Put Allocator itslef in shared memory by default"

The issue was caused by the absence of placement new definition. It
worked for clang and thus passed Phabricator che

Reland "[BOLT][Instrumentation] Put Allocator itslef in shared memory by default"

The issue was caused by the absence of placement new definition. It
worked for clang and thus passed Phabricator checks, but broke when
compiled with GCC on buildbot.
Full problem description: https://reviews.llvm.org/D153771#4468239

Original patch description:
In absence of instrumentation-file-append-pid option,
global allocator uses shared pages for allocation. However, since it is a
global variable, it gets COW'd after fork if instrumentation-sleep-time
is used, or if a process forks by itself. This means it handles the same
pages to every process which causes hash table corruption. Thus, if we
want shared pages, we need to put the allocator itself in a shared page,
which we do in this commit in __bolt_instr_setup.
I also added a couple of assertions to sanity-check the hash table.

Reviewed By: rafauler, Amir
Differential Revision: https://reviews.llvm.org/D153771

show more ...


# 58a16d84 30-Jun-2023 Amir Ayupov <aaupov@fb.com>

Reland "[BOLT][Instrumentation] Don't share counters when using append-pid"

This reverts commit c15e9b6814e53bccb0194268a826c1213a84b395.

The issue appears unrelated as the crash happened in the BO

Reland "[BOLT][Instrumentation] Don't share counters when using append-pid"

This reverts commit c15e9b6814e53bccb0194268a826c1213a84b395.

The issue appears unrelated as the crash happened in the BOLTed binary, not
instrumented binary.

show more ...


# 8ed172cf 29-Jun-2023 Denis Revunov <revunov.denis@huawei-partners.com>

Reland [BOLT][Instrumentation] Add mmap return value assertions

In a very rare case that mmap call fails, we'll at least get a message
instead of segfault.

Reviewed By: rafauler, Amir
Differential

Reland [BOLT][Instrumentation] Add mmap return value assertions

In a very rare case that mmap call fails, we'll at least get a message
instead of segfault.

Reviewed By: rafauler, Amir
Differential Revision: https://reviews.llvm.org/D154056

show more ...


# 8b23a853 29-Jun-2023 Denis Revunov <revunov.denis@huawei-partners.com>

Reland [BOLT][Instrumentation][NFC] define and use mmap flags

Reviewed By: rafauler, Amir
Differential Revision: https://reviews.llvm.org/D154056


# 3e13b299 30-Jun-2023 Amir Aupov <amir.aupov@gmail.com>

Revert "[BOLT][Instrumentation][NFC] define and use mmap flags"

This reverts commit f0b45fba4b64ab0b5d6c50d978e02f0d12d4d070.

The stack broke https://lab.llvm.org/buildbot/#/builders/252.


# d1849045 30-Jun-2023 Amir Aupov <amir.aupov@gmail.com>

Revert "[BOLT][Instrumentation] Add mmap return value assertions"

This reverts commit 8f7c53ef81c17ae9d773818181d04ef1c3890912.

The stack broke https://lab.llvm.org/buildbot/#/builders/252.


# c15e9b68 30-Jun-2023 Amir Ayupov <aaupov@fb.com>

Revert "[BOLT][Instrumentation] Don't share counters when using append-pid"

This reverts commit 02c3724d43840339fdc91d21747e96b5f7405bb0.

This change breaks instrumented Clang:
https://lab.llvm.org

Revert "[BOLT][Instrumentation] Don't share counters when using append-pid"

This reverts commit 02c3724d43840339fdc91d21747e96b5f7405bb0.

This change breaks instrumented Clang:
https://lab.llvm.org/buildbot/#/builders/252/builds/2700

show more ...


# 4314f4ce 30-Jun-2023 Amir Ayupov <aaupov@fb.com>

Revert "[BOLT][Instrumentation] Put Allocator itslef in shared memory by default"

This reverts commit ad4e0770ca7ebbc4dd6635b17421819b2393aa33.
Breaks BOLT upstream testing:
https://lab.llvm.org/bui

Revert "[BOLT][Instrumentation] Put Allocator itslef in shared memory by default"

This reverts commit ad4e0770ca7ebbc4dd6635b17421819b2393aa33.
Breaks BOLT upstream testing:
https://lab.llvm.org/buildbot/#/builders/244/builds/13736

show more ...


# 47934c11 20-Jun-2023 Denis Revunov <revunov.denis@huawei-partners.com>

[BOLT][Instrumentation] Add dumping function to instrumentation hash tables

Since there are no other means to debug the instrumentation library
other than using stdout, having a function to print ha

[BOLT][Instrumentation] Add dumping function to instrumentation hash tables

Since there are no other means to debug the instrumentation library
other than using stdout, having a function to print hash table entries
is very useful.

Reviewed By: rafauler, Amir
Differential Revision: https://reviews.llvm.org/D153771

show more ...


# ad4e0770 20-Jun-2023 Denis Revunov <revunov.denis@huawei-partners.com>

[BOLT][Instrumentation] Put Allocator itslef in shared memory by default

In absence of instrumentation-file-append-pid option,
global allocator uses shared pages for allocation. However, since it is

[BOLT][Instrumentation] Put Allocator itslef in shared memory by default

In absence of instrumentation-file-append-pid option,
global allocator uses shared pages for allocation. However, since it is a
global variable, it gets COW'd after fork if instrumentation-sleep-time
is used, or if a process forks by itself. This means it handles the same
pages to every process which causes hash table corruption. Thus, if we
want shared pages, we need to put the allocator itself in a shared page,
which we do in this commit in __bolt_instr_setup.
I also added a couple of assertions to sanity-check the hash table.

Reviewed By: rafauler, Amir
Differential Revision: https://reviews.llvm.org/D153771

show more ...


# 02c3724d 15-Jun-2023 Denis Revunov <revunov.denis@huawei-partners.com>

[BOLT][Instrumentation] Don't share counters when using append-pid

The point of append-pid option is to record separate profiles for
separate forks, which is impossible when counters are the same fo

[BOLT][Instrumentation] Don't share counters when using append-pid

The point of append-pid option is to record separate profiles for
separate forks, which is impossible when counters are the same for
every process. It leads to a sum of all profiles in every file, plus
GlobalWriteProfileMutex located in a shared memory prevents some
processes from dumping their data at all.

Reviewed By: rafauler, Amir
Differential Revision: https://reviews.llvm.org/D153771

show more ...


# 8f7c53ef 29-Jun-2023 Denis Revunov <revunov.denis@huawei-partners.com>

[BOLT][Instrumentation] Add mmap return value assertions

In a very rare case that mmap call fails, we'll at least get a message
instead of segfault.

Reviewed By: rafauler, Amir
Differential Revisio

[BOLT][Instrumentation] Add mmap return value assertions

In a very rare case that mmap call fails, we'll at least get a message
instead of segfault.

Reviewed By: rafauler, Amir
Differential Revision: https://reviews.llvm.org/D154056

show more ...


# f0b45fba 29-Jun-2023 Denis Revunov <revunov.denis@huawei-partners.com>

[BOLT][Instrumentation][NFC] define and use mmap flags

Reviewed By: rafauler, Amir
Differential Revision: https://reviews.llvm.org/D154056


Revision tags: llvmorg-16.0.6
# eaf1b566 08-Jun-2023 Jakub Beránek <berykubik@gmail.com>

Increase memory of BOLT runtime instrumentation bump allocator used for writing resulting profile

The BOLT instrumentation runtime uses a bump allocator that has a fixed amount of maximum memory. In

Increase memory of BOLT runtime instrumentation bump allocator used for writing resulting profile

The BOLT instrumentation runtime uses a bump allocator that has a fixed amount of maximum memory. In some cases, this memory limit is not large enough (https://github.com/llvm/llvm-project/issues/59174). We are hitting this limit when instrumenting the Rust compiler with BOLT.

This change increases the memory of the bump allocator used for writing the resulting BOLT profile.

Reviewed By: rafauler

Differential Revision: https://reviews.llvm.org/D151891

show more ...


Revision tags: llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0, llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7, llvmorg-15.0.6, llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init
# bd301a41 07-Jul-2022 Michał Chojnowski <michal.chojnowski@scylladb.com>

[BOLT] Fix concurrent hash table modification in the instrumentation runtime

`__bolt_instr_data_dump()` does not lock the hash tables when iterating
over them, so the iteration can happen concurrent

[BOLT] Fix concurrent hash table modification in the instrumentation runtime

`__bolt_instr_data_dump()` does not lock the hash tables when iterating
over them, so the iteration can happen concurrently with a modification
done in another thread, when the table is in an inconsistent state. This
also has been observed in practice, when it caused a segmentation fault.

We fix this by locking hash tables during iteration. This is done by taking
the lock in `forEachElement()`.
The only other site of iteration, `resetCounters()`, has been correctly
locking the table even before this patch. This patch removes its `Lock`
because the lock is now taken in the inner `forEachElement()`.

Reviewed By: maksfb, yota9

Differential Revision: https://reviews.llvm.org/D129089

show more ...


# ea2182fe 06-Jul-2022 Maksim Panchenko <maks@fb.com>

[BOLT] Add runtime functions required by freestanding environment

Compiler can generate calls to some functions implicitly, even under
constraints of freestanding environment. Make sure these functi

[BOLT] Add runtime functions required by freestanding environment

Compiler can generate calls to some functions implicitly, even under
constraints of freestanding environment. Make sure these functions are
available in our runtime objects.

Fixes test failures on some systems after https://reviews.llvm.org/D128960.

Reviewed By: yota9

Differential Revision: https://reviews.llvm.org/D129168

show more ...


Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3, llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2
# 4c106cfd 11-Jan-2022 Maksim Panchenko <maks@fb.com>

Merge BOLT into LLVM monorepo

Details of the merge are available at llvm-dev.

Mailing-list: https://lists.llvm.org/pipermail/llvm-dev/2022-January/154638.html [llvm-dev] Preparing BOLT for LLVM mon

Merge BOLT into LLVM monorepo

Details of the merge are available at llvm-dev.

Mailing-list: https://lists.llvm.org/pipermail/llvm-dev/2022-January/154638.html [llvm-dev] Preparing BOLT for LLVM monorepo

Co-authored-by: Rafael Auler <rafaelauler@fb.com>

show more ...


# 883bf0e8 29-Dec-2021 Amir Ayupov <aaupov@fb.com>

[BOLT][NFC] Fix braces usage in the rest of the codebase

Summary:
Refactor remaining bolt sources to follow the braces rule for if/else/loop from
[LLVM Coding Standards](https://llvm.org/docs/Coding

[BOLT][NFC] Fix braces usage in the rest of the codebase

Summary:
Refactor remaining bolt sources to follow the braces rule for if/else/loop from
[LLVM Coding Standards](https://llvm.org/docs/CodingStandards.html).

(cherry picked from FBD33345885)

show more ...


# 2f09f445 21-Dec-2021 Maksim Panchenko <maks@fb.com>

[BOLT][NFC] Fix file-description comments

Summary: Fix comments at the start of source files.

(cherry picked from FBD33274597)


123