History log of /llvm-project/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp (Results 1 – 25 of 158)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init
# 72225ca2 14-Jan-2025 Min Hsu <min.hsu@sifive.com>

Revert "Reland: "[Exegesis] Add the ability to dry-run the measurement phase (#121991)" (#122775)"

This reverts commit a39aaf35d3858a5542f532e399482c2bb0259dac and
63d3bd6d0caf8185aba49540fe2f67512f

Revert "Reland: "[Exegesis] Add the ability to dry-run the measurement phase (#121991)" (#122775)"

This reverts commit a39aaf35d3858a5542f532e399482c2bb0259dac and
63d3bd6d0caf8185aba49540fe2f67512fdf3a98.

Due to test failures on MacOSX.

show more ...


Revision tags: llvmorg-19.1.7
# a39aaf35 13-Jan-2025 Min-Yih Hsu <min.hsu@sifive.com>

Reland: "[Exegesis] Add the ability to dry-run the measurement phase (#121991)" (#122775)

This relands f8f8598fd886cddfd374fa43eb6d7d37d301b576

Follow up on #122371:
The problem here is a little

Reland: "[Exegesis] Add the ability to dry-run the measurement phase (#121991)" (#122775)

This relands f8f8598fd886cddfd374fa43eb6d7d37d301b576

Follow up on #122371:
The problem here is a little subtle: when we dry-run the measurement
phase, we create a LLJIT instance without actually executing the
snippets. The key is, LLJIT has its own TargetMachine which uses triple
designated by LLVM_TARGET_ARCH (which is default to host). On a machine
that does not support Exegesis, the LLJIT would fail to create its
TargetMachine because llvm-exegesis don't even register the host's
target!

Putting this test into any of the target-specific folder won't help,
because it's about the host. And personally I don't really want to use
`exegesis-can-execute-<arch>` for generic tests like this -- it's too
strict as we don't actually need to execute the snippet.

My solution here is creating another test feature which is added only
when LLVM_TARGET_ARCH is supported by llvm-exegesis. This feature is
something in between `<arch>-registered-target` and
`exegesis-can-execute-<arch>`.

show more ...


# d01ae567 09-Jan-2025 Min-Yih Hsu <min.hsu@sifive.com>

Revert "[Exegesis] Add the ability to dry-run the measurement phase (… (#122371)

…#121991)"

This reverts commit f8f8598fd886cddfd374fa43eb6d7d37d301b576.

This breaks ARMv7 and s390x buildbot w

Revert "[Exegesis] Add the ability to dry-run the measurement phase (… (#122371)

…#121991)"

This reverts commit f8f8598fd886cddfd374fa43eb6d7d37d301b576.

This breaks ARMv7 and s390x buildbot with the following message:
```
llvm-exegesis error: No available targets are compatible with triple "armv8l-unknown-linux-gnueabihf"
FileCheck error: '<stdin>' is empty.
FileCheck command line: /home/tcwg-buildbot/worker/clang-armv7-2stage/stage2/bin/FileCheck /home/tcwg-buildbot/worker/clang-armv7-2stage/llvm/llvm/test/tools/llvm-exegesis/dry-run-measurement.test
```

show more ...


# f8f8598f 09-Jan-2025 Min-Yih Hsu <min.hsu@sifive.com>

[Exegesis] Add the ability to dry-run the measurement phase (#121991)

With the new benchmark phase, `dry-run-measurement`, llvm-exegesis can
run everything except the actual snippet execution. It i

[Exegesis] Add the ability to dry-run the measurement phase (#121991)

With the new benchmark phase, `dry-run-measurement`, llvm-exegesis can
run everything except the actual snippet execution. It is useful when we
want to test some parts of the code between the `assemble-measured-code`
and `measure` phase without actually running on native platforms.

show more ...


# 48a6e514 24-Dec-2024 Aiden Grossman <agrossman154@yahoo.com>

[llvm-exegesis] Fix typo in f2334c5919ec077e6a8deeaf43a5b5188baf0251

This should have been in the original commit, but I somehow forgot to
run git add && git commit --amend --no-edit between making

[llvm-exegesis] Fix typo in f2334c5919ec077e6a8deeaf43a5b5188baf0251

This should have been in the original commit, but I somehow forgot to
run git add && git commit --amend --no-edit between making the change in
my editor, saving the file, and pushing the commit.

show more ...


# f2334c59 24-Dec-2024 Aiden Grossman <agrossman154@yahoo.com>

[llvm-exegesis] Make benchmark pinning actually work

When originally writing this feature up, I apparently completely forgot
to actually make the test exercise it and left an extra exit in the
funct

[llvm-exegesis] Make benchmark pinning actually work

When originally writing this feature up, I apparently completely forgot
to actually make the test exercise it and left an extra exit in the
function implementing the functionality without the appropriate
preprocessor macros around it, causing things to never work. This patch
should fix that.

show more ...


Revision tags: llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1
# e093bb9e 23-Sep-2024 Aiden Grossman <aidengrossman@google.com>

Reland "[llvm-exegesis] Add support for pinning benchmarking process to a CPU (#85168)" (#109688)

This reverts commit 2cd20c255684257b86940bdda6861897f0bf3c00.

This relands commit 9886788a8a500a1

Reland "[llvm-exegesis] Add support for pinning benchmarking process to a CPU (#85168)" (#109688)

This reverts commit 2cd20c255684257b86940bdda6861897f0bf3c00.

This relands commit 9886788a8a500a1b429a6db64397c849b112251c.

This was causing more buildbot failures due to getcpu not being
available with glibc <=2.29. This patch fixes that by directly making
the syscall, assuming the syscall number macro is available.

show more ...


# 2cd20c25 23-Sep-2024 Aiden Grossman <aidengrossman@google.com>

Revert "[llvm-exegesis] Add support for pinning benchmarking process to a CPU (#85168)"

This reverts commit 6fc2451167ec991361dd0568de9a9fa2926f8da8.

This broke some more buildbots.


# cd80ed42 23-Sep-2024 Jie Fu <jiefu@tencent.com>

[llvm-exegesis] Fix -Wunused-variable in BenchmarkRunner.cpp (NFC)

/llvm-project/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp:415:18:
error: unused variable 'CurrentCPU' [-Werror,-Wunused-variab

[llvm-exegesis] Fix -Wunused-variable in BenchmarkRunner.cpp (NFC)

/llvm-project/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp:415:18:
error: unused variable 'CurrentCPU' [-Werror,-Wunused-variable]
unsigned int CurrentCPU;
^
1 error generated.

show more ...


# 6fc24511 23-Sep-2024 Aiden Grossman <aidengrossman@google.com>

Reland "[llvm-exegesis] Add support for pinning benchmarking process to a CPU (#85168)"

This reverts commit 5e3d48a68096a0017a0fa4bb89f2d48767c8a7e4.

This relands commit 9886788a8a500a1b429a6db6439

Reland "[llvm-exegesis] Add support for pinning benchmarking process to a CPU (#85168)"

This reverts commit 5e3d48a68096a0017a0fa4bb89f2d48767c8a7e4.

This relands commit 9886788a8a500a1b429a6db64397c849b112251c.

This was originally causing build failures on more esoteric platforms
that have different definitions of getcpu. This is only intended to be
supported on x86-64 currently, so just use preprocessor definitions to
special case the function.

show more ...


# 5e3d48a6 19-Sep-2024 Aiden Grossman <aidengrossman@google.com>

Revert "[llvm-exegesis] Add support for pinning benchmarking process to a CPU (#85168)"

This reverts commit 9886788a8a500a1b429a6db64397c849b112251c.

This was breaking builds on ppc64 and AIX. Pull

Revert "[llvm-exegesis] Add support for pinning benchmarking process to a CPU (#85168)"

This reverts commit 9886788a8a500a1b429a6db64397c849b112251c.

This was breaking builds on ppc64 and AIX. Pulling so I have time to
investigate.

show more ...


# 9886788a 19-Sep-2024 Aiden Grossman <aidengrossman@google.com>

[llvm-exegesis] Add support for pinning benchmarking process to a CPU (#85168)

This patch adds in support for pinning a benchmarking process to a
specific CPU (in the subprocess benchmarking mode o

[llvm-exegesis] Add support for pinning benchmarking process to a CPU (#85168)

This patch adds in support for pinning a benchmarking process to a
specific CPU (in the subprocess benchmarking mode on Linux). This is
intended to be used in environments where a certain set of CPUs is
isolated from the scheduler using something like cgroups and thus should
present less potential for noise than normal. This also opens up the
door for doing multithreaded benchmarking as we can now pin benchmarking
processes to specific CPUs that we know won't interfere with each other.

show more ...


Revision tags: llvmorg-19.1.0, llvmorg-19.1.0-rc4
# 89e6a288 30-Aug-2024 Daniil Fukalov <dfukalov@gmail.com>

[NFC] Add explicit #include llvm-config.h where its macros are used. (#106621)

Without these explicit includes, removing other headers, who implicitly
include llvm-config.h, may have non-trivial si

[NFC] Add explicit #include llvm-config.h where its macros are used. (#106621)

Without these explicit includes, removing other headers, who implicitly
include llvm-config.h, may have non-trivial side effects.

show more ...


# fac87b88 27-Aug-2024 Aiden Grossman <aidengrossman@google.com>

[llvm-exegesis] Switch from intptr_t to uintptr_t in most cases (#102860)

This patch switches most of the uses of intptr_t to uintptr_t within
llvm-exegesis for the subprocess memory support. In th

[llvm-exegesis] Switch from intptr_t to uintptr_t in most cases (#102860)

This patch switches most of the uses of intptr_t to uintptr_t within
llvm-exegesis for the subprocess memory support. In the vast majority of
cases we do not want a signed component of the address, hence making
intptr_t undesirable. intptr_t is left for error handling, for example
when making syscalls and we need to see if the syscall returned -1.

show more ...


Revision tags: llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2
# 1e8df9e8 27-Jul-2024 Aiden Grossman <aidengrossman@google.com>

[llvm-exegesis] Use correct rseq struct size (#100804)

Glibc v2.40 changes the definition of __rseq_size to the usable area of
the struct rather than the actual size of the struct to accommodate
u

[llvm-exegesis] Use correct rseq struct size (#100804)

Glibc v2.40 changes the definition of __rseq_size to the usable area of
the struct rather than the actual size of the struct to accommodate
users trying to figure out what features can be used. This change breaks
llvm-exegesis trying to disable rseq as the size registered in the
kernel is no longer equal to __rseq_size. This patch adds a check to see
if __rseq_size is less than 32 bytes and uses 32 as a value if it is
given alignment requirements.

Fixes #100791.

show more ...


Revision tags: llvmorg-19.1.0-rc1, llvmorg-20-init, llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5
# 74a5e778 26-Apr-2024 Aiden Grossman <aidengrossman@google.com>

[llvm-exegesis] Close file descriptors after use (#86584)

There are several insstances in the subprocess executor in llvm-exegesis
where we fail to close file descriptors after using them. This lea

[llvm-exegesis] Close file descriptors after use (#86584)

There are several insstances in the subprocess executor in llvm-exegesis
where we fail to close file descriptors after using them. This leaves
them open, which can cause issues later on if a third-party binary is
using the exegesis libraries and executing many blocks before exiting.
Leaving the descriptors open until process exit is also bad practice.
This patch fixes that by explicitly calling close() when we are done
with a specific file descriptor.

This patch fixes #86583.

show more ...


Revision tags: llvmorg-18.1.4, llvmorg-18.1.3
# 50e62181 22-Mar-2024 Aiden Grossman <agrossman154@yahoo.com>

Reland "[llvm-exegesis] Add thread IDs to subprocess memory names (#84451)"

This reverts commit 1fe9c417a0bf143f9bb9f9e1fbf7b20f44196883.

This relands commit 6bbe8a296ee91754d423c59c35727eaa624f714

Reland "[llvm-exegesis] Add thread IDs to subprocess memory names (#84451)"

This reverts commit 1fe9c417a0bf143f9bb9f9e1fbf7b20f44196883.

This relands commit 6bbe8a296ee91754d423c59c35727eaa624f7140.

This was causing build failures on one of the ARMv8 builders. Still not
completely sure why, but relanding it to see if the failure pops up
again. If it does, the plan is to fix forward by disabling tests on ARM
temporarily as llvm-exegesis does not currently use SubprocessMemory
on ARM.

show more ...


# 36a6afdd 22-Mar-2024 Aiden Grossman <agrossman154@yahoo.com>

Reland "[llvm-exegesis] Refactor parent code to separate function (#86232)"

This reverts commit c3a41aac5f32475b9a0499e6e888e713763566dc.

This relands commit bd493756fa51e538575fc320aae50d75394f056

Reland "[llvm-exegesis] Refactor parent code to separate function (#86232)"

This reverts commit c3a41aac5f32475b9a0499e6e888e713763566dc.

This relands commit bd493756fa51e538575fc320aae50d75394f0567.

Apparently I forgot to update a couple values, so this change failed on
every builder that builds those sections (should be every Linux
platform) rather than something architecture specific like originally
thought. I swore I updated the values and ran check-llvm before merging.
Wondering If I forgot to push those changes...

show more ...


# c3a41aac 22-Mar-2024 Aiden Grossman <agrossman154@yahoo.com>

Revert "[llvm-exegesis] Refactor parent code to separate function (#86232)"

This reverts commit bd493756fa51e538575fc320aae50d75394f0567.

Causes build failures on non-X86 platforms.
https://lab.llv

Revert "[llvm-exegesis] Refactor parent code to separate function (#86232)"

This reverts commit bd493756fa51e538575fc320aae50d75394f0567.

Causes build failures on non-X86 platforms.
https://lab.llvm.org/buildbot/#/changes/128363

show more ...


# bd493756 22-Mar-2024 Aiden Grossman <agrossman154@yahoo.com>

[llvm-exegesis] Refactor parent code to separate function (#86232)

This patch refactors the parent code to a separate function in the
subprocess executor to make the code more clear and easy to fol

[llvm-exegesis] Refactor parent code to separate function (#86232)

This patch refactors the parent code to a separate function in the
subprocess executor to make the code more clear and easy to follow.

show more ...


# 718fbbef 22-Mar-2024 Aiden Grossman <agrossman154@yahoo.com>

[llvm-exegesis] Kill process that recieve a signal (#86069)

Before this patch, llvm-exegesis would leave processes lingering that
experienced signals like segmentation faults. They would up in a
s

[llvm-exegesis] Kill process that recieve a signal (#86069)

Before this patch, llvm-exegesis would leave processes lingering that
experienced signals like segmentation faults. They would up in a
signal-delivery-stop state under the ptrace and never exit. This does
not cause problems (or at least many) in llvm-exegesis as they are
cleaned up after the main process exits, which usually happens quickly.
However, in downstream use, when many blocks are being executed (many of
which run into signals) within a single process, these processes stay
around and can easily exhaust the process limit on some systems.

This patch cleans them up by sending SIGKILL after information about the
signal that was sent has been gathered.

show more ...


Revision tags: llvmorg-18.1.2
# 1fe9c417 13-Mar-2024 Aiden Grossman <agrossman154@yahoo.com>

Revert "Reland "[llvm-exegesis] Add thread IDs to subprocess memory names (#84451)""

This reverts commit 8003f553a01a9a2a7eb09fe07e88f1ba9ee7d3a7.

This (and/or a related commit) was causing build f

Revert "Reland "[llvm-exegesis] Add thread IDs to subprocess memory names (#84451)""

This reverts commit 8003f553a01a9a2a7eb09fe07e88f1ba9ee7d3a7.

This (and/or a related commit) was causing build failures on one of the
buildbots that needs more investigation. More information is available
at https://lab.llvm.org/buildbot/#/builders/178/builds/7015.

show more ...


# 5a4e2210 13-Mar-2024 Aiden Grossman <agrossman154@yahoo.com>

Revert "[llvm-exegesis] Use LLVM Support to get thread ID"

This reverts commit 1c3b15e9f5bc671e40bcf5d3475f5425466754ce.

This (and/or) a related patch was causing build failures on one of the
build

Revert "[llvm-exegesis] Use LLVM Support to get thread ID"

This reverts commit 1c3b15e9f5bc671e40bcf5d3475f5425466754ce.

This (and/or) a related patch was causing build failures on one of the
buildbots. More information is available at
https://lab.llvm.org/buildbot/#/builders/178/builds/7015.

show more ...


# 1c3b15e9 12-Mar-2024 Aiden Grossman <agrossman154@yahoo.com>

[llvm-exegesis] Use LLVM Support to get thread ID

This patch switches from manually using the Linux syscall to get the
current thread ID to using the relevant LLVM Support libraries that
abstract ov

[llvm-exegesis] Use LLVM Support to get thread ID

This patch switches from manually using the Linux syscall to get the
current thread ID to using the relevant LLVM Support libraries that
abstract over the low level system details.

show more ...


# 8003f553 12-Mar-2024 Aiden Grossman <agrossman154@yahoo.com>

Reland "[llvm-exegesis] Add thread IDs to subprocess memory names (#84451)"

This reverts commit aefad27096bba513f06162fac2763089578f3de4.

This relands commit 6bbe8a296ee91754d423c59c35727eaa624f714

Reland "[llvm-exegesis] Add thread IDs to subprocess memory names (#84451)"

This reverts commit aefad27096bba513f06162fac2763089578f3de4.

This relands commit 6bbe8a296ee91754d423c59c35727eaa624f7140.

This patch was casuing build failures on non-Linux platforms due to the
default implementations for the functions not being updated. This ended
up causing out-of-line definition errors. Fixed for the relanding.

show more ...


1234567