aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/ProfileData/SampleProfReader.cpp
diff options
context:
space:
mode:
authorDiego Novillo <dnovillo@google.com>2015-11-12 17:58:14 +0000
committerDiego Novillo <dnovillo@google.com>2015-11-12 17:58:14 +0000
commit4b6bdb538efa13179b7862dba11a0a07fc35e304 (patch)
tree0bc9c49ced8e0257a7075323936d58722bd7e9a3 /llvm/lib/ProfileData/SampleProfReader.cpp
parent74b396d9cb5e44e4c57bebd11d8a7aa9e552f5db (diff)
downloadllvm-4b6bdb538efa13179b7862dba11a0a07fc35e304.zip
llvm-4b6bdb538efa13179b7862dba11a0a07fc35e304.tar.gz
llvm-4b6bdb538efa13179b7862dba11a0a07fc35e304.tar.bz2
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. llvm-svn: 252915
Diffstat (limited to 'llvm/lib/ProfileData/SampleProfReader.cpp')
-rw-r--r--llvm/lib/ProfileData/SampleProfReader.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/llvm/lib/ProfileData/SampleProfReader.cpp b/llvm/lib/ProfileData/SampleProfReader.cpp
index 899343f..a5d0008 100644
--- a/llvm/lib/ProfileData/SampleProfReader.cpp
+++ b/llvm/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.