Skip to content

Commit

Permalink
Make -bbdump_tags available in release build (#2547)
Browse files Browse the repository at this point in the history
Removes the #ifdef INTERNAL from -bbdump_tags, making it available in
release builds.  Adds a nightly test set.
  • Loading branch information
derekbruening authored Jul 18, 2017
1 parent 8bd6c39 commit ac72b3c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
10 changes: 1 addition & 9 deletions core/arch/interp.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,7 @@ DECLARE_CXTSWPROT_VAR(mutex_t bb_building_lock, INIT_LOCK_FREE(bb_building_lock)
/* i#1111: we do not use the lock until the 2nd thread is created */
volatile bool bb_lock_start;

#ifdef INTERNAL
file_t bbdump_file = INVALID_FILE;
#endif
static file_t bbdump_file = INVALID_FILE;

#ifdef DEBUG
DECLARE_NEVERPROT_VAR(uint debug_bb_count, 0);
Expand All @@ -132,12 +130,10 @@ DECLARE_NEVERPROT_VAR(uint debug_bb_count, 0);
void
interp_init()
{
#ifdef INTERNAL
if (INTERNAL_OPTION(bbdump_tags)) {
bbdump_file = open_log_file("bbs", NULL, 0);
ASSERT(bbdump_file != INVALID_FILE);
}
#endif
}

#ifdef CUSTOM_TRACES_RET_REMOVAL
Expand All @@ -151,11 +147,9 @@ static int num_rets_removed;
void
interp_exit()
{
#ifdef INTERNAL
if (INTERNAL_OPTION(bbdump_tags)) {
close_log_file(bbdump_file);
}
#endif
DELETE_LOCK(bb_building_lock);

LOG(GLOBAL, LOG_INTERP|LOG_STATS, 1, "Total application code seen: %d KB\n",
Expand Down Expand Up @@ -5246,11 +5240,9 @@ build_basic_block_fragment(dcontext_t *dcontext, app_pc start, uint initial_flag
disassemble_fragment(dcontext, f, false);
}
});
#ifdef INTERNAL
if (INTERNAL_OPTION(bbdump_tags)) {
disassemble_fragment_header(dcontext, f, bbdump_file);
}
#endif

#ifdef INTERNAL
DODEBUG({
Expand Down
1 change: 1 addition & 0 deletions suite/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ set(vmap_run_list
"ONLY::^common::-code_api -tracedump_text -tracedump_origins"
"ONLY::^common::-code_api -tracedump_text -tracedump_origins -syntax_intel"
"X86::ONLY::^common::-code_api -thread_private -tracedump_binary" # i#1884: ARM NYI
"ONLY::^common::-code_api -bbdump_tags"

# make sure we at least sometimes exercise non-default -checklevel
"DEBUG::ONLY::^common::-checklevel 4"
Expand Down

0 comments on commit ac72b3c

Please sign in to comment.