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

Unified Diff: src/extensions/statistics-extension.cc

Issue 10797008: Refine object stats for FixedArrays. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 8 years, 5 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 | « no previous file | src/heap.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/extensions/statistics-extension.cc
diff --git a/src/extensions/statistics-extension.cc b/src/extensions/statistics-extension.cc
index ec804bc93e05f3933d0e15fffc517917de9832cc..cb347374b80a663834ec373297d1d5cddec3bb70 100644
--- a/src/extensions/statistics-extension.cc
+++ b/src/extensions/statistics-extension.cc
@@ -1,4 +1,4 @@
-// Copyright 2010 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:
@@ -87,6 +87,16 @@ v8::Handle<v8::Value> StatisticsExtension::GetCounters(
CODE_KIND_LIST(ADD_COUNTER)
#undef ADD_COUNTER
+#define ADD_COUNTER(name) \
+ result->Set(v8::String::New("count_of_FIXED_ARRAY_" #name), \
+ v8::Number::New( \
+ *counters->count_of_FIXED_ARRAY_##name()->GetInternalPointer())); \
+ result->Set(v8::String::New("size_of_FIXED_ARRAY_" #name), \
+ v8::Number::New( \
+ *counters->size_of_FIXED_ARRAY_##name()->GetInternalPointer()));
+
+ FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(ADD_COUNTER)
+#undef ADD_COUNTER
return result;
}
« no previous file with comments | « no previous file | src/heap.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698