Page MenuHomePhabricator

Please use GitHub pull requests for new patches. Phabricator shutdown timeline

rafauler (Rafael Auler)
User

Projects

User does not belong to any projects.

User Details

User Since
Feb 14 2018, 11:09 AM (293 w, 2 d)

Recent Activity

Tue, Sep 12

rafauler accepted D159507: [BOLT] Fix AutoFDO output format after D154120.
Tue, Sep 12, 12:14 PM · Restricted Project, Restricted Project

Mon, Sep 11

rafauler updated the diff for D158911: [BOLT] Support input binaries that use R_X86_GOTPC64.

Fix stack alignment in testcases, which caused libc's puts() stack to
crash in ubuntu systems because libc was using movaps in malloc
initialization.

Mon, Sep 11, 5:25 PM · Restricted Project, Restricted Project

Aug 29 2023

rafauler updated the diff for D158911: [BOLT] Support input binaries that use R_X86_GOTPC64.

Triggering build tests again after removing parent revs

Aug 29 2023, 5:47 PM · Restricted Project, Restricted Project
rafauler added a comment to D158911: [BOLT] Support input binaries that use R_X86_GOTPC64.

In this solution, we don't need to mark any symbols as globals and therefore I've removed the dependency on the parent diff "[BOLT] Local hidden should be global syms."

Aug 29 2023, 5:39 PM · Restricted Project, Restricted Project
rafauler updated the diff for D158911: [BOLT] Support input binaries that use R_X86_GOTPC64.

Reviewer suggestions

Aug 29 2023, 5:35 PM · Restricted Project, Restricted Project
rafauler added inline comments to D158911: [BOLT] Support input binaries that use R_X86_GOTPC64.
Aug 29 2023, 2:11 PM · Restricted Project, Restricted Project

Aug 28 2023

rafauler abandoned D158909: [JITLink] Honor shouldAddDefaultPasses in x86-64 ELF.
Aug 28 2023, 12:28 PM · Restricted Project, Restricted Project
rafauler added a comment to D158909: [JITLink] Honor shouldAddDefaultPasses in x86-64 ELF.

Thanks a bunch @lhames , that works!

Aug 28 2023, 12:27 PM · Restricted Project, Restricted Project
rafauler added a comment to D158910: [BOLT] Local hidden should be global syms.

Thanks for the review!

Aug 28 2023, 12:26 PM · Restricted Project, Restricted Project

Aug 25 2023

rafauler committed rGb9deec1cd9ca: [BOLT] Fix cross-compilation build (authored by rafauler).
[BOLT] Fix cross-compilation build
Aug 25 2023, 5:33 PM · Restricted Project
rafauler closed D158906: [BOLT] Fix cross-compilation build.
Aug 25 2023, 5:33 PM · Restricted Project, Restricted Project
rafauler added a comment to D158906: [BOLT] Fix cross-compilation build.

I'll commit this fix since this seems low-risk enough to unblock buildbots crosscompiling. If it is not an adequate fix, feel free to revert it.

Aug 25 2023, 5:32 PM · Restricted Project, Restricted Project
rafauler requested review of D158911: [BOLT] Support input binaries that use R_X86_GOTPC64.
Aug 25 2023, 4:30 PM · Restricted Project, Restricted Project
rafauler requested review of D158910: [BOLT] Local hidden should be global syms.
Aug 25 2023, 4:29 PM · Restricted Project, Restricted Project
rafauler updated the summary of D158909: [JITLink] Honor shouldAddDefaultPasses in x86-64 ELF.
Aug 25 2023, 4:28 PM · Restricted Project, Restricted Project
rafauler requested review of D158909: [JITLink] Honor shouldAddDefaultPasses in x86-64 ELF.
Aug 25 2023, 4:26 PM · Restricted Project, Restricted Project
rafauler added a comment to D155098: [BOLT] BL/BH are considered aliases in regreassign.

I'm not sure why runtime/X86/reg-reassign-swap-cold.s is failing. I can't repro the failure. I would suggest submitting your changes on another revision using arc diff --draft, so it is not published, but you can still run the tests to see if they pass, and they debug it from there -- perhaps by removing modifications you did to see if the test pass, getting hints on what is wrong.

