Skip to content

[compiler-rt] [Memprof] leave BufferedStackTrace uninit #102256

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

Conversation

fmayer
Copy link
Contributor

@fmayer fmayer commented Aug 6, 2024

Otherwise we have to memset 2040 bytes (255 * 8) for each call

Created using spr 1.3.4
@llvmbot llvmbot added compiler-rt PGO Profile Guided Optimizations labels Aug 6, 2024
@llvmbot
Copy link
Member

llvmbot commented Aug 6, 2024

@llvm/pr-subscribers-pgo

Author: Florian Mayer (fmayer)

Changes

Otherwise we have to memset 2040 bytes (255 * 8) for each call


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

1 Files Affected:

  • (modified) compiler-rt/lib/memprof/memprof_stack.h (+1-1)
diff --git a/compiler-rt/lib/memprof/memprof_stack.h b/compiler-rt/lib/memprof/memprof_stack.h
index a8fdfc9def9d0..2a07019a71e5f 100644
--- a/compiler-rt/lib/memprof/memprof_stack.h
+++ b/compiler-rt/lib/memprof/memprof_stack.h
@@ -33,7 +33,7 @@ u32 GetMallocContextSize();
 // don't want stack trace to contain functions from MemProf internals.
 
 #define GET_STACK_TRACE(max_size, fast)                                        \
-  BufferedStackTrace stack;                                                    \
+  UNINITIALIZED BufferedStackTrace stack;                                                    \
   if (max_size <= 2) {                                                         \
     stack.size = max_size;                                                     \
     if (max_size > 0) {                                                        \

Created using spr 1.3.4
@fmayer fmayer requested a review from vitalybuka August 7, 2024 16:45
@fmayer fmayer changed the base branch from users/fmayer/spr/main.compiler-rt-memprof-leave-bufferedstacktrace-uninit to main August 7, 2024 17:10
@fmayer fmayer changed the base branch from main to users/fmayer/spr/main.compiler-rt-memprof-leave-bufferedstacktrace-uninit August 7, 2024 20:57
Created using spr 1.3.4
fmayer added a commit that referenced this pull request Aug 7, 2024
Otherwise we have to memset 2040 bytes (255 * 8) for each call

Pull Request: #102256
@fmayer fmayer closed this Aug 7, 2024
fmayer added a commit to fmayer/llvm-project that referenced this pull request Sep 13, 2024
Otherwise we have to memset 2040 bytes (255 * 8) for each call

Pull Request: llvm#102256
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler-rt PGO Profile Guided Optimizations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants