Index: src/v8-counters.h |
diff --git a/src/v8-counters.h b/src/v8-counters.h |
index dc55042b462ee08a86d7685ea4176fe050c3fb6d..435d79619d16ba4e49120d4532c04e9ca4dc5c98 100644 |
--- a/src/v8-counters.h |
+++ b/src/v8-counters.h |
@@ -1,4 +1,4 @@ |
-// Copyright 2011 the V8 project authors. All rights reserved. |
+// Copyright 2012 the V8 project authors. All rights reserved. |
// Redistribution and use in source and binary forms, with or without |
// modification, are permitted provided that the following conditions are |
// met: |
@@ -30,6 +30,7 @@ |
#include "allocation.h" |
#include "counters.h" |
+#include "objects.h" |
#include "v8globals.h" |
namespace v8 { |
@@ -286,6 +287,12 @@ class Counters { |
STATS_COUNTER_LIST_2(SC) |
#undef SC |
+#define SC(name) \ |
+ StatsCounter* count_of_##name() { return &count_of_##name##_; } \ |
+ StatsCounter* size_of_##name() { return &size_of_##name##_; } |
+ INSTANCE_TYPE_LIST(SC) |
+#undef SC |
+ |
enum Id { |
#define RATE_ID(name, caption) k_##name, |
HISTOGRAM_TIMER_LIST(RATE_ID) |
@@ -294,6 +301,9 @@ class Counters { |
STATS_COUNTER_LIST_1(COUNTER_ID) |
STATS_COUNTER_LIST_2(COUNTER_ID) |
#undef COUNTER_ID |
+#define COUNTER_ID(name) kCountOf##name, kSizeOf##name, |
+ INSTANCE_TYPE_LIST(COUNTER_ID) |
+#undef COUNTER_ID |
#define COUNTER_ID(name) k_##name, |
STATE_TAG_LIST(COUNTER_ID) |
#undef COUNTER_ID |
@@ -316,6 +326,12 @@ class Counters { |
STATS_COUNTER_LIST_2(SC) |
#undef SC |
+#define SC(name) \ |
+ StatsCounter size_of_##name##_; \ |
+ StatsCounter count_of_##name##_; |
+ INSTANCE_TYPE_LIST(SC) |
+#undef SC |
+ |
enum { |
#define COUNTER_ID(name) __##name, |
STATE_TAG_LIST(COUNTER_ID) |