The current modifications appear to have resulted in all test cases passing.

Aug 25 2023, 4:13 PM · Restricted Project, Restricted Project
rafauler added inline comments to D151942: [BOLT] Instrumentation: AArch64 instrumentation support in runtime.
Aug 25 2023, 4:09 PM · Restricted Project, Restricted Project
rafauler requested review of D158906: [BOLT] Fix cross-compilation build.
Aug 25 2023, 4:09 PM · Restricted Project, Restricted Project

Aug 24 2023

rafauler added a comment to D155098: [BOLT] BL/BH are considered aliases in regreassign.

I'm not sure why runtime/X86/reg-reassign-swap-cold.s is failing. I can't repro the failure. I would suggest submitting your changes on another revision using arc diff --draft, so it is not published, but you can still run the tests to see if they pass, and they debug it from there -- perhaps by removing modifications you did to see if the test pass, getting hints on what is wrong.

Aug 24 2023, 4:49 PM · Restricted Project, Restricted Project
rafauler committed rGb59cf211a096: [BOLT] Don't choke on injected functions' IO map (authored by rafauler).
[BOLT] Don't choke on injected functions' IO map
Aug 24 2023, 12:03 PM · Restricted Project
rafauler closed D158685: [BOLT] Don't choke on injected functions' IO map.
Aug 24 2023, 12:03 PM · Restricted Project, Restricted Project
rafauler committed rGb5ac1697c88b: [BOLT] Give precedence to first AddressMap entries (authored by rafauler).
[BOLT] Give precedence to first AddressMap entries
Aug 24 2023, 12:00 PM · Restricted Project
rafauler closed D158686: [BOLT] Give precedence to first AddressMap entries.
Aug 24 2023, 12:00 PM · Restricted Project, Restricted Project

Aug 23 2023

rafauler added a reviewer for D158686: [BOLT] Give precedence to first AddressMap entries: jobnoorman.
Aug 23 2023, 5:12 PM · Restricted Project, Restricted Project
rafauler requested review of D158686: [BOLT] Give precedence to first AddressMap entries.
Aug 23 2023, 5:12 PM · Restricted Project, Restricted Project
rafauler added a reviewer for D158685: [BOLT] Don't choke on injected functions' IO map: jobnoorman.
Aug 23 2023, 5:10 PM · Restricted Project, Restricted Project
rafauler requested review of D158685: [BOLT] Don't choke on injected functions' IO map.
Aug 23 2023, 5:09 PM · Restricted Project, Restricted Project
rafauler accepted D154121: [BOLT][Instrumentation] Fix indirect call profile in PIE.

Thanks for working on this. LGTM

Aug 23 2023, 12:18 PM · Restricted Project, Restricted Project
rafauler accepted D154436: [BOLT][Instrumentation] Keep profile open in WatchProcess.

Thanks! LGTM

Aug 23 2023, 12:16 PM · Restricted Project, Restricted Project
rafauler accepted D155098: [BOLT] BL/BH are considered aliases in regreassign.

Thanks! LGTM

Aug 23 2023, 11:51 AM · Restricted Project, Restricted Project

Aug 22 2023

rafauler accepted D151920: [BOLT] Instrumentation: Fix tests.

LGTM. Thanks!

Aug 22 2023, 6:52 PM · Restricted Project, Restricted Project
rafauler accepted D158191: [BOLT] Fix trap value for non-X86.

LGTM. Thanks!

Aug 22 2023, 2:31 PM · Restricted Project, Restricted Project
rafauler added inline comments to D155098: [BOLT] BL/BH are considered aliases in regreassign.
Aug 22 2023, 2:09 PM · Restricted Project, Restricted Project

Aug 18 2023

rafauler accepted D151901: [BOLT] Instrumentation: Add support for MacOS counters.

LGTM

Aug 18 2023, 5:37 PM · Restricted Project, Restricted Project
rafauler accepted D151899: [BOLT] Instrumentation: Initial instrumentation support for AArch64.

