From e24bc365e848622742b671c58410b9de9c3f97da Mon Sep 17 00:00:00 2001 From: Qin Zhao Date: Fri, 17 Jun 2016 04:50:11 +0000 Subject: [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 --- compiler-rt/lib/esan/cache_frag.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'compiler-rt/lib/esan/cache_frag.cpp') 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]); } } -- cgit v1.2.3