[llvm-branch-commits] [llvm] [BOLT][NFC] Disambiguate sample as basic/IP sample (PR #139350)
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/139350 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 14px; line-height: 1.5; margin: 0; } .container { margin: 50px auto; max-width: 600px; text-align: center; padding: 0 24px; } a { color: #0366d6; text-decoration: none; } a:hover { text-decoration: underline; } h1 { line-height: 60px; font-size: 48px; font-weight: 300; margin: 0px; text-shadow: 0 1px 0 #fff; } p { color: rgba(0, 0, 0, 0.5); margin: 20px 0 40px; } ul { list-style: none; margin: 25px 0; padding: 0; } li { display: table-cell; font-weight: bold; width: 1%; } .logo { display: inline-block; margin-top: 35px; } .logo-img-2x { display: none; } @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and ( min--moz-device-pixel-ratio: 2), only screen and ( -o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) { .logo-img-1x { display: none; } .logo-img-2x { display: inline-block; } } #suggestions { margin-top: 35px; color: #ccc; } #suggestions a { color: #66; font-weight: 200; font-size: 14px; margin: 0 10px; } Whoa there! You have exceeded a secondary rate limit. Please wait a few minutes before you try again; in some cases this may take up to an hour. https://support.github.com/contact";>Contact Support — https://githubstatus.com";>GitHub Status — https://twitter.com/githubstatus";>@githubstatus ___ 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] [BOLT][NFC] Disambiguate sample as basic/IP sample (PR #139350)
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/139350 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol; font-size: 14px; line-height: 1.5; margin: 0; } .container { margin: 50px auto; max-width: 600px; text-align: center; padding: 0 24px; } a { color: #0366d6; text-decoration: none; } a:hover { text-decoration: underline; } h1 { line-height: 60px; font-size: 48px; font-weight: 300; margin: 0px; text-shadow: 0 1px 0 #fff; } p { color: rgba(0, 0, 0, 0.5); margin: 20px 0 40px; } ul { list-style: none; margin: 25px 0; padding: 0; } li { display: table-cell; font-weight: bold; width: 1%; } .logo { display: inline-block; margin-top: 35px; } .logo-img-2x { display: none; } @media only screen and (-webkit-min-device-pixel-ratio: 2), only screen and ( min--moz-device-pixel-ratio: 2), only screen and ( -o-min-device-pixel-ratio: 2/1), only screen and (min-device-pixel-ratio: 2), only screen and (min-resolution: 192dpi), only screen and (min-resolution: 2dppx) { .logo-img-1x { display: none; } .logo-img-2x { display: inline-block; } } #suggestions { margin-top: 35px; color: #ccc; } #suggestions a { color: #66; font-weight: 200; font-size: 14px; margin: 0 10px; } Whoa there! You have exceeded a secondary rate limit. Please wait a few minutes before you try again; in some cases this may take up to an hour. https://support.github.com/contact";>Contact Support — https://githubstatus.com";>GitHub Status — https://twitter.com/githubstatus";>@githubstatus ___ 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] [BOLT][NFC] Disambiguate sample as basic/IP sample (PR #139350)
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/139350 >From d32ce3f42af3da7ced12b0cc6b58e120deb83566 Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Fri, 9 May 2025 21:13:27 -0700 Subject: [PATCH] rename data members Created using spr 1.3.4 --- bolt/include/bolt/Profile/DataReader.h | 6 +++--- bolt/lib/Profile/DataAggregator.cpp| 11 ++- bolt/lib/Profile/DataReader.cpp| 21 +++-- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/bolt/include/bolt/Profile/DataReader.h b/bolt/include/bolt/Profile/DataReader.h index b91efca085c8c..fbd1dd1e68792 100644 --- a/bolt/include/bolt/Profile/DataReader.h +++ b/bolt/include/bolt/Profile/DataReader.h @@ -390,7 +390,7 @@ class DataReader : public ProfileReaderBase { FuncMemData *getMemDataForNames(const std::vector &FuncNames); FuncBasicSampleData * - getFuncSampleData(const std::vector &FuncNames); + getFuncBasicSampleData(const std::vector &FuncNames); /// Return a vector of all FuncBranchData matching the list of names. /// Internally use fuzzy matching to match special names like LTO-generated @@ -433,7 +433,7 @@ class DataReader : public ProfileReaderBase { } using NamesToBranchesMapTy = std::map; - using NamesToSamplesMapTy = std::map; + using NamesToBasicSamplesMapTy = std::map; using NamesToMemEventsMapTy = std::map; using FuncsToBranchesMapTy = std::unordered_map; @@ -496,7 +496,7 @@ class DataReader : public ProfileReaderBase { unsigned Line{0}; unsigned Col{0}; NamesToBranchesMapTy NamesToBranches; - NamesToSamplesMapTy NamesToSamples; + NamesToBasicSamplesMapTy NamesToBasicSamples; NamesToMemEventsMapTy NamesToMemEvents; FuncsToBranchesMapTy FuncsToBranches; FuncsToMemDataMapTy FuncsToMemData; diff --git a/bolt/lib/Profile/DataAggregator.cpp b/bolt/lib/Profile/DataAggregator.cpp index 7a85297fe5f0e..88dea2cef4476 100644 --- a/bolt/lib/Profile/DataAggregator.cpp +++ b/bolt/lib/Profile/DataAggregator.cpp @@ -572,7 +572,8 @@ void DataAggregator::processProfile(BinaryContext &BC) { if (FuncBranchData *FBD = getBranchData(BF)) { BF.markProfiled(BinaryFunction::PF_LBR); BF.RawSampleCount = FBD->getNumExecutedBranches(); -} else if (FuncBasicSampleData *FSD = getFuncSampleData(BF.getNames())) { +} else if (FuncBasicSampleData *FSD = + getFuncBasicSampleData(BF.getNames())) { BF.markProfiled(BinaryFunction::PF_IP); BF.RawSampleCount = FSD->getSamples(); } @@ -644,11 +645,11 @@ bool DataAggregator::doBasicSample(BinaryFunction &OrigFunc, uint64_t Address, // Attach executed bytes to parent function in case of cold fragment. Func.SampleCountInBytes += Count * BlockSize; - auto I = NamesToSamples.find(Func.getOneName()); - if (I == NamesToSamples.end()) { + auto I = NamesToBasicSamples.find(Func.getOneName()); + if (I == NamesToBasicSamples.end()) { bool Success; StringRef LocName = getLocationName(Func, BAT); -std::tie(I, Success) = NamesToSamples.insert(std::make_pair( +std::tie(I, Success) = NamesToBasicSamples.insert(std::make_pair( Func.getOneName(), FuncBasicSampleData(LocName, FuncBasicSampleData::ContainerTy(; } @@ -2194,7 +2195,7 @@ DataAggregator::writeAggregatedFile(StringRef OutputFilename) const { OutFile << " " << Entry.getKey(); OutFile << "\n"; -for (const auto &KV : NamesToSamples) { +for (const auto &KV : NamesToBasicSamples) { const FuncBasicSampleData &FSD = KV.second; for (const BasicSampleInfo &SI : FSD.Data) { writeLocation(SI.Loc); diff --git a/bolt/lib/Profile/DataReader.cpp b/bolt/lib/Profile/DataReader.cpp index fda62e8c073ea..3376bef9d3fd7 100644 --- a/bolt/lib/Profile/DataReader.cpp +++ b/bolt/lib/Profile/DataReader.cpp @@ -562,7 +562,7 @@ float DataReader::evaluateProfileData(BinaryFunction &BF, } void DataReader::readBasicSampleData(BinaryFunction &BF) { - FuncBasicSampleData *SampleDataOrErr = getFuncSampleData(BF.getNames()); + FuncBasicSampleData *SampleDataOrErr = getFuncBasicSampleData(BF.getNames()); if (!SampleDataOrErr) return; @@ -1090,10 +1090,10 @@ bool DataReader::hasMemData() { std::error_code DataReader::parseInNoLBRMode() { auto GetOrCreateFuncEntry = [&](StringRef Name) { -auto I = NamesToSamples.find(Name); -if (I == NamesToSamples.end()) { +auto I = NamesToBasicSamples.find(Name); +if (I == NamesToBasicSamples.end()) { bool Success; - std::tie(I, Success) = NamesToSamples.insert(std::make_pair( + std::tie(I, Success) = NamesToBasicSamples.insert(std::make_pair( Name, FuncBasicSampleData(Name, FuncBasicSampleData::ContainerTy(; assert(Success && "unexpected result of insert"); @@ -1142,8 +1142,8 @@ std::error_code DataReader::parseInNoLBRMode() { I->second.Data.emplace_back(std::move(MI)); } - for (auto &FuncSamples : Nam
[llvm-branch-commits] [llvm] [BOLT][NFC] Disambiguate sample as basic/IP sample (PR #139350)
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/139350 >From d32ce3f42af3da7ced12b0cc6b58e120deb83566 Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Fri, 9 May 2025 21:13:27 -0700 Subject: [PATCH] rename data members Created using spr 1.3.4 --- bolt/include/bolt/Profile/DataReader.h | 6 +++--- bolt/lib/Profile/DataAggregator.cpp| 11 ++- bolt/lib/Profile/DataReader.cpp| 21 +++-- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/bolt/include/bolt/Profile/DataReader.h b/bolt/include/bolt/Profile/DataReader.h index b91efca085c8c..fbd1dd1e68792 100644 --- a/bolt/include/bolt/Profile/DataReader.h +++ b/bolt/include/bolt/Profile/DataReader.h @@ -390,7 +390,7 @@ class DataReader : public ProfileReaderBase { FuncMemData *getMemDataForNames(const std::vector &FuncNames); FuncBasicSampleData * - getFuncSampleData(const std::vector &FuncNames); + getFuncBasicSampleData(const std::vector &FuncNames); /// Return a vector of all FuncBranchData matching the list of names. /// Internally use fuzzy matching to match special names like LTO-generated @@ -433,7 +433,7 @@ class DataReader : public ProfileReaderBase { } using NamesToBranchesMapTy = std::map; - using NamesToSamplesMapTy = std::map; + using NamesToBasicSamplesMapTy = std::map; using NamesToMemEventsMapTy = std::map; using FuncsToBranchesMapTy = std::unordered_map; @@ -496,7 +496,7 @@ class DataReader : public ProfileReaderBase { unsigned Line{0}; unsigned Col{0}; NamesToBranchesMapTy NamesToBranches; - NamesToSamplesMapTy NamesToSamples; + NamesToBasicSamplesMapTy NamesToBasicSamples; NamesToMemEventsMapTy NamesToMemEvents; FuncsToBranchesMapTy FuncsToBranches; FuncsToMemDataMapTy FuncsToMemData; diff --git a/bolt/lib/Profile/DataAggregator.cpp b/bolt/lib/Profile/DataAggregator.cpp index 7a85297fe5f0e..88dea2cef4476 100644 --- a/bolt/lib/Profile/DataAggregator.cpp +++ b/bolt/lib/Profile/DataAggregator.cpp @@ -572,7 +572,8 @@ void DataAggregator::processProfile(BinaryContext &BC) { if (FuncBranchData *FBD = getBranchData(BF)) { BF.markProfiled(BinaryFunction::PF_LBR); BF.RawSampleCount = FBD->getNumExecutedBranches(); -} else if (FuncBasicSampleData *FSD = getFuncSampleData(BF.getNames())) { +} else if (FuncBasicSampleData *FSD = + getFuncBasicSampleData(BF.getNames())) { BF.markProfiled(BinaryFunction::PF_IP); BF.RawSampleCount = FSD->getSamples(); } @@ -644,11 +645,11 @@ bool DataAggregator::doBasicSample(BinaryFunction &OrigFunc, uint64_t Address, // Attach executed bytes to parent function in case of cold fragment. Func.SampleCountInBytes += Count * BlockSize; - auto I = NamesToSamples.find(Func.getOneName()); - if (I == NamesToSamples.end()) { + auto I = NamesToBasicSamples.find(Func.getOneName()); + if (I == NamesToBasicSamples.end()) { bool Success; StringRef LocName = getLocationName(Func, BAT); -std::tie(I, Success) = NamesToSamples.insert(std::make_pair( +std::tie(I, Success) = NamesToBasicSamples.insert(std::make_pair( Func.getOneName(), FuncBasicSampleData(LocName, FuncBasicSampleData::ContainerTy(; } @@ -2194,7 +2195,7 @@ DataAggregator::writeAggregatedFile(StringRef OutputFilename) const { OutFile << " " << Entry.getKey(); OutFile << "\n"; -for (const auto &KV : NamesToSamples) { +for (const auto &KV : NamesToBasicSamples) { const FuncBasicSampleData &FSD = KV.second; for (const BasicSampleInfo &SI : FSD.Data) { writeLocation(SI.Loc); diff --git a/bolt/lib/Profile/DataReader.cpp b/bolt/lib/Profile/DataReader.cpp index fda62e8c073ea..3376bef9d3fd7 100644 --- a/bolt/lib/Profile/DataReader.cpp +++ b/bolt/lib/Profile/DataReader.cpp @@ -562,7 +562,7 @@ float DataReader::evaluateProfileData(BinaryFunction &BF, } void DataReader::readBasicSampleData(BinaryFunction &BF) { - FuncBasicSampleData *SampleDataOrErr = getFuncSampleData(BF.getNames()); + FuncBasicSampleData *SampleDataOrErr = getFuncBasicSampleData(BF.getNames()); if (!SampleDataOrErr) return; @@ -1090,10 +1090,10 @@ bool DataReader::hasMemData() { std::error_code DataReader::parseInNoLBRMode() { auto GetOrCreateFuncEntry = [&](StringRef Name) { -auto I = NamesToSamples.find(Name); -if (I == NamesToSamples.end()) { +auto I = NamesToBasicSamples.find(Name); +if (I == NamesToBasicSamples.end()) { bool Success; - std::tie(I, Success) = NamesToSamples.insert(std::make_pair( + std::tie(I, Success) = NamesToBasicSamples.insert(std::make_pair( Name, FuncBasicSampleData(Name, FuncBasicSampleData::ContainerTy(; assert(Success && "unexpected result of insert"); @@ -1142,8 +1142,8 @@ std::error_code DataReader::parseInNoLBRMode() { I->second.Data.emplace_back(std::move(MI)); } - for (auto &FuncSamples : Nam
[llvm-branch-commits] [llvm] [BOLT][NFC] Disambiguate sample as basic/IP sample (PR #139350)
https://github.com/aaupov edited https://github.com/llvm/llvm-project/pull/139350 ___ 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] [BOLT][NFC] Disambiguate sample as basic/IP sample (PR #139350)
https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/139350 >From d32ce3f42af3da7ced12b0cc6b58e120deb83566 Mon Sep 17 00:00:00 2001 From: Amir Ayupov Date: Fri, 9 May 2025 21:13:27 -0700 Subject: [PATCH] rename data members Created using spr 1.3.4 --- bolt/include/bolt/Profile/DataReader.h | 6 +++--- bolt/lib/Profile/DataAggregator.cpp| 11 ++- bolt/lib/Profile/DataReader.cpp| 21 +++-- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/bolt/include/bolt/Profile/DataReader.h b/bolt/include/bolt/Profile/DataReader.h index b91efca085c8c..fbd1dd1e68792 100644 --- a/bolt/include/bolt/Profile/DataReader.h +++ b/bolt/include/bolt/Profile/DataReader.h @@ -390,7 +390,7 @@ class DataReader : public ProfileReaderBase { FuncMemData *getMemDataForNames(const std::vector &FuncNames); FuncBasicSampleData * - getFuncSampleData(const std::vector &FuncNames); + getFuncBasicSampleData(const std::vector &FuncNames); /// Return a vector of all FuncBranchData matching the list of names. /// Internally use fuzzy matching to match special names like LTO-generated @@ -433,7 +433,7 @@ class DataReader : public ProfileReaderBase { } using NamesToBranchesMapTy = std::map; - using NamesToSamplesMapTy = std::map; + using NamesToBasicSamplesMapTy = std::map; using NamesToMemEventsMapTy = std::map; using FuncsToBranchesMapTy = std::unordered_map; @@ -496,7 +496,7 @@ class DataReader : public ProfileReaderBase { unsigned Line{0}; unsigned Col{0}; NamesToBranchesMapTy NamesToBranches; - NamesToSamplesMapTy NamesToSamples; + NamesToBasicSamplesMapTy NamesToBasicSamples; NamesToMemEventsMapTy NamesToMemEvents; FuncsToBranchesMapTy FuncsToBranches; FuncsToMemDataMapTy FuncsToMemData; diff --git a/bolt/lib/Profile/DataAggregator.cpp b/bolt/lib/Profile/DataAggregator.cpp index 7a85297fe5f0e..88dea2cef4476 100644 --- a/bolt/lib/Profile/DataAggregator.cpp +++ b/bolt/lib/Profile/DataAggregator.cpp @@ -572,7 +572,8 @@ void DataAggregator::processProfile(BinaryContext &BC) { if (FuncBranchData *FBD = getBranchData(BF)) { BF.markProfiled(BinaryFunction::PF_LBR); BF.RawSampleCount = FBD->getNumExecutedBranches(); -} else if (FuncBasicSampleData *FSD = getFuncSampleData(BF.getNames())) { +} else if (FuncBasicSampleData *FSD = + getFuncBasicSampleData(BF.getNames())) { BF.markProfiled(BinaryFunction::PF_IP); BF.RawSampleCount = FSD->getSamples(); } @@ -644,11 +645,11 @@ bool DataAggregator::doBasicSample(BinaryFunction &OrigFunc, uint64_t Address, // Attach executed bytes to parent function in case of cold fragment. Func.SampleCountInBytes += Count * BlockSize; - auto I = NamesToSamples.find(Func.getOneName()); - if (I == NamesToSamples.end()) { + auto I = NamesToBasicSamples.find(Func.getOneName()); + if (I == NamesToBasicSamples.end()) { bool Success; StringRef LocName = getLocationName(Func, BAT); -std::tie(I, Success) = NamesToSamples.insert(std::make_pair( +std::tie(I, Success) = NamesToBasicSamples.insert(std::make_pair( Func.getOneName(), FuncBasicSampleData(LocName, FuncBasicSampleData::ContainerTy(; } @@ -2194,7 +2195,7 @@ DataAggregator::writeAggregatedFile(StringRef OutputFilename) const { OutFile << " " << Entry.getKey(); OutFile << "\n"; -for (const auto &KV : NamesToSamples) { +for (const auto &KV : NamesToBasicSamples) { const FuncBasicSampleData &FSD = KV.second; for (const BasicSampleInfo &SI : FSD.Data) { writeLocation(SI.Loc); diff --git a/bolt/lib/Profile/DataReader.cpp b/bolt/lib/Profile/DataReader.cpp index fda62e8c073ea..3376bef9d3fd7 100644 --- a/bolt/lib/Profile/DataReader.cpp +++ b/bolt/lib/Profile/DataReader.cpp @@ -562,7 +562,7 @@ float DataReader::evaluateProfileData(BinaryFunction &BF, } void DataReader::readBasicSampleData(BinaryFunction &BF) { - FuncBasicSampleData *SampleDataOrErr = getFuncSampleData(BF.getNames()); + FuncBasicSampleData *SampleDataOrErr = getFuncBasicSampleData(BF.getNames()); if (!SampleDataOrErr) return; @@ -1090,10 +1090,10 @@ bool DataReader::hasMemData() { std::error_code DataReader::parseInNoLBRMode() { auto GetOrCreateFuncEntry = [&](StringRef Name) { -auto I = NamesToSamples.find(Name); -if (I == NamesToSamples.end()) { +auto I = NamesToBasicSamples.find(Name); +if (I == NamesToBasicSamples.end()) { bool Success; - std::tie(I, Success) = NamesToSamples.insert(std::make_pair( + std::tie(I, Success) = NamesToBasicSamples.insert(std::make_pair( Name, FuncBasicSampleData(Name, FuncBasicSampleData::ContainerTy(; assert(Success && "unexpected result of insert"); @@ -1142,8 +1142,8 @@ std::error_code DataReader::parseInNoLBRMode() { I->second.Data.emplace_back(std::move(MI)); } - for (auto &FuncSamples : Nam