I think you forgot to delete the now unnecessary CodePointerSize parameter.

Aug 18 2023, 5:36 PM · Restricted Project, Restricted Project, Restricted Project
rafauler accepted D151942: [BOLT] Instrumentation: AArch64 instrumentation support in runtime.

Thanks Elvina! LGTM

Aug 18 2023, 5:04 PM · Restricted Project, Restricted Project

Aug 16 2023

rafauler accepted D156018: [BOLT] Implement createRelocation for AArch64.

LGTM

Aug 16 2023, 11:18 AM · Restricted Project, Restricted Project, Restricted Project

Aug 9 2023

rafauler added inline comments to D151942: [BOLT] Instrumentation: AArch64 instrumentation support in runtime.
Aug 9 2023, 5:39 PM · Restricted Project, Restricted Project

Aug 8 2023

rafauler accepted D141931: [BOLT] Consider Code Fragments during regreassign.

Thanks! LGTM with some modifications I made to the test file available here: https://pastebin.com/3abP1S5G

Aug 8 2023, 1:44 PM · Restricted Project, Restricted Project, Restricted Project

Aug 7 2023

rafauler added a comment to D154121: [BOLT][Instrumentation] Fix indirect call profile in PIE.

Thanks! I can start looking into this next week (and the week after it) during my shift.

Aug 7 2023, 5:35 PM · Restricted Project, Restricted Project
rafauler added inline comments to D156018: [BOLT] Implement createRelocation for AArch64.
Aug 7 2023, 5:30 PM · Restricted Project, Restricted Project, Restricted Project
rafauler added inline comments to D157217: [BOLT][NFC] Split createRelocation in X86 and share the second part.
Aug 7 2023, 5:26 PM · Restricted Project, Restricted Project, Restricted Project
rafauler added a comment to D141931: [BOLT] Consider Code Fragments during regreassign.

Thanks! Mostly formatting nits:

Aug 7 2023, 3:19 PM · Restricted Project, Restricted Project, Restricted Project

Jul 31 2023

rafauler added a comment to D147544: [BOLT] Move from RuntimeDyld to JITLink.

I'm not familiar with LongJmpPass but I did notice the following comment:

We pull this pass inside BOLT because here we can do a better job at stub inserting by manipulating the CFG, something linkers can't do.

So wouldn't you lose something if this was moved to JITLink?

You're right, losing CFG will make branches impossible to relax. We'll need MC layer to emit relocs for every branch which is apparently default behavior for RISC-V but not AArch64.
AFAIK currently JITLink doesn't relax branches for RISC-V, but if you intend to implement it, we can see how it works out and consider doing it for AArch64(starting with some MC option to emit R_AARCH64_JUMP26 and R_AARCH64_CONDBR19). As for updating the output values, it seems you mostly solved it in D154604.
@rafauler, do you think it's feasible to move LongJMP to JITLink if we force MC to generate branch relocs, and are there some other reasons to manipulate the actual CFG?

Jul 31 2023, 5:32 PM · Restricted Project, Restricted Project
rafauler accepted D154922: [BOLT] fix the endless loop of --iterative-guess.

Thanks for the context, the fix looks good to me. Unfortunately, we can't check in the test as is because we can't guarantee the .fdata file will always make sense -- we would typically write this test in assembly language to guarantee offsets remain the same.

Jul 31 2023, 3:02 PM · Restricted Project, Restricted Project

Jul 20 2023

rafauler added a comment to D155758: [BOLT] Add h4xx0r flag to skip updating program headers.

😂

Jul 20 2023, 1:46 PM · Restricted Project, Restricted Project

Jul 18 2023

rafauler accepted D155657: [BOLT][Utils] Pass cmp-rev to nfc-check-setup.
Jul 18 2023, 6:00 PM · Restricted Project, Restricted Project

Jul 11 2023

rafauler added a comment to D154922: [BOLT] fix the endless loop of --iterative-guess.

Thanks for fixing this. We do need context for the diff and a test case.

Jul 11 2023, 7:12 PM · Restricted Project, Restricted Project

