]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/compiler-rt/lib/esan/esan_flags.inc
Merge compiler-rt release_40 branch r292009.
[FreeBSD/FreeBSD.git] / contrib / compiler-rt / lib / esan / esan_flags.inc
1 //===-- esan_flags.inc ------------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // Esan runtime flags.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef ESAN_FLAG
15 # error "Define ESAN_FLAG prior to including this file!"
16 #endif
17
18 // ESAN_FLAG(Type, Name, DefaultValue, Description)
19 // See COMMON_FLAG in sanitizer_flags.inc for more details.
20
21 //===----------------------------------------------------------------------===//
22 // Cross-tool options
23 //===----------------------------------------------------------------------===//
24
25 ESAN_FLAG(int, cache_line_size, 64,
26           "The number of bytes in a cache line.  For the working-set tool, this "
27           "cannot be changed without also changing the compiler "
28           "instrumentation.")
29
30 //===----------------------------------------------------------------------===//
31 // Working set tool options
32 //===----------------------------------------------------------------------===//
33
34 ESAN_FLAG(bool, record_snapshots, true,
35           "Working set tool: whether to sample snapshots during a run.")
36
37 // Typical profiling uses a 10ms timer.  Our snapshots take some work
38 // to scan memory so we reduce to 20ms.
39 // To disable samples, turn off record_snapshots.
40 ESAN_FLAG(int, sample_freq, 20,
41           "Working set tool: sampling frequency in milliseconds.")
42
43 // This controls the difference in frequency between each successive series
44 // of snapshots.  There are 8 in total, with number 0 using sample_freq.
45 // Number N samples number N-1 every (1 << snapshot_step) instance of N-1.
46 ESAN_FLAG(int, snapshot_step, 2, "Working set tool: the log of the sampling "
47           "performed for the next-higher-frequency snapshot series.")
48
49 //===----------------------------------------------------------------------===//
50 // Cache Fragmentation tool options
51 //===----------------------------------------------------------------------===//
52
53 // The difference information of a struct is reported if the struct's difference
54 // score is greater than the report_threshold.
55 ESAN_FLAG(int, report_threshold, 1<<10, "Cache-frag tool: the struct difference"
56           " score threshold for reporting.")