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