Jul 10 2023

rafauler accepted D154895: [BOLT] Fix diagnostic message output.
Jul 10 2023, 7:08 PM · Restricted Project, Restricted Project

Jul 6 2023

rafauler accepted D154667: [BOLT][DWARF] Fix references in tests.
Jul 6 2023, 4:40 PM · Restricted Project, Restricted Project

Jul 5 2023

rafauler added a comment to D151942: [BOLT] Instrumentation: AArch64 instrumentation support in runtime.

I wonder why is this diff not showing up on top of the D151899 diff stack anymore? Isn't it dependent on that stack?

Jul 5 2023, 11:44 AM · Restricted Project, Restricted Project
rafauler added a comment to D154436: [BOLT][Instrumentation] Keep profile open in WatchProcess.

Thanks for working on this @treapster . Can you add to your diff stack a diff that adds a test that uses this improved mechanism?

Jul 5 2023, 11:25 AM · Restricted Project, Restricted Project
rafauler added a comment to D147544: [BOLT] Move from RuntimeDyld to JITLink.

Hello, @jobnoorman, out team is currently evaluating possible improvements to LongJmp pass, and we're wondering what are the opportunities for doing relaxation/stub insertion on JITLink side? I see currently JITLink can build PLT with TableManager and relax some calls to it and GOT accesses, do you think it's possible/worth it to to extend this functionality further to support a more general replacement of instructions as we do in LongJMP? It seems it already works like that for RISCV because of D149526, does that mean we can implement similar patches for AArch64/x86 and throw LongJmp away? I guess it would be tricky for X86 because of all the encoding mess, but i'm wondering what your thoughts are.

Jul 5 2023, 11:10 AM · Restricted Project, Restricted Project

Jun 29 2023

rafauler accepted D154115: [BOLT][NFC] Simplify postProcessJumpTables.

LGTM

Jun 29 2023, 10:17 PM · Restricted Project, Restricted Project
rafauler added inline comments to D154056: [BOLT][Instrumentation][NFC] define and use mmap constants.
Jun 29 2023, 2:02 PM · Restricted Project, Restricted Project, Restricted Project
rafauler added inline comments to D154056: [BOLT][Instrumentation][NFC] define and use mmap constants.
Jun 29 2023, 1:47 PM · Restricted Project, Restricted Project, Restricted Project
rafauler accepted D153771: [BOLT][Instrumentation] Fix hash table memory corruption and append-pid option.

LGTM without the test

Jun 29 2023, 1:29 PM · Restricted Project, Restricted Project, Restricted Project

Jun 28 2023

rafauler added inline comments to D153771: [BOLT][Instrumentation] Fix hash table memory corruption and append-pid option.
Jun 28 2023, 6:05 PM · Restricted Project, Restricted Project, Restricted Project
rafauler accepted D153996: [BOLT][NFC] Print functions after attaching profile (-print-profile).

LGTM

Jun 28 2023, 4:15 PM · Restricted Project, Restricted Project
rafauler accepted D153994: [BOLT] Add -dump-cg option to dump call graph.

LGTM

Jun 28 2023, 4:12 PM · Restricted Project, Restricted Project
rafauler accepted D153987: [BOLT][NFC] Add extra debug logging to buildCallGraph.

LGTM

Jun 28 2023, 4:09 PM · Restricted Project, Restricted Project
rafauler added inline comments to D153771: [BOLT][Instrumentation] Fix hash table memory corruption and append-pid option.
Jun 28 2023, 4:04 PM · Restricted Project, Restricted Project, Restricted Project

Jun 27 2023

rafauler added inline comments to D153771: [BOLT][Instrumentation] Fix hash table memory corruption and append-pid option.
Jun 27 2023, 3:12 PM · Restricted Project, Restricted Project, Restricted Project
rafauler added a comment to D153771: [BOLT][Instrumentation] Fix hash table memory corruption and append-pid option.

Turns out, the [unknown] entries in profile are because addresses in indirect call descriptions are not relocated, which makes them meaningless in PIE because of ASLR. When the test is compiled with no-pie, indirect calls are recorded accurately. So, we should either compute base address and add it to stored entries, or produce dynamic relocations.

