Page MenuHomePhabricator

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

spupyrev (Sergey Pupyrev)
User

Projects

User does not belong to any projects.

User Details

User Since
Mar 29 2021, 3:03 PM (130 w, 19 h)

Recent Activity

Today

spupyrev added inline comments to D159527: [CodeLayout] Add unittest for cache-directed sort.
Tue, Sep 26, 6:29 AM · Restricted Project, Restricted Project
spupyrev committed rG904b3f66f59e: [ELF] A new code layout algorithm for function reordering [3a/3] (authored by spupyrev).
[ELF] A new code layout algorithm for function reordering [3a/3]
Tue, Sep 26, 6:25 AM · Restricted Project
spupyrev closed D152840: [ELF] A new code layout algorithm for function reordering [3a/3].
Tue, Sep 26, 6:24 AM · Restricted Project, Restricted Project

Yesterday

spupyrev updated the diff for D152840: [ELF] A new code layout algorithm for function reordering [3a/3].

edited ld.lld.1

Mon, Sep 25, 3:42 PM · Restricted Project, Restricted Project
spupyrev updated the diff for D152840: [ELF] A new code layout algorithm for function reordering [3a/3].

nits

Mon, Sep 25, 2:53 PM · Restricted Project, Restricted Project
spupyrev updated the diff for D152840: [ELF] A new code layout algorithm for function reordering [3a/3].

nit

Mon, Sep 25, 10:41 AM · Restricted Project, Restricted Project
spupyrev updated the diff for D152840: [ELF] A new code layout algorithm for function reordering [3a/3].

tests

Mon, Sep 25, 10:38 AM · Restricted Project, Restricted Project
spupyrev updated the diff for D152840: [ELF] A new code layout algorithm for function reordering [3a/3].

minor

Mon, Sep 25, 9:17 AM · Restricted Project, Restricted Project

Thu, Sep 21

spupyrev added a comment to D152840: [ELF] A new code layout algorithm for function reordering [3a/3].

D159526 performed the rename. If this patch is applied, applyCDSort in lld/ELF will need to be updated again. This is exactly the scenario I want to avoid.

Thu, Sep 21, 1:31 AM · Restricted Project, Restricted Project

Wed, Sep 20

spupyrev added a comment to D152840: [ELF] A new code layout algorithm for function reordering [3a/3].

Thanks for the update. I am mainly waiting for the renamed function (applyCDSort does not convey the meaning well), changes of nested std::pair and std::vector => SmallVector<*, 0>

I have an impression the changes are made in the follow-up D159526 (which I'd prefer to land after this one). Do I miss something?

You are right. You may rebase this patch on top of D159526 :)

Wed, Sep 20, 12:20 AM · Restricted Project, Restricted Project

Tue, Sep 19

spupyrev added a comment to D152840: [ELF] A new code layout algorithm for function reordering [3a/3].

Thanks for the update. I am mainly waiting for the renamed function (applyCDSort does not convey the meaning well), changes of nested std::pair and std::vector => SmallVector<*, 0>

Tue, Sep 19, 2:52 PM · Restricted Project, Restricted Project

Mon, Sep 18

spupyrev updated the diff for D152840: [ELF] A new code layout algorithm for function reordering [3a/3].

renaming the option

Mon, Sep 18, 7:02 AM · Restricted Project, Restricted Project
spupyrev updated the summary of D152840: [ELF] A new code layout algorithm for function reordering [3a/3].
Mon, Sep 18, 6:58 AM · Restricted Project, Restricted Project
spupyrev updated the summary of D152840: [ELF] A new code layout algorithm for function reordering [3a/3].
Mon, Sep 18, 6:57 AM · Restricted Project, Restricted Project
spupyrev updated the diff for D152840: [ELF] A new code layout algorithm for function reordering [3a/3].

comments

Mon, Sep 18, 6:56 AM · Restricted Project, Restricted Project

Wed, Sep 13

spupyrev updated the diff for D152840: [ELF] A new code layout algorithm for function reordering [3a/3].

rebasing to latest

Wed, Sep 13, 2:14 PM · Restricted Project, Restricted Project
spupyrev retitled D152840: [ELF] A new code layout algorithm for function reordering [3a/3] from A new code layout algorithm for function reordering [3a/3] to [ELF] A new code layout algorithm for function reordering [3a/3].
Wed, Sep 13, 2:11 PM · Restricted Project, Restricted Project
spupyrev updated the diff for D152840: [ELF] A new code layout algorithm for function reordering [3a/3].

Thanks for looking into this. I made the requested changes

Wed, Sep 13, 2:04 PM · Restricted Project, Restricted Project

