Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Unified Diff: src/counters.cc

Issue 6685088: Merge isolates to bleeding_edge. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/counters.h ('k') | src/cpu-profiler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/counters.cc
===================================================================
--- src/counters.cc (revision 7267)
+++ src/counters.cc (working copy)
@@ -28,15 +28,23 @@
#include "v8.h"
#include "counters.h"
+#include "isolate.h"
#include "platform.h"
namespace v8 {
namespace internal {
-CounterLookupCallback StatsTable::lookup_function_ = NULL;
-CreateHistogramCallback StatsTable::create_histogram_function_ = NULL;
-AddHistogramSampleCallback StatsTable::add_histogram_sample_function_ = NULL;
+StatsTable::StatsTable()
+ : lookup_function_(NULL),
+ create_histogram_function_(NULL),
+ add_histogram_sample_function_(NULL) {}
+
+int* StatsCounter::FindLocationInStatsTable() const {
+ return Isolate::Current()->stats_table()->FindLocation(name_);
+}
+
+
// Start the timer.
void StatsCounterTimer::Start() {
if (!counter_.Enabled())
@@ -71,8 +79,15 @@
// Compute the delta between start and stop, in milliseconds.
int milliseconds = static_cast<int>(stop_time_ - start_time_) / 1000;
- StatsTable::AddHistogramSample(histogram_, milliseconds);
+ Isolate::Current()->stats_table()->
+ AddHistogramSample(histogram_, milliseconds);
}
}
+
+void* HistogramTimer::CreateHistogram() const {
+ return Isolate::Current()->stats_table()->
+ CreateHistogram(name_, 0, 10000, 50);
+}
+
} } // namespace v8::internal
« no previous file with comments | « src/counters.h ('k') | src/cpu-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698