forked from OSchip/llvm-project
[asan] minor fix in the asan memory profile
llvm-svn: 279547
This commit is contained in:
parent
c0f6c9b8c1
commit
6e3cda4dfc
|
@ -710,6 +710,9 @@ void GetAllocatorOptions(AllocatorOptions *options) {
|
|||
AsanChunkView FindHeapChunkByAddress(uptr addr) {
|
||||
return instance.FindHeapChunkByAddress(addr);
|
||||
}
|
||||
AsanChunkView FindHeapChunkByAllocBeg(uptr addr) {
|
||||
return AsanChunkView(instance.GetAsanChunk(reinterpret_cast<void*>(addr)));
|
||||
}
|
||||
|
||||
void AsanThreadLocalMallocStorage::CommitBack() {
|
||||
instance.CommitBack(this);
|
||||
|
|
|
@ -91,6 +91,7 @@ class AsanChunkView {
|
|||
};
|
||||
|
||||
AsanChunkView FindHeapChunkByAddress(uptr address);
|
||||
AsanChunkView FindHeapChunkByAllocBeg(uptr address);
|
||||
|
||||
// List of AsanChunks with total size.
|
||||
class AsanChunkFifoList: public IntrusiveList<AsanChunk> {
|
||||
|
|
|
@ -74,7 +74,7 @@ class HeapProfile {
|
|||
|
||||
static void ChunkCallback(uptr chunk, void *arg) {
|
||||
HeapProfile *hp = reinterpret_cast<HeapProfile*>(arg);
|
||||
AsanChunkView cv = FindHeapChunkByAddress(chunk);
|
||||
AsanChunkView cv = FindHeapChunkByAllocBeg(chunk);
|
||||
if (!cv.IsAllocated()) return;
|
||||
u32 id = cv.GetAllocStackId();
|
||||
if (!id) return;
|
||||
|
|
Loading…
Reference in New Issue