[all-commits] [llvm/llvm-project] 59da1a: [memprof] Speed up caller-callee pair extraction (...
Kazu Hirata via All-commits
all-commits at lists.llvm.org
Thu Nov 14 15:55:17 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 59da1afd2ad74af2a8b8475412353c5d54a7d7f5
https://github.com/llvm/llvm-project/commit/59da1afd2ad74af2a8b8475412353c5d54a7d7f5
Author: Kazu Hirata <kazu at google.com>
Date: 2024-11-14 (Thu, 14 Nov 2024)
Changed paths:
M llvm/include/llvm/ProfileData/InstrProfReader.h
M llvm/lib/ProfileData/InstrProfReader.cpp
M llvm/lib/ProfileData/InstrProfWriter.cpp
Log Message:
-----------
[memprof] Speed up caller-callee pair extraction (#116184)
We know that the MemProf profile has a lot of duplicate call stacks.
Extracting caller-callee pairs from a call stack we've seen before is
a wasteful effort.
This patch makes the extraction more efficient by first coming up with
a work list of linear call stack IDs -- the set of starting positions
in the radix tree array -- and then extract caller-callee pairs from
each call stack in the work list.
We implement the work list as a bit vector because we expect the work
list to be dense in the range [0, RadixTreeSize). Also, we want the
set insertion to be cheap.
Without this patch, it takes 25 seconds to extract caller-callee pairs
from a large MemProf profile. This patch shortenes that down to 4
seconds.
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