Commit Graph

11 Commits

Author SHA1 Message Date
Sagar Thakur 2ce2ab3a4d [ESan][MIPS] Fix tests struct-simple.cpp on MIPS
For mips assember '#' is the start of comment. We get assembler error messages if # is used in the struct names. Therefore using '$' which works for all architectures.

Differential: D24335
Reviewed by: zhaoqin

llvm-svn: 282142
2016-09-22 08:36:54 +00:00
Derek Bruening dec4bd0838 [esan] Add __esan_report for mid-run data
Summary:
Adds a new public interface routine __esan_report() which can be used to
request profiling results prior to abnormal termination (e.g., for a server
process killed by its parent where the normal exit does not allow for
normal result reporting).

Implements this for the working-set tool.  The cache frag tool is left
unimplemented as it requires missing iteration capabilities.

Adds a new test.

Reviewers: aizatsky

Subscribers: vitalybuka, zhaoqin, kcc, eugenis, llvm-commits, kubabrecka

Differential Revision: http://reviews.llvm.org/D22098

llvm-svn: 274964
2016-07-09 04:13:25 +00:00
Qin Zhao 7f92eab5af [esan|cfrag] Handle binaries built with -esan-aux-field-info=false
Summary:
Handles binaries built with -esan-aux-field-info=false and print less
information.

Updates test struct-simple.cpp.

Reviewers: aizatsky

Subscribers: llvm-commits, bruening, eugenis, kcc, zhaoqin, kubabrecka, vitalybuka

Differential Revision: http://reviews.llvm.org/D22020

llvm-svn: 274727
2016-07-07 03:20:24 +00:00
Qin Zhao 91ea3fb698 [esan|cfrag] Add struct array access report
Summary:
Adds struct array access counter report.

Updates test struct-simple.cpp.

Reviewers: aizatsky

Subscribers: vitalybuka, zhaoqin, kcc, eugenis, bruening, llvm-commits, kubabrecka

Differential Revision: http://reviews.llvm.org/D21595

llvm-svn: 274421
2016-07-02 03:25:55 +00:00
Qin Zhao e24bc365e8 [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
2016-06-17 04:50:11 +00:00
Qin Zhao cd5fe14d89 [esan|cfrag] Minor cfrag report adjustment
Summary:
Reports the struct field access info only if it has been used at least
once.

Adds type printing size limit.

Formats the cache_frag.cpp with clang-format.

Reviewers: bruening

Subscribers: llvm-commits, eugenis, kcc, zhaoqin, vitalybuka, aizatsky, kubabrecka

Differential Revision: http://reviews.llvm.org/D21351

llvm-svn: 272810
2016-06-15 17:27:29 +00:00
Qin Zhao a4a7220db1 [esan|cfrag] Add the struct field offset array in StructInfo
Summary:
Adds the struct field offset array in the struct StructInfo.

Prints struct size and field offset info in the report.

Reviewers: aizatsky

Subscribers: vitalybuka, zhaoqin, kcc, eugenis, bruening, llvm-commits, kubabrecka

Differential Revision: http://reviews.llvm.org/D21191

llvm-svn: 272363
2016-06-10 02:10:34 +00:00
Qin Zhao bc929e4765 [esan|cfrag] Compute the struct field access difference ratio
Summary:
Computes the struct field access variation based on each field access
count.

Adds a flag to control the report thresholds.

Updates struct-simple.cpp with variance report output.

Reviewers: aizatsky

Subscribers: kubabrecka, zhaoqin, llvm-commits, eugenis, vitalybuka, kcc, bruening

Differential Revision: http://reviews.llvm.org/D20914

llvm-svn: 271734
2016-06-03 20:48:17 +00:00
Qin Zhao 4175a6d580 [esan|cfrag] Add struct info registration
Summary:
Adds StructInfo to CacheFragInfo to match the LLVM's EfficiencySanitizer
structs.

Uses StructHashMap to keep track of the struct info used by the app.

Adds registerStructInfo/unregisterStructInfo to add/remove struct infos
to/from StructHashMap.

updates test struct-simple.cpp with more C structs.

Reviewers: aizatsky, filcab

Subscribers: filcab, zhaoqin, llvm-commits, eugenis, vitalybuka, kcc, bruening, kubabrecka

Differential Revision: http://reviews.llvm.org/D20590

llvm-svn: 271564
2016-06-02 18:45:25 +00:00
Qin Zhao 9e39638375 [esan|cfrag] Add the skeleton to handle the cfrag argument
Summary:
Adds the struct declaration for the cache-fragmentation tool variable
passed to the runtime library.

Updates test struct-simple.cpp.

Reviewers: aizatsky, bruening

Subscribers: filcab, kubabrecka, bruening, kcc, vitalybuka, eugenis, llvm-commits, zhaoqin

Differential Revision: http://reviews.llvm.org/D20542

llvm-svn: 271337
2016-05-31 21:27:39 +00:00
Qin Zhao 7e4933f430 [esan][cfrag] Add skeleton for cache fragmentation tool support
Summary:
Adds cache_frag.h and cache_frag.cpp for the cache fragmentation tool.

Updates test struct-simple.cpp.

Reviewers: aizatsky

Subscribers: filcab, zhaoqin, llvm-commits, eugenis, vitalybuka, kcc, bruening, kubabrecka

Differential Revision: http://reviews.llvm.org/D20538

llvm-svn: 270737
2016-05-25 17:49:00 +00:00