Skip to content

[ctxprof] Auto root detection: trie for stack samples #133106

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

Merged
merged 1 commit into from
Mar 29, 2025

Conversation

mtrofin
Copy link
Member

@mtrofin mtrofin commented Mar 26, 2025

An initial patch for supporting automated root detection. The auto-detector is introduced subsequently, but this patch introduces a datastructure for capturing sampled stacks, per thread, in a trie, and inferring from such samples which functions are reasonable roots.

Copy link
Member Author

mtrofin commented Mar 26, 2025

@mtrofin mtrofin changed the title RuntimeCallsiteTrie [ctxprof] Auto root detection: trie for stack samples Mar 26, 2025
Copy link

github-actions bot commented Mar 26, 2025

✅ With the latest revision this PR passed the C/C++ code formatter.

Copy link
Contributor

@kazutakahirata kazutakahirata left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo a couple of nits.

@mtrofin mtrofin force-pushed the users/mtrofin/03-24-runtimecallsitetrie branch from b5f28ce to d9a78c9 Compare March 27, 2025 02:33
@mtrofin mtrofin force-pushed the users/mtrofin/03-24-runtimecallsitetrie branch from d9a78c9 to 0cd0517 Compare March 27, 2025 22:06
@mtrofin mtrofin force-pushed the users/mtrofin/03-24-runtimecallsitetrie branch 4 times, most recently from fe91905 to 351d6ef Compare March 28, 2025 16:22
Copy link
Contributor

@snehasish snehasish left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mtrofin mtrofin force-pushed the users/mtrofin/03-24-runtimecallsitetrie branch 2 times, most recently from 560aac8 to 9d58041 Compare March 29, 2025 02:43
@mtrofin mtrofin force-pushed the users/mtrofin/03-24-runtimecallsitetrie branch from 9d58041 to 1549a25 Compare March 29, 2025 02:51
Copy link
Member Author

mtrofin commented Mar 29, 2025

Merge activity

  • Mar 28, 11:06 PM EDT: A user started a stack merge that includes this pull request via Graphite.
  • Mar 28, 11:08 PM EDT: A user merged this pull request with Graphite.

@mtrofin mtrofin merged commit 63bb007 into main Mar 29, 2025
10 checks passed
@mtrofin mtrofin deleted the users/mtrofin/03-24-runtimecallsitetrie branch March 29, 2025 03:08
@llvm-ci
Copy link
Collaborator

llvm-ci commented Mar 29, 2025

LLVM Buildbot has detected a new failure on builder clang-aarch64-sve2-vla running on linaro-g4-01 while building compiler-rt at step 7 "ninja check 1".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/198/builds/3248

Here is the relevant piece of the build log for the reference
Step 7 (ninja check 1) failure: stage 1 checked (failure)
...
PASS: Flang :: Driver/print-effective-triple.f90 (24736 of 96422)
PASS: Flang :: Driver/linker-flags.f90 (24737 of 96422)
PASS: Flang :: Driver/phases.f90 (24738 of 96422)
PASS: Flang :: Driver/print-resource-dir.F90 (24739 of 96422)
PASS: Flang :: Driver/parse-fir-error.ll (24740 of 96422)
PASS: Flang :: Driver/predefined-macros-compiler-version.F90 (24741 of 96422)
PASS: Flang :: Driver/override-triple.ll (24742 of 96422)
PASS: Flang :: Driver/mlir-pass-pipeline.f90 (24743 of 96422)
PASS: Flang :: Driver/mlink-builtin-bc.f90 (24744 of 96422)
UNRESOLVED: Flang :: Driver/slp-vectorize.ll (24745 of 96422)
******************** TEST 'Flang :: Driver/slp-vectorize.ll' FAILED ********************
Test has no 'RUN:' line
********************
PASS: Flang :: Driver/parse-error.ll (24746 of 96422)
PASS: Flang :: Driver/fixed-line-length.f90 (24747 of 96422)
PASS: Flang :: Driver/print-pipeline-passes.f90 (24748 of 96422)
PASS: Flang :: Driver/lto-bc.f90 (24749 of 96422)
PASS: Flang :: Driver/pthread.f90 (24750 of 96422)
PASS: Flang :: Driver/missing-arg.f90 (24751 of 96422)
PASS: Flang :: Driver/scanning-error.f95 (24752 of 96422)
PASS: Flang :: Driver/print-target-triple.f90 (24753 of 96422)
PASS: Flang :: Driver/supported-suffices/f03-suffix.f03 (24754 of 96422)
PASS: Flang :: Driver/pass-plugin-not-found.f90 (24755 of 96422)
PASS: Flang :: Driver/std2018-wrong.f90 (24756 of 96422)
PASS: Flang :: Driver/pp-fixed-form.f90 (24757 of 96422)
PASS: Flang :: Driver/tco-code-gen-llvm.fir (24758 of 96422)
PASS: Flang :: Driver/supported-suffices/f08-suffix.f08 (24759 of 96422)
PASS: Flang :: Driver/parse-ir-error.f95 (24760 of 96422)
PASS: Flang :: Driver/target-gpu-features.f90 (24761 of 96422)
PASS: Flang :: Driver/target.f90 (24762 of 96422)
PASS: Flang :: Driver/q-unused-arguments.f90 (24763 of 96422)
PASS: Flang :: Driver/multiple-input-files.f90 (24764 of 96422)
PASS: Flang :: Driver/lto-flags.f90 (24765 of 96422)
PASS: Flang :: Driver/mllvm.f90 (24766 of 96422)
PASS: Flang :: Driver/unparse-with-modules.f90 (24767 of 96422)
PASS: Flang :: Driver/unsupported-vscale-max-min.f90 (24768 of 96422)
PASS: Flang :: Driver/fsave-optimization-record.f90 (24769 of 96422)
PASS: Flang :: Driver/no-duplicate-main.f90 (24770 of 96422)
PASS: Flang :: Driver/optimization-remark-invalid.f90 (24771 of 96422)
PASS: Flang :: Driver/input-from-stdin/input-from-stdin.f90 (24772 of 96422)
PASS: Flang :: Driver/falias-analysis.f90 (24773 of 96422)
PASS: Flang :: Driver/std2018.f90 (24774 of 96422)
PASS: Flang :: Driver/unparse-use-analyzed.f95 (24775 of 96422)
PASS: Flang :: Driver/target-machine-error.f90 (24776 of 96422)
PASS: Flang :: Driver/prescanner-diag.f90 (24777 of 96422)
PASS: Flang :: Driver/save-temps.f90 (24778 of 96422)
PASS: Flang :: Driver/optimization-remark-backend.f90 (24779 of 96422)
PASS: Flang :: Driver/response-file.f90 (24780 of 96422)
PASS: Flang :: Driver/fveclib.f90 (24781 of 96422)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants