diff options
author | Eli Bendersky <eliben@google.com> | 2012-12-07 17:59:21 +0000 |
---|---|---|
committer | Eli Bendersky <eliben@google.com> | 2012-12-07 17:59:21 +0000 |
commit | 8ddc5a192935728c15602a4c15501e35f116422d (patch) | |
tree | f63f379e8c46c440224daf45ea903d7e2a29dfec /lib/MC | |
parent | cd81dce7743265bb044171fe8584f799c43bc7d0 (diff) | |
download | external_llvm-8ddc5a192935728c15602a4c15501e35f116422d.zip external_llvm-8ddc5a192935728c15602a4c15501e35f116422d.tar.gz external_llvm-8ddc5a192935728c15602a4c15501e35f116422d.tar.bz2 |
Add separate statistics for Data and Inst fragments emitted during relaxation.
Also fixes a test that was overly-sensitive to the exact order of statistics
emitted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169619 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/MC')
-rw-r--r-- | lib/MC/MCAssembler.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp index 457abd2..5032e6f 100644 --- a/lib/MC/MCAssembler.cpp +++ b/lib/MC/MCAssembler.cpp @@ -33,7 +33,9 @@ using namespace llvm; namespace { namespace stats { -STATISTIC(EmittedFragments, "Number of emitted assembler fragments"); +STATISTIC(EmittedFragments, "Number of emitted assembler fragments - total"); +STATISTIC(EmittedInstFragments, "Number of emitted assembler fragments - instruction"); +STATISTIC(EmittedDataFragments, "Number of emitted assembler fragments - data"); STATISTIC(evaluateFixup, "Number of evaluated fixups"); STATISTIC(FragmentLayouts, "Number of fragment layouts"); STATISTIC(ObjectBytes, "Number of emitted object file bytes"); @@ -432,6 +434,7 @@ static void WriteFragmentData(const MCAssembler &Asm, const MCAsmLayout &Layout, } case MCFragment::FT_Data: { + ++stats::EmittedDataFragments; MCDataFragment &DF = cast<MCDataFragment>(F); assert(FragmentSize == DF.getContents().size() && "Invalid size!"); OW->WriteBytes(DF.getContents().str()); @@ -456,6 +459,7 @@ static void WriteFragmentData(const MCAssembler &Asm, const MCAsmLayout &Layout, } case MCFragment::FT_Inst: { + ++stats::EmittedInstFragments; MCInstFragment &IF = cast<MCInstFragment>(F); OW->WriteBytes(StringRef(IF.getCode().begin(), IF.getCode().size())); break; |