Mon, Sep 11

spupyrev updated the diff for D152840: [ELF] A new code layout algorithm for function reordering [3a/3].

addressing comments, adding a test for cdsort

Mon, Sep 11, 6:54 AM · Restricted Project, Restricted Project

Fri, Sep 8

spupyrev committed rG42da84fda979: [BOLT] Always match stale entry blocks (authored by spupyrev).
[BOLT] Always match stale entry blocks
Fri, Sep 8, 3:47 PM · Restricted Project
spupyrev closed D159488: [BOLT] Always match stale entry blocks.
Fri, Sep 8, 3:46 PM · Restricted Project, Restricted Project
spupyrev added a comment to D159488: [BOLT] Always match stale entry blocks.

Thanks. We recently discussed a case where stale matching was unable to match any block in a function and so function exec count was not set. We thought it's still beneficial to set exec count in this case for function reordering. I assume the entry block match will also make stale matching set function exec count in this scenario?

Fri, Sep 8, 3:45 PM · Restricted Project, Restricted Project
spupyrev retitled D159488: [BOLT] Always match stale entry blocks from [BOLT] matching stale entry blocks to [BOLT] Always match stale entry blocks.
Fri, Sep 8, 3:38 PM · Restricted Project, Restricted Project
spupyrev published D159488: [BOLT] Always match stale entry blocks for review.
Fri, Sep 8, 11:38 AM · Restricted Project, Restricted Project

Thu, Aug 31

spupyrev committed rG1256ef274c62: [BOLT] Fine-tuning hash computation for stale matching (authored by spupyrev).
[BOLT] Fine-tuning hash computation for stale matching
Thu, Aug 31, 7:29 AM · Restricted Project
spupyrev closed D156278: [BOLT] Fine-tuning hash computation for stale matching.
Thu, Aug 31, 7:29 AM · Restricted Project, Restricted Project

Wed, Aug 30

spupyrev updated the diff for D156278: [BOLT] Fine-tuning hash computation for stale matching.

rebase

Wed, Aug 30, 8:20 AM · Restricted Project, Restricted Project

Tue, Aug 29

spupyrev updated the diff for D156278: [BOLT] Fine-tuning hash computation for stale matching.

rebase

Tue, Aug 29, 11:22 AM · Restricted Project, Restricted Project

Mon, Aug 28

spupyrev committed rGb4b42bd6522f: Cleaning up unreachable code in CodeLayout (authored by spupyrev).
Cleaning up unreachable code in CodeLayout
Mon, Aug 28, 9:23 AM · Restricted Project, Restricted Project
spupyrev closed D158859: Cleaning up unreachable code in CodeLayout.
Mon, Aug 28, 9:22 AM · Restricted Project, Restricted Project

Aug 26 2023

spupyrev published D158859: Cleaning up unreachable code in CodeLayout for review.
Aug 26 2023, 9:30 AM · Restricted Project, Restricted Project

Aug 18 2023

spupyrev added a comment to D156278: [BOLT] Fine-tuning hash computation for stale matching.

Since the last change wasn't trivial, I'll wait for another review before landing this

Aug 18 2023, 8:58 AM · Restricted Project, Restricted Project

Aug 17 2023

spupyrev updated the diff for D156278: [BOLT] Fine-tuning hash computation for stale matching.

Addressing comments by reverting the changes in MCPlusBuilder.h

Aug 17 2023, 4:41 PM · Restricted Project, Restricted Project
spupyrev planned changes to D152840: [ELF] A new code layout algorithm for function reordering [3a/3].
Aug 17 2023, 7:51 AM · Restricted Project, Restricted Project

Aug 16 2023

spupyrev committed rG9460ebd13077: [BOLT] Fix sorting functions by execution count (authored by spupyrev).
[BOLT] Fix sorting functions by execution count
Aug 16 2023, 3:08 PM · Restricted Project
spupyrev closed D152959: [BOLT] Fix sorting functions by execution count.
Aug 16 2023, 3:08 PM · Restricted Project, Restricted Project
spupyrev updated the diff for D152959: [BOLT] Fix sorting functions by execution count.

rebase & adjust logging

Aug 16 2023, 2:20 PM · Restricted Project, Restricted Project

Jul 31 2023

spupyrev committed rG299ec3c22a3b: [BOLT] Fixing macOS build (authored by spupyrev).
[BOLT] Fixing macOS build
Jul 31 2023, 1:56 PM · Restricted Project
spupyrev closed D156734: [BOLT] Fixing macOS build.
Jul 31 2023, 1:56 PM · Restricted Project, Restricted Project
spupyrev added a comment to D153039: [BOLT] A new code layout algorithm for function reordering [3b/3].

