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 | 820e56d16151e68193754349bfdbbd5682a7fb15 (patch) | |
tree | 00c84b44fed27f0b20e28d499c37b32ce87505cc /lib/esan | |
parent | 8e594800c13bfb07591dd81b5ff5d97137072e8d (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@272988 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/esan')
-rw-r--r-- | lib/esan/cache_frag.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/esan/cache_frag.cpp b/lib/esan/cache_frag.cpp index 32a8a4a9b..2096bec75 100644 --- a/lib/esan/cache_frag.cpp +++ b/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]); } } |