summaryrefslogtreecommitdiff
path: root/compiler/driver/compiler_options.h
diff options
context:
space:
mode:
author Alex Light <allight@google.com> 2014-06-06 15:45:32 -0700
committer Brian Carlstrom <bdc@google.com> 2014-06-12 15:49:56 -0700
commit78382fa44ee505cf16835e4d22515e7252a90864 (patch)
treeb944fcc149ab09c4260c57b41128cfd6ffe09cdc /compiler/driver/compiler_options.h
parent1f968319c95136cafe8e5a813ef822f0a8963b98 (diff)
Optionally add debug symbols to ELF files made by quick compiler.
Added debug symbols to ELF files created by dex2oat using the quick compiler. Adds two flags --include-debug-symbols and --no-include-debug-symbols for dex2oat that control the inclusion of these debug symbols. Debug info is added by default if kIsDebugBuild is true. Fixed bug where Intel DWARF information would not correctly deal with deduplicated code the binary. Changed the portable compiler code path in dex2oat.cc so that symbols will not be stripped when run with --include-debug-symbols. Change-Id: Ia2eb2f654dedf0e5e8606f7744e05b8d14155fb1
Diffstat (limited to 'compiler/driver/compiler_options.h')
-rw-r--r--compiler/driver/compiler_options.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/compiler/driver/compiler_options.h b/compiler/driver/compiler_options.h
index 05a9ac7ee9..5d1c5dadaf 100644
--- a/compiler/driver/compiler_options.h
+++ b/compiler/driver/compiler_options.h
@@ -42,6 +42,7 @@ class CompilerOptions {
static const size_t kDefaultTinyMethodThreshold = 20;
static const size_t kDefaultNumDexMethodsThreshold = 900;
static constexpr double kDefaultTopKProfileThreshold = 90.0;
+ static const bool kDefaultIncludeDebugSymbols = kIsDebugBuild;
CompilerOptions() :
compiler_filter_(kDefaultCompilerFilter),
@@ -51,7 +52,8 @@ class CompilerOptions {
tiny_method_threshold_(kDefaultTinyMethodThreshold),
num_dex_methods_threshold_(kDefaultNumDexMethodsThreshold),
generate_gdb_information_(false),
- top_k_profile_threshold_(kDefaultTopKProfileThreshold)
+ top_k_profile_threshold_(kDefaultTopKProfileThreshold),
+ include_debug_symbols_(kDefaultIncludeDebugSymbols)
#ifdef ART_SEA_IR_MODE
, sea_ir_mode_(false)
#endif
@@ -64,7 +66,8 @@ class CompilerOptions {
size_t tiny_method_threshold,
size_t num_dex_methods_threshold,
bool generate_gdb_information,
- double top_k_profile_threshold
+ double top_k_profile_threshold,
+ bool include_debug_symbols
#ifdef ART_SEA_IR_MODE
, bool sea_ir_mode
#endif
@@ -76,7 +79,8 @@ class CompilerOptions {
tiny_method_threshold_(tiny_method_threshold),
num_dex_methods_threshold_(num_dex_methods_threshold),
generate_gdb_information_(generate_gdb_information),
- top_k_profile_threshold_(top_k_profile_threshold)
+ top_k_profile_threshold_(top_k_profile_threshold),
+ include_debug_symbols_(include_debug_symbols)
#ifdef ART_SEA_IR_MODE
, sea_ir_mode_(sea_ir_mode)
#endif
@@ -139,6 +143,10 @@ class CompilerOptions {
return top_k_profile_threshold_;
}
+ bool GetIncludeDebugSymbols() const {
+ return include_debug_symbols_;
+ }
+
#ifdef ART_SEA_IR_MODE
bool GetSeaIrMode();
#endif
@@ -157,6 +165,7 @@ class CompilerOptions {
bool generate_gdb_information_;
// When using a profile file only the top K% of the profiled samples will be compiled.
double top_k_profile_threshold_;
+ bool include_debug_symbols_;
#ifdef ART_SEA_IR_MODE
bool sea_ir_mode_;
#endif