Sorry for overlooking this; here is a fix: https://reviews.llvm.org/D156734

Jul 31 2023, 1:15 PM · Restricted Project, Restricted Project
spupyrev published D156734: [BOLT] Fixing macOS build for review.
Jul 31 2023, 1:15 PM · Restricted Project, Restricted Project
spupyrev committed rGb402487b7445: [BOLT] A new code layout algorithm for function reordering [3b/3] (authored by spupyrev).
[BOLT] A new code layout algorithm for function reordering [3b/3]
Jul 31 2023, 10:49 AM · Restricted Project
spupyrev closed D153039: [BOLT] A new code layout algorithm for function reordering [3b/3].
Jul 31 2023, 10:49 AM · Restricted Project, Restricted Project
spupyrev added a comment to D153039: [BOLT] A new code layout algorithm for function reordering [3b/3].

I am adding an internal test for CDS

Jul 31 2023, 8:57 AM · Restricted Project, Restricted Project

Jul 27 2023

spupyrev committed rG6d1502c654c1: [BOLT] (Minor) Changes in stale inference (authored by spupyrev).
[BOLT] (Minor) Changes in stale inference
Jul 27 2023, 3:29 PM · Restricted Project
spupyrev closed D155748: [BOLT] (Minor) Changes in stale inference.
Jul 27 2023, 3:29 PM · Restricted Project, Restricted Project
spupyrev published D156278: [BOLT] Fine-tuning hash computation for stale matching for review.

Ready for review now

Jul 27 2023, 3:26 PM · Restricted Project, Restricted Project
spupyrev updated the diff for D153039: [BOLT] A new code layout algorithm for function reordering [3b/3].

rebased past formatting

Jul 27 2023, 3:24 PM · Restricted Project, Restricted Project
spupyrev updated the diff for D153039: [BOLT] A new code layout algorithm for function reordering [3b/3].

clang-format

Jul 27 2023, 11:48 AM · Restricted Project, Restricted Project
spupyrev updated the diff for D153039: [BOLT] A new code layout algorithm for function reordering [3b/3].

nit

Jul 27 2023, 10:14 AM · Restricted Project, Restricted Project
spupyrev updated the diff for D153039: [BOLT] A new code layout algorithm for function reordering [3b/3].

Since the upstream diffs have landed, this is now ready for review

Jul 27 2023, 10:12 AM · Restricted Project, Restricted Project
spupyrev retitled D155748: [BOLT] (Minor) Changes in stale inference from [BOLT] updates for stale hashing to [BOLT] (Minor) Changes in stale inference.
Jul 27 2023, 9:44 AM · Restricted Project, Restricted Project
spupyrev updated the diff for D155748: [BOLT] (Minor) Changes in stale inference.

rebase

Jul 27 2023, 9:44 AM · Restricted Project, Restricted Project
spupyrev committed rGbc59faa86308: A new code layout algorithm for function reordering [2/3] (authored by spupyrev).
A new code layout algorithm for function reordering [2/3]
Jul 27 2023, 9:21 AM · Restricted Project, Restricted Project
spupyrev closed D152834: A new code layout algorithm for function reordering [2/3].
Jul 27 2023, 9:21 AM · Restricted Project, Restricted Project
spupyrev committed rG31e8a9f4d91f: [BOLT] Add stale-related logging (authored by spupyrev).
[BOLT] Add stale-related logging
Jul 27 2023, 8:57 AM · Restricted Project
spupyrev closed D154737: [BOLT] Add stale-related logging.
Jul 27 2023, 8:57 AM · Restricted Project, Restricted Project
spupyrev updated the diff for D154737: [BOLT] Add stale-related logging.

nit

Jul 27 2023, 8:56 AM · Restricted Project, Restricted Project

Jul 25 2023

spupyrev updated the diff for D154737: [BOLT] Add stale-related logging.

Updated the part computing matching metrics to make it more readable. Let me know if there is still confusion.

Jul 25 2023, 2:29 PM · Restricted Project, Restricted Project

Jul 24 2023

spupyrev added a comment to D152834: A new code layout algorithm for function reordering [2/3].

Thanks for review Rahman. I'll wait a few more days before landing in case anyone else has suggestions.

Jul 24 2023, 9:29 AM · Restricted Project, Restricted Project
spupyrev updated the diff for D152834: A new code layout algorithm for function reordering [2/3].

rebase

Jul 24 2023, 8:52 AM · Restricted Project, Restricted Project

Jul 20 2023

spupyrev updated the diff for D155748: [BOLT] (Minor) Changes in stale inference.