But since .bolt.instr.tables is not allocatable, the only option is to perform relocation by hand. BTW, why isn't it allocatable?

Jun 27 2023, 2:15 PM · Restricted Project, Restricted Project, Restricted Project
rafauler added a comment to D153771: [BOLT][Instrumentation] Fix hash table memory corruption and append-pid option.

Turns out, the [unknown] entries in profile are because addresses in indirect call descriptions are not relocated, which makes them meaningless in PIE because of ASLR. When the test is compiled with no-pie, indirect calls are recorded accurately. So, we should either compute base address and add it to stored entries, or produce dynamic relocations.

Jun 27 2023, 1:58 PM · Restricted Project, Restricted Project, Restricted Project
rafauler added inline comments to D153771: [BOLT][Instrumentation] Fix hash table memory corruption and append-pid option.
Jun 27 2023, 1:56 PM · Restricted Project, Restricted Project, Restricted Project
rafauler added a comment to D151920: [BOLT] Instrumentation: Fix tests.

We need a test that checks indirect calls are correctly handled, like the one we have in D153771

Or we can make that test work for all platforms.

Jun 27 2023, 11:25 AM · Restricted Project, Restricted Project

Jun 26 2023

rafauler added a comment to D144560: [BOLT] RFC: support for in-place binary rewriting.

Thanks @treapster , can you try to rebase on top of current bolt now? I can't test it if the diff doesn't cleanly apply on top of what we have on trunk, and JITLink changed BOLT quite a bit.

Jun 26 2023, 6:55 PM · Restricted Project
rafauler added inline comments to D151899: [BOLT] Instrumentation: Initial instrumentation support for AArch64.
Jun 26 2023, 5:50 PM · Restricted Project, Restricted Project, Restricted Project
rafauler added inline comments to D151942: [BOLT] Instrumentation: AArch64 instrumentation support in runtime.
Jun 26 2023, 5:49 PM · Restricted Project, Restricted Project
rafauler added a comment to D151920: [BOLT] Instrumentation: Fix tests.

We need a test that checks indirect calls are correctly handled, like the one we have in D153771

Jun 26 2023, 5:34 PM · Restricted Project, Restricted Project
rafauler added inline comments to D151899: [BOLT] Instrumentation: Initial instrumentation support for AArch64.
Jun 26 2023, 5:15 PM · Restricted Project, Restricted Project, Restricted Project
rafauler added inline comments to D151901: [BOLT] Instrumentation: Add support for MacOS counters.
Jun 26 2023, 4:52 PM · Restricted Project, Restricted Project
rafauler added inline comments to D153771: [BOLT][Instrumentation] Fix hash table memory corruption and append-pid option.
Jun 26 2023, 4:12 PM · Restricted Project, Restricted Project, Restricted Project
rafauler added a comment to D153771: [BOLT][Instrumentation] Fix hash table memory corruption and append-pid option.

Thanks for working on fixing these issues, @treapster! I have some suggestions below.

Jun 26 2023, 4:04 PM · Restricted Project, Restricted Project, Restricted Project
rafauler added a comment to D153771: [BOLT][Instrumentation] Fix hash table memory corruption and append-pid option.

For some reason CHECK-ALL-DAG clause does not always work as expected on the second invocation, what may be happening here? I tried using {{}} regex to match the words exactly, but it didn't help

Jun 26 2023, 2:48 PM · Restricted Project, Restricted Project, Restricted Project
rafauler added inline comments to D153771: [BOLT][Instrumentation] Fix hash table memory corruption and append-pid option.
Jun 26 2023, 2:47 PM · Restricted Project, Restricted Project, Restricted Project

Jun 22 2023

