-
Notifications
You must be signed in to change notification settings - Fork 566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i#4328 AArch64 prefetch and flush instrs: Add trace types for prefetch instructions #4341
i#4328 AArch64 prefetch and flush instrs: Add trace types for prefetch instructions #4341
Conversation
… prefetch instrs. Adds new trace types for AArch64 prfm and prfum instructions. These prefetch instructions have multiple variants based on: - prefetch target: this may be the L1, L2 or L3 cache - prefetch policy: either temporal or non-temporal - type: prefetch may be for load, instruction or store Also makes changes to account for these new prefetch trace types in drcachesim. Issue: #4328
Based on logs the aarch64-linux-gnu-gcc cross-compiler is missing, which is causing 'no such instruction' errors for AArch64 prfm/prfum instructions in prefetch_aarch64_app.c. Verified locally that it compiles with aarch64-linux-gnu-gcc. Also, remove macro added earlier which is not the solution.
This is required to fix the DYNAMORIO_A64_ON_X86_ONLY Travis build.
__builtin_prefetch is not invoked when the test is compiled with -m32. This leads to zero prefetch counts.
clients/drcachesim/tests/prefetch-aarch64-basic-counts.templatex
Outdated
Show resolved
Hide resolved
Didn't realise that I had used this before. Even though alternative operators are C++ standard, it might be better to avoid them for clarity.
Travis is failing for macOS: https://travis-ci.com/github/DynamoRIO/dynamorio/jobs/355707609. I couldn't find any useful information to debug this in the log, except that it exited with code 2. @derekbruening any idea what may be the cause? |
See #4223. Somehow when the Mac build/tests fail the output is truncated. Maybe a Travis bug. Do you have a Mac you could repro on? |
clients/drcachesim/tests/prefetch-aarch64-basic-counts.templatex
Outdated
Show resolved
Hide resolved
This is an attempt to fix the truncated log issue for macOS on Travis. It was suggested as a workaround at travis-ci/travis-ci#8973
This reverts commit 18c2a9d.
…ed on AArch64. We expect that testing for exact prefetch counts will be flaky. Hence, we modify existing output templates to accept any non-zero value of prefetch counts. To test exact counts, we use a checked-in offline trace instead.
Some tests are unable to read the trace file, probably because zlib is absent.
…ounts. Also remote redundant AArch64 C inline asm test.
…types. This is in preparation to re-use trace types for prefetch instrs of different architectures, where possible.
This is required because these trace types got rearranged in a previous commit.
clients/drcachesim/tests/offline-allasm-aarch64-prefetch-counts.templatex
Outdated
Show resolved
Hide resolved
clients/drcachesim/tests/offline-builtin-prefetch-basic-counts.templatex
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for adding the detailed tests and the arch-agnostic enums.
…h types. Based on documentation, some AArch64 prefetch encodings are not accessible using prfop.
Adds new trace types for AArch64 prfm and prfum instructions. These prefetch instructions have multiple variants based on:
Also makes changes to account for these new prefetch trace types in drcachesim.
Issue: #4328