reverting accidentally attached changes

Jul 20 2023, 2:40 PM · Restricted Project, Restricted Project
spupyrev updated the diff for D155748: [BOLT] (Minor) Changes in stale inference.

rebase to latest

Jul 20 2023, 2:25 PM · Restricted Project, Restricted Project

Jul 19 2023

spupyrev published D155748: [BOLT] (Minor) Changes in stale inference for review.
Jul 19 2023, 1:46 PM · Restricted Project, Restricted Project

Jul 18 2023

spupyrev updated the diff for D154737: [BOLT] Add stale-related logging.

another typo

Jul 18 2023, 4:52 PM · Restricted Project, Restricted Project
spupyrev updated the diff for D154737: [BOLT] Add stale-related logging.

a typo

Jul 18 2023, 4:47 PM · Restricted Project, Restricted Project
spupyrev updated the diff for D154737: [BOLT] Add stale-related logging.
  • wrapping binary stats into a struct;
  • printing matching stats based on strong hashes, where we have high confidence in correctness.
Jul 18 2023, 4:46 PM · Restricted Project, Restricted Project
spupyrev accepted D155514: [BOLT] Switch to using layout order in YAML.
Jul 18 2023, 12:35 PM · Restricted Project, Restricted Project
spupyrev added inline comments to D155514: [BOLT] Switch to using layout order in YAML.
Jul 18 2023, 9:22 AM · Restricted Project, Restricted Project

Jul 14 2023

spupyrev updated the diff for D154737: [BOLT] Add stale-related logging.

Moving stats from BinaryFunction to (aggregated) BinaryContext

Jul 14 2023, 12:53 PM · Restricted Project, Restricted Project
spupyrev added inline comments to D152834: A new code layout algorithm for function reordering [2/3].
Jul 14 2023, 11:55 AM · Restricted Project, Restricted Project
spupyrev updated the diff for D152834: A new code layout algorithm for function reordering [2/3].

addressing comments (mostly adding periods)

Jul 14 2023, 11:54 AM · Restricted Project, Restricted Project
spupyrev added inline comments to D154737: [BOLT] Add stale-related logging.
Jul 14 2023, 9:33 AM · Restricted Project, Restricted Project

Jul 13 2023

spupyrev added inline comments to D154737: [BOLT] Add stale-related logging.
Jul 13 2023, 12:19 PM · Restricted Project, Restricted Project

Jul 10 2023

spupyrev added inline comments to D152834: A new code layout algorithm for function reordering [2/3].
Jul 10 2023, 1:57 PM · Restricted Project, Restricted Project
spupyrev updated the diff for D152834: A new code layout algorithm for function reordering [2/3].

comments

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

Jul 7 2023

spupyrev published D154737: [BOLT] Add stale-related logging for review.
Jul 7 2023, 12:02 PM · Restricted Project, Restricted Project
spupyrev committed rGa7e13a99c2c6: A new code layout algorithm for function reordering [1/3] (authored by spupyrev).
A new code layout algorithm for function reordering [1/3]
Jul 7 2023, 7:26 AM · Restricted Project, Restricted Project
spupyrev closed D152833: A new code layout algorithm for function reordering [1/3].
Jul 7 2023, 7:25 AM · Restricted Project, Restricted Project

Jul 6 2023

spupyrev updated the diff for D152833: A new code layout algorithm for function reordering [1/3].

nit

Jul 6 2023, 12:33 PM · Restricted Project, Restricted Project
spupyrev updated the diff for D152959: [BOLT] Fix sorting functions by execution count.

Added a test. Without the change, the output is

...
BOLT-INFO: Starting pass: reorder-functions
BOLT-INFO: hot func main (400)
BOLT-INFO: hot func func1 (500)
BOLT-INFO: hot func func2 (1500)
BOLT-INFO: hot func func3 (100)
BOLT-INFO: hot func func4 (99)
BOLT-INFO: hot func func5 (110)
...
Jul 6 2023, 12:02 PM · Restricted Project, Restricted Project

Jul 5 2023

spupyrev added inline comments to D152833: A new code layout algorithm for function reordering [1/3].
Jul 5 2023, 3:39 PM · Restricted Project, Restricted Project
spupyrev added inline comments to D152833: A new code layout algorithm for function reordering [1/3].
Jul 5 2023, 3:22 PM · Restricted Project, Restricted Project

Jun 23 2023

spupyrev added a comment to D152834: A new code layout algorithm for function reordering [2/3].

