Skip to content

[memprof] Improve a comment (NFC) #142002

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
May 29, 2025

Conversation

kazutakahirata
Copy link
Contributor

We can go one step further than "compare" and mention "prefix" to
succinctly describe the function.

We can go one step further than "compare" and mention "prefix" to
succinctly describe the function.
@llvmbot
Copy link
Member

llvmbot commented May 29, 2025

@llvm/pr-subscribers-llvm-transforms

Author: Kazu Hirata (kazutakahirata)

Changes

We can go one step further than "compare" and mention "prefix" to
succinctly describe the function.


Full diff: https://github.com/llvm/llvm-project/pull/142002.diff

1 Files Affected:

  • (modified) llvm/lib/Transforms/Instrumentation/MemProfiler.cpp (+3-3)
diff --git a/llvm/lib/Transforms/Instrumentation/MemProfiler.cpp b/llvm/lib/Transforms/Instrumentation/MemProfiler.cpp
index deb9f8999eab7..c88feac16d7ac 100644
--- a/llvm/lib/Transforms/Instrumentation/MemProfiler.cpp
+++ b/llvm/lib/Transforms/Instrumentation/MemProfiler.cpp
@@ -762,9 +762,9 @@ static AllocationType addCallStack(CallStackTrie &AllocTrie,
   return AllocType;
 }
 
-// Helper to compare the InlinedCallStack computed from an instruction's debug
-// info to a list of Frames from profile data (either the allocation data or a
-// callsite).
+// Return true if InlinedCallStack, computed from a call instruction's debug
+// info, is a prefix of ProfileCallStack, a list of Frames from profile data
+// (either the allocation data or a callsite).
 static bool
 stackFrameIncludesInlinedCallStack(ArrayRef<Frame> ProfileCallStack,
                                    ArrayRef<uint64_t> InlinedCallStack) {

@kazutakahirata kazutakahirata merged commit 273e463 into llvm:main May 29, 2025
9 of 11 checks passed
@kazutakahirata kazutakahirata deleted the memprof_comment branch May 29, 2025 19:22
svkeerthy pushed a commit that referenced this pull request May 29, 2025
We can go one step further than "compare" and mention "prefix" to
succinctly describe the function.
google-yfyang pushed a commit to google-yfyang/llvm-project that referenced this pull request May 29, 2025
We can go one step further than "compare" and mention "prefix" to
succinctly describe the function.
sivan-shani pushed a commit to sivan-shani/llvm-project that referenced this pull request Jun 3, 2025
We can go one step further than "compare" and mention "prefix" to
succinctly describe the function.
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.

3 participants