[llvm-branch-commits] [llvm] [StaticDataLayout][PGO]Implement reader and writer change for data access profiles (PR #139997)

2025-05-14 Thread Mingming Liu via llvm-branch-commits
https://github.com/mingmingl-llvm created https://github.com/llvm/llvm-project/pull/139997 None >From 75878647c2c36cca00e9d003dc84bf4597e19187 Mon Sep 17 00:00:00 2001 From: mingmingl Date: Tue, 13 May 2025 22:54:59 -0700 Subject: [PATCH] [StaticDataLayout][PGO]Implement reader and writer chan

[llvm-branch-commits] [llvm] [NFC][MemProf] Add the LLVM license text and minor clean up. (PR #140504)

2025-05-19 Thread Mingming Liu via llvm-branch-commits
https://github.com/mingmingl-llvm approved this pull request. https://github.com/llvm/llvm-project/pull/140504 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [StaticDataLayout][PGO]Implement reader and writer change for data access profiles (PR #139997)

2025-05-15 Thread Mingming Liu via llvm-branch-commits
https://github.com/mingmingl-llvm edited https://github.com/llvm/llvm-project/pull/139997 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [StaticDataLayout][PGO]Implement reader and writer change for data access profiles (PR #139997)

2025-05-15 Thread Mingming Liu via llvm-branch-commits
https://github.com/mingmingl-llvm ready_for_review https://github.com/llvm/llvm-project/pull/139997 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [llvm-profgen] Extend llvm-profgen to generate vtable profiles with data access events. (PR #148013)

2025-07-18 Thread Mingming Liu via llvm-branch-commits
@@ -603,6 +630,14 @@ class ProfiledBinary { return ProbeDecoder.getInlinerDescForProbe(Probe); } + void addMMapNonTextEvent(MMapEvent MMap) { +MMapNonTextEvents.push_back(MMap); + } + + // Given a runtime address, canonicalize it to the virtual address in the + /

[llvm-branch-commits] [llvm] [llvm-profgen] Extend llvm-profgen to generate vtable profiles with data access events. (PR #148013)

2025-07-18 Thread Mingming Liu via llvm-branch-commits
@@ -370,6 +377,61 @@ PerfReaderBase::create(ProfiledBinary *Binary, PerfInputFile &PerfInput, return PerfReader; } +void PerfReaderBase::parseDataAccessPerfTraces( +StringRef DataAccessPerfTraceFile, std::optional PIDFilter) { + std::regex logRegex( + R"(^.*?PERF

[llvm-branch-commits] [llvm] [llvm-profgen] Extend llvm-profgen to generate vtable profiles with data access events. (PR #148013)

2025-07-18 Thread Mingming Liu via llvm-branch-commits
@@ -540,6 +540,22 @@ void ProfileGenerator::generateLineNumBasedProfile() { // Fill in boundary sample counts as well as call site samples for calls populateBoundarySamplesForAllFunctions(SC.BranchCounter); + // For each instruction with vtable accesses, get its symbolize

[llvm-branch-commits] [llvm] [llvm-profgen] Extend llvm-profgen to generate vtable profiles with data access events. (PR #148013)

2025-07-18 Thread Mingming Liu via llvm-branch-commits
@@ -0,0 +1,18 @@ +RUN: llvm-profgen --perfscript=%p/Inputs/lbr-perf-for-dap.script --data-access-profile=%p/Inputs/dap-perf-trace.txt \ +RUN: --binary=%p/Inputs/dap.perfbin --format=text --pid=3446532 \ mingmingl-llvm wrote: done. Somehow my previous commit le

[llvm-branch-commits] [llvm] [llvm-profgen] Extend llvm-profgen to generate vtable profiles with data access events. (PR #148013)

2025-07-18 Thread Mingming Liu via llvm-branch-commits
@@ -67,6 +67,11 @@ static cl::opt DebugBinPath( "from it instead of the executable binary."), cl::cat(ProfGenCategory)); +static cl::opt DataAccessProfileFilename( +"data-access-profile", cl::value_desc("data-access-profile"), +cl::desc("Path of the da

[llvm-branch-commits] [llvm] [llvm-profgen] Extend llvm-profgen to generate vtable profiles with data access events. (PR #148013)

2025-07-18 Thread Mingming Liu via llvm-branch-commits
https://github.com/mingmingl-llvm commented: thanks for reviews! PTAL. https://github.com/llvm/llvm-project/pull/148013 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-

[llvm-branch-commits] [llvm] [llvm-profgen] Extend llvm-profgen to generate vtable profiles with data access events. (PR #148013)

2025-07-18 Thread Mingming Liu via llvm-branch-commits
@@ -946,6 +978,14 @@ SampleContextFrameVector ProfiledBinary::symbolize(const InstructionPointer &IP, return CallStack; } +StringRef ProfiledBinary::symbolizeDataAddress(uint64_t Address) { + DIGlobal DataDIGlobal = unwrapOrError( + Symbolizer->symbolizeData(Symbolize

[llvm-branch-commits] [llvm] [llvm-profgen] Extend llvm-profgen to generate vtable profiles with data access events. (PR #148013)

2025-07-18 Thread Mingming Liu via llvm-branch-commits
@@ -370,6 +377,61 @@ PerfReaderBase::create(ProfiledBinary *Binary, PerfInputFile &PerfInput, return PerfReader; } +void PerfReaderBase::parseDataAccessPerfTraces( +StringRef DataAccessPerfTraceFile, std::optional PIDFilter) { + std::regex logRegex( + R"(^.*?PERF

[llvm-branch-commits] [llvm] [llvm-profgen] Extend llvm-profgen to generate vtable profiles with data access events. (PR #148013)

2025-07-18 Thread Mingming Liu via llvm-branch-commits
@@ -370,6 +377,61 @@ PerfReaderBase::create(ProfiledBinary *Binary, PerfInputFile &PerfInput, return PerfReader; } +void PerfReaderBase::parseDataAccessPerfTraces( +StringRef DataAccessPerfTraceFile, std::optional PIDFilter) { + std::regex logRegex( mi

[llvm-branch-commits] [llvm] [llvm-profgen] Extend llvm-profgen to generate vtable profiles with data access events. (PR #148013)

2025-07-18 Thread Mingming Liu via llvm-branch-commits
@@ -572,6 +579,13 @@ class PerfReaderBase { // Entry of the reader to parse multiple perf traces virtual void parsePerfTraces() = 0; + + // Parse the from the data access perf trace file, + // and accummuate the data access count for each pair. mingmin

[llvm-branch-commits] [llvm] [llvm-profgen] Extend llvm-profgen to generate vtable profiles with data access events. (PR #148013)

2025-07-18 Thread Mingming Liu via llvm-branch-commits
@@ -370,6 +377,61 @@ PerfReaderBase::create(ProfiledBinary *Binary, PerfInputFile &PerfInput, return PerfReader; } +void PerfReaderBase::parseDataAccessPerfTraces( +StringRef DataAccessPerfTraceFile, std::optional PIDFilter) { + std::regex logRegex( + R"(^.*?PERF

[llvm-branch-commits] [llvm] [llvm-profgen] Extend llvm-profgen to generate vtable profiles with data access events. (PR #148013)

2025-07-18 Thread Mingming Liu via llvm-branch-commits
@@ -598,6 +612,12 @@ class PerfScriptReader : public PerfReaderBase { // Entry of the reader to parse multiple perf traces void parsePerfTraces() override; + + // Parse a single line of a PERF_RECORD_MMAP event looking for a + // mapping between the binary name and its m

[llvm-branch-commits] [llvm] [llvm-profgen] Extend llvm-profgen to generate vtable profiles with data access events. (PR #148013)

2025-07-18 Thread Mingming Liu via llvm-branch-commits
@@ -946,6 +978,14 @@ SampleContextFrameVector ProfiledBinary::symbolize(const InstructionPointer &IP, return CallStack; } +StringRef ProfiledBinary::symbolizeDataAddress(uint64_t Address) { + DIGlobal DataDIGlobal = unwrapOrError( + Symbolizer->symbolizeData(Symbolize

[llvm-branch-commits] [llvm] [llvm-profgen] Extend llvm-profgen to generate vtable profiles with data access events. (PR #148013)

2025-07-18 Thread Mingming Liu via llvm-branch-commits
@@ -276,6 +286,19 @@ class ProfiledBinary { // String table owning function name strings created from the symbolizer. std::unordered_set NameStrings; + // MMap events for PT_LOAD segments without 'x' memory protection flag. + SmallVector MMapNonTextEvents; + + // Record

[llvm-branch-commits] [llvm] [llvm-profgen] Extend llvm-profgen to generate vtable profiles with data access events. (PR #148013)

2025-07-18 Thread Mingming Liu via llvm-branch-commits
https://github.com/mingmingl-llvm edited https://github.com/llvm/llvm-project/pull/148013 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [llvm-profgen] Extend llvm-profgen to generate vtable profiles with data access events. (PR #148013)

2025-07-10 Thread Mingming Liu via llvm-branch-commits
https://github.com/mingmingl-llvm edited https://github.com/llvm/llvm-project/pull/148013 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [llvm-profgen] Extend llvm-profgen to generate vtable profiles with data access events. (PR #148013)

2025-07-10 Thread Mingming Liu via llvm-branch-commits
https://github.com/mingmingl-llvm ready_for_review https://github.com/llvm/llvm-project/pull/148013 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

<    1   2   3