Thanks for teaching me how to measure the impact of instruction caches. While re-running the experiments with the new events, I realized that my earlier report was not using C^3 as the baseline. Instead the numbers were on top of an improved code layout (referred to hfsort+) utilized by BOLT, which is not relevant here; I apologize for the confusion.
Below are details of the latest run on the same clang benchmarks, with and without huge pages. In addition to comparing the new algorithm to C^3, i'm also including the numbers on top of the "input" ordering that comes from the compiler. Here I'm building the binary with LTO and AutoFDO, but observe similar numbers when using instrumentation counts or other sampling-based profiling approaches (e.g., CSSPGO).

Jun 23 2023, 12:05 PM · Restricted Project, Restricted Project

Jun 21 2023

spupyrev added a comment to D152834: A new code layout algorithm for function reordering [2/3].

Hmm. I was using "cpu/event=0x85,umask=0x61/u" for i-TLB misses, which we got from https://download.01.org/perfmon, which has even been moved since then. Back in 2017 (when the algorithm was developed) we thought this is the "right" event to look at, but it might not be the case. Which one would you recommend to look at? I see this page has a good description.

Jun 21 2023, 5:07 PM · Restricted Project, Restricted Project
spupyrev added a comment to D152834: A new code layout algorithm for function reordering [2/3].

Here are my measurements on the clang binary (release_14) by compiling two large cpp files (benchmark1 and benchmark2). Negative values are improvements, bold ones are stat sig.

Jun 21 2023, 3:50 PM · Restricted Project, Restricted Project

Jun 20 2023

spupyrev added a comment to D152834: A new code layout algorithm for function reordering [2/3].

@rahmanl @davidxl Our measurements are always on top of C^3 (the one currently utilized by CallGraphSort.cpp). If we compare against "no-function-ordering" (ie looking at the order produced by the compiler), then the wins would be well beyond 1% cpu but that's not a realistic scenario these days. The linked follow-up diffs, D152840 and D153039, enable the ordering in the linker and in the BOLT. I'll share more specific numbers on my benchmarks soon.

Jun 20 2023, 4:27 PM · Restricted Project, Restricted Project

Jun 16 2023

spupyrev added a reviewer for D152834: A new code layout algorithm for function reordering [2/3]: davidxl.
Jun 16 2023, 12:09 PM · Restricted Project, Restricted Project

Jun 15 2023

spupyrev added reviewers for D152834: A new code layout algorithm for function reordering [2/3]: Amir, maksfb.
Jun 15 2023, 8:58 AM · Restricted Project, Restricted Project
spupyrev published D153039: [BOLT] A new code layout algorithm for function reordering [3b/3] for review.
Jun 15 2023, 8:55 AM · Restricted Project, Restricted Project

Jun 14 2023

spupyrev published D152959: [BOLT] Fix sorting functions by execution count for review.
Jun 14 2023, 2:08 PM · Restricted Project, Restricted Project
spupyrev published D152840: [ELF] A new code layout algorithm for function reordering [3a/3] for review.
Jun 14 2023, 12:15 PM · Restricted Project, Restricted Project

Jun 13 2023

spupyrev published D152834: A new code layout algorithm for function reordering [2/3] for review.
Jun 13 2023, 1:31 PM · Restricted Project, Restricted Project
spupyrev published D152833: A new code layout algorithm for function reordering [1/3] for review.
Jun 13 2023, 1:14 PM · Restricted Project, Restricted Project

Jun 12 2023

spupyrev added a comment to D152217: [profi][NFC] Refactor SampleProfileInference::apply.

Do you have a follow-up diff to adjust BOLT's part?

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

Jun 9 2023

spupyrev accepted D152216: [profi][NFC] Refactor SampleProfileInference::initFunction.
Jun 9 2023, 8:19 AM · Restricted Project, Restricted Project

Jun 8 2023

spupyrev committed rG2316a10fe59a: [BOLT] stale profile matching [part 2 out of 2] (authored by spupyrev).
[BOLT] stale profile matching [part 2 out of 2]
Jun 8 2023, 2:43 PM · Restricted Project
spupyrev closed D146661: [BOLT] stale profile matching [part 2 out of 2].
Jun 8 2023, 2:43 PM · Restricted Project, Restricted Project
spupyrev updated the diff for D146661: [BOLT] stale profile matching [part 2 out of 2].

rebasing & fixing the test & adding debug logging

Jun 8 2023, 11:45 AM · Restricted Project, Restricted Project

Jun 6 2023

spupyrev committed rG44268271f61e: [BOLT] stale profile matching [part 1 out of 2] (authored by spupyrev).
[BOLT] stale profile matching [part 1 out of 2]
Jun 6 2023, 12:14 PM · Restricted Project