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

Unified Diff: vm/symbols.cc

Issue 10809095: Dump number of symbols in the isolate symbol table before shutting down an isolate under the --trac… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: 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
« vm/symbols.h ('K') | « vm/symbols.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vm/symbols.cc
===================================================================
--- vm/symbols.cc (revision 9873)
+++ vm/symbols.cc (working copy)
@@ -47,6 +47,17 @@
}
+intptr_t Symbols::UsedCount(Isolate* isolate) {
cshapiro 2012/07/25 02:57:20 Naming this method Size and renaming the variable
siva 2012/07/25 23:41:15 I called the method 'Size' as it is a count of ent
+ ASSERT(isolate != NULL);
+ Array& symbol_table = Array::Handle(isolate,
+ isolate->object_store()->symbol_table());
+ intptr_t table_size = symbol_table.Length() - 1;
+ Smi& used = Smi::Handle();
+ used ^= symbol_table.At(table_size);
+ return used.Value();
+}
+
+
void Symbols::Add(const Array& symbol_table, const String& str) {
// Should only be run by the vm isolate.
ASSERT(Isolate::Current() == Dart::vm_isolate());
« vm/symbols.h ('K') | « vm/symbols.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698