From 847f4ce61641004d88c5cfbc28ea4ed83ea16d09 Mon Sep 17 00:00:00 2001 From: "svenpanne@chromium.org" Date: Fri, 18 Oct 2013 09:06:58 +0000 Subject: [PATCH] Removed dead code from mksnapshot. R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/28683002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@17262 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/mksnapshot.cc | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/src/mksnapshot.cc b/src/mksnapshot.cc index 75babb57d0..95d3daada2 100644 --- a/src/mksnapshot.cc +++ b/src/mksnapshot.cc @@ -43,49 +43,6 @@ using namespace v8; -static const unsigned int kMaxCounters = 256; - -// A single counter in a counter collection. -class Counter { - public: - static const int kMaxNameSize = 64; - int32_t* Bind(const char* name) { - int i; - for (i = 0; i < kMaxNameSize - 1 && name[i]; i++) { - name_[i] = name[i]; - } - name_[i] = '\0'; - return &counter_; - } - private: - int32_t counter_; - uint8_t name_[kMaxNameSize]; -}; - - -// A set of counters and associated information. An instance of this -// class is stored directly in the memory-mapped counters file if -// the --save-counters options is used -class CounterCollection { - public: - CounterCollection() { - magic_number_ = 0xDEADFACE; - max_counters_ = kMaxCounters; - max_name_size_ = Counter::kMaxNameSize; - counters_in_use_ = 0; - } - Counter* GetNextCounter() { - if (counters_in_use_ == kMaxCounters) return NULL; - return &counters_[counters_in_use_++]; - } - private: - uint32_t magic_number_; - uint32_t max_counters_; - uint32_t max_name_size_; - uint32_t counters_in_use_; - Counter counters_[kMaxCounters]; -}; - class Compressor { public: