Skip to content

Commit

Permalink
i#4318 xarch memtrace: Remove raw from final name (#4365)
Browse files Browse the repository at this point in the history
When raw files are gzipped and named xxx.raw.gz, the corresponding
final trace files end up named xxx.raw.trace.gz, i.e., with an extra
"raw." in there.  We fix that here.

Issue: #4318
  • Loading branch information
derekbruening committed Jul 8, 2020
1 parent 054d9af commit 53afc93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion clients/drcachesim/tracer/raw2trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@

#define OUTFILE_SUFFIX "raw"
#ifdef HAS_ZLIB
# define OUTFILE_SUFFIX_GZ "gz"
# define OUTFILE_SUFFIX_GZ "raw.gz"
#endif
#define OUTFILE_SUBDIR "raw"
#define TRACE_SUBDIR "trace"
Expand Down
4 changes: 2 additions & 2 deletions clients/drcachesim/tracer/raw2trace_directory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ raw2trace_directory_t::open_thread_log_file(const char *basename)
const char *basename_pre_suffix = nullptr;
bool is_gzipped = false;
#ifdef HAS_ZLIB
basename_pre_suffix = strstr(basename_dot, OUTFILE_SUFFIX_GZ);
basename_pre_suffix =
strstr(basename_dot - strlen(OUTFILE_SUFFIX_GZ), OUTFILE_SUFFIX_GZ);
if (basename_pre_suffix != nullptr) {
is_gzipped = true;
basename_dot = strrchr(basename_pre_suffix, '.');
}
#endif
if (basename_pre_suffix == nullptr)
Expand Down

0 comments on commit 53afc93

Please sign in to comment.