rafauler added inline comments to D151899: [BOLT] Instrumentation: Initial instrumentation support for AArch64.
Jun 22 2023, 2:57 PM · Restricted Project, Restricted Project, Restricted Project
rafauler committed rGa89c9b35be08: [BOLT] Fixing relative ordering of cold sections under multi-way function… (authored by shatianw_mt).
[BOLT] Fixing relative ordering of cold sections under multi-way function…
Jun 22 2023, 2:28 PM · Restricted Project
rafauler closed D152941: [BOLT] Fixing relative ordering of cold sections under multi-way function splitting.
Jun 22 2023, 2:27 PM · Restricted Project, Restricted Project

Jun 21 2023

rafauler added inline comments to D151920: [BOLT] Instrumentation: Fix tests.
Jun 21 2023, 7:05 PM · Restricted Project, Restricted Project
rafauler accepted D146554: [BOLT][RISCV] Implement R_RISCV_ADD32/SUB32.
Jun 21 2023, 2:51 PM · Restricted Project, Restricted Project
rafauler added inline comments to D146554: [BOLT][RISCV] Implement R_RISCV_ADD32/SUB32.
Jun 21 2023, 1:40 PM · Restricted Project, Restricted Project
rafauler accepted D153346: [BOLT][RISCV] Add tests for simple CFG transformations.
Jun 21 2023, 1:20 PM · Restricted Project, Restricted Project
rafauler accepted D153345: [BOLT] Don't register internal func relocs as external references.

LGTM

Jun 21 2023, 1:19 PM · Restricted Project, Restricted Project

Jun 20 2023

rafauler accepted D153342: [BOLT][RISCV] Implement return/unconditional branch creation.
Jun 20 2023, 6:29 PM · Restricted Project, Restricted Project
rafauler accepted D153344: [BOLT][RISCV] Implement branch reversal.
Jun 20 2023, 6:29 PM · Restricted Project, Restricted Project
rafauler accepted D153343: [BOLT][RISCV] Fix implementation of getTargetSymbol.
Jun 20 2023, 6:29 PM · Restricted Project, Restricted Project
rafauler added inline comments to D153346: [BOLT][RISCV] Add tests for simple CFG transformations.
Jun 20 2023, 6:18 PM · Restricted Project, Restricted Project
rafauler added inline comments to D146554: [BOLT][RISCV] Implement R_RISCV_ADD32/SUB32.
Jun 20 2023, 5:34 PM · Restricted Project, Restricted Project
rafauler added a comment to D152959: [BOLT] Fix sorting functions by execution count.

Can we have a small test case showing the bug?

Jun 20 2023, 4:29 PM · Restricted Project, Restricted Project
rafauler accepted D152941: [BOLT] Fixing relative ordering of cold sections under multi-way function splitting.

LGTM

Jun 20 2023, 4:26 PM · Restricted Project, Restricted Project
rafauler added a comment to D150874: [JITLink][NFC] Store external symbols in a StringMap.

Ping. Can't we just remove this assertion? Is it worth making the runtime much slower to check that we don't have a duplicate external symbol?

Jun 20 2023, 4:09 PM · Restricted Project, Restricted Project
rafauler accepted D152733: [BOLT] Sort CallSiteInfo targets by symbol name in YAMLWriter.

LGTM

Jun 20 2023, 3:07 PM · Restricted Project, Restricted Project

Jun 15 2023

rafauler accepted D152731: [BOLT] Sort BranchData in DataAggregator.

LGTM

Jun 15 2023, 11:48 AM · Restricted Project, Restricted Project

Jun 8 2023

rafauler accepted D152483: [BOLT][NFCI] Use StringRef.split in launchPerfProcess.
Jun 8 2023, 5:17 PM · Restricted Project, Restricted Project

Jun 7 2023

rafauler accepted D151891: Increase memory of BOLT runtime instrumentation bump allocator used for writing resulting profile.

Thanks!

Jun 7 2023, 6:06 PM · Restricted Project, Restricted Project

Jun 5 2023

rafauler added inline comments to D151891: Increase memory of BOLT runtime instrumentation bump allocator used for writing resulting profile.
Jun 5 2023, 12:50 PM · Restricted Project, Restricted Project
rafauler accepted D151948: [BOLT][NFC] Drop MMap events for deleted files.

Where does this happen?

Jun 5 2023, 12:47 PM · Restricted Project, Restricted Project