diff options
| author | Qin Zhao <zhaoqin@google.com> | 2016-06-17 04:50:11 +0000 |
|---|---|---|
| committer | Qin Zhao <zhaoqin@google.com> | 2016-06-17 04:50:11 +0000 |
| commit | e24bc365e848622742b671c58410b9de9c3f97da (patch) | |
| tree | 7459a8169d7573ab3e7603f3e7950beaa3b43634 /compiler-rt/lib | |
| parent | 028fd5064298868dbc238fe768091a3c8360959d (diff) | |
| download | bcm5719-llvm-e24bc365e848622742b671c58410b9de9c3f97da.tar.gz bcm5719-llvm-e24bc365e848622742b671c58410b9de9c3f97da.zip | |
[esan|cfrag] Add the struct field size array in StructInfo
Summary:
Adds the struct field size array in the struct StructInfo.
Prints struct field size info in the report.
Reviewers: aizatsky
Subscribers: vitalybuka, zhaoqin, kcc, eugenis, bruening, llvm-commits, kubabrecka
Differential Revision: http://reviews.llvm.org/D21342
llvm-svn: 272988
Diffstat (limited to 'compiler-rt/lib')
| -rw-r--r-- | compiler-rt/lib/esan/cache_frag.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler-rt/lib/esan/cache_frag.cpp b/compiler-rt/lib/esan/cache_frag.cpp index 32a8a4a9b89..2096bec7569 100644 --- a/compiler-rt/lib/esan/cache_frag.cpp +++ b/compiler-rt/lib/esan/cache_frag.cpp @@ -29,6 +29,7 @@ struct StructInfo { u32 Size; u32 NumFields; u32 *FieldOffsets; + u32 *FieldSize; u64 *FieldCounters; const char **FieldTypeNames; }; @@ -98,9 +99,9 @@ static void reportStructCounter(StructHashMap::Handle &Handle) { Report(" size = %u, count = %llu, ratio = %llu\n", Struct->Size, Handle->Count, Handle->Ratio); for (u32 i = 0; i < Struct->NumFields; ++i) { - Report(" #%2u: offset = %u,\t count = %llu,\t type = %.*s\n", i, - Struct->FieldOffsets[i], Struct->FieldCounters[i], - TypePrintLimit, Struct->FieldTypeNames[i]); + Report(" #%2u: offset = %u,\t size = %u,\t count = %llu,\t type = %.*s\n", + i, Struct->FieldOffsets[i], Struct->FieldSize[i], + Struct->FieldCounters[i], TypePrintLimit, Struct->FieldTypeNames[i]); } } |

