diff options
author | Diego Novillo <dnovillo@google.com> | 2015-11-12 17:58:14 +0000 |
---|---|---|
committer | Diego Novillo <dnovillo@google.com> | 2015-11-12 17:58:14 +0000 |
commit | 7e02753319518a923db8d5460c860c6dd05d35ef (patch) | |
tree | 3e2c6d5ba975ab3c4b16107a3f7dc7a41085f10a /lib/ProfileData/SampleProfReader.cpp | |
parent | 2aca944a0ee8a469179ebf9ec38eae8ea351cb78 (diff) |
SamplePGO - Move FunctionSamples::print() to a better location. NFC.
The class is declared in SampleProf.h, so a better home for this is
SampleProf.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@252915 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ProfileData/SampleProfReader.cpp')
-rw-r--r-- | lib/ProfileData/SampleProfReader.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/ProfileData/SampleProfReader.cpp b/lib/ProfileData/SampleProfReader.cpp index 899343f72f7..a5d00083b53 100644 --- a/lib/ProfileData/SampleProfReader.cpp +++ b/lib/ProfileData/SampleProfReader.cpp @@ -32,37 +32,6 @@ using namespace llvm::sampleprof; using namespace llvm; -/// \brief Print the samples collected for a function on stream \p OS. -/// -/// \param OS Stream to emit the output to. -void FunctionSamples::print(raw_ostream &OS, unsigned Indent) const { - OS << TotalSamples << ", " << TotalHeadSamples << ", " << BodySamples.size() - << " sampled lines\n"; - for (const auto &SI : BodySamples) { - LineLocation Loc = SI.first; - const SampleRecord &Sample = SI.second; - OS.indent(Indent); - OS << "line offset: " << Loc.LineOffset - << ", discriminator: " << Loc.Discriminator - << ", number of samples: " << Sample.getSamples(); - if (Sample.hasCalls()) { - OS << ", calls:"; - for (const auto &I : Sample.getCallTargets()) - OS << " " << I.first() << ":" << I.second; - } - OS << "\n"; - } - for (const auto &CS : CallsiteSamples) { - CallsiteLocation Loc = CS.first; - const FunctionSamples &CalleeSamples = CS.second; - OS.indent(Indent); - OS << "line offset: " << Loc.LineOffset - << ", discriminator: " << Loc.Discriminator - << ", inlined callee: " << Loc.CalleeName << ": "; - CalleeSamples.print(OS, Indent + 2); - } -} - /// \brief Dump the function profile for \p FName. /// /// \param FName Name of the function to print. |