[all-commits] [llvm/llvm-project] 95554c: [memprof] Teach extractCallsFromIR to recognize he...
Kazu Hirata via All-commits
all-commits at lists.llvm.org
Tue Nov 12 21:37:51 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 95554cbd7717e7d1925f475540a70603bcb3a224
https://github.com/llvm/llvm-project/commit/95554cbd7717e7d1925f475540a70603bcb3a224
Author: Kazu Hirata <kazu at google.com>
Date: 2024-11-12 (Tue, 12 Nov 2024)
Changed paths:
M llvm/include/llvm/Transforms/Instrumentation/MemProfiler.h
M llvm/lib/Transforms/Instrumentation/MemProfiler.cpp
M llvm/unittests/Transforms/Instrumentation/MemProfUseTest.cpp
Log Message:
-----------
[memprof] Teach extractCallsFromIR to recognize heap allocation functions (#115938)
This patch teaches extractCallsFromIR to recognize heap allocation
functions. Specifically, when we encounter a callee that is known to
be a heap allocation function like "new", we set the callee GUID to 0.
Note that I am planning to do the same for the caller-callee pairs
extracted from the profile. That is, when I encounter a frame that
does not have a callee, we assume that the frame is calling some heap
allocation function with GUID 0.
Technically, I'm not recognizing enough functions in this patch.
TCMalloc is known to drop certain frames in the call stack immediately
above new. This patch is meant to lay the groundwork, setting up
GetTLI, plumbing it to extractCallsFromIR, and adjusting the unit
tests. I'll address remaining issues in subsequent patches.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list