Skip to content

Commit

Permalink
i#2006 drcachesim generalization: make subclassing easier (#2685)
Browse files Browse the repository at this point in the history
Marks the file_reader_t::is_complete() and analyzer_t::init_file_reader()
methods as virtual to provide more flexibility in subclassing.

Cleans up some now-stale comments about drcachesim optimizations.

Issue: #2006
  • Loading branch information
derekbruening authored Nov 2, 2017
1 parent 2447327 commit 012b058
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion clients/drcachesim/reader/compressed_file_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class compressed_file_reader_t : public reader_t
explicit compressed_file_reader_t(const char *file_name);
virtual ~compressed_file_reader_t();
virtual bool init();
bool is_complete();
virtual bool is_complete();

protected:
virtual trace_entry_t * read_next_entry();
Expand Down
4 changes: 2 additions & 2 deletions clients/drcachesim/reader/file_reader.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* **********************************************************
* Copyright (c) 2016 Google, Inc. All rights reserved.
* Copyright (c) 2016-2017 Google, Inc. All rights reserved.
* **********************************************************/

/*
Expand Down Expand Up @@ -50,7 +50,7 @@ class file_reader_t : public reader_t
explicit file_reader_t(const char *file_name);
virtual ~file_reader_t();
virtual bool init();
bool is_complete();
virtual bool is_complete();

protected:
virtual trace_entry_t * read_next_entry();
Expand Down
1 change: 0 additions & 1 deletion clients/drcachesim/tools/histogram.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class histogram_t : public analysis_tool_t
virtual bool print_results();

protected:
/* FIXME i#2020: use unsorted_map (C++11) for faster lookup */
std::unordered_map<addr_t, uint64_t> icache_map;
std::unordered_map<addr_t, uint64_t> dcache_map;

Expand Down
1 change: 0 additions & 1 deletion clients/drcachesim/tools/reuse_distance.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ class reuse_distance_t : public analysis_tool_t
static unsigned int knob_verbose;

protected:
/* XXX i#2020: use unsorted_map (C++11) for faster lookup */
std::unordered_map<addr_t, line_ref_t*> cache_map;
// This is our reuse distance histogram.
std::unordered_map<int_least64_t, int_least64_t> dist_map;
Expand Down

0 comments on commit 012b058

Please sign in to comment.