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

Unified Diff: runtime/vm/class_table.h

Issue 1241863002: VM: Refactor allocation stats code and remove duplicate code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: make context allocation isolate-independent Created 5 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
Index: runtime/vm/class_table.h
diff --git a/runtime/vm/class_table.h b/runtime/vm/class_table.h
index 9a23630083d8b04565ade17175316fd9c1a1d914..44f408084184ac421454a98551e2dd85b760f592 100644
--- a/runtime/vm/class_table.h
+++ b/runtime/vm/class_table.h
@@ -195,14 +195,23 @@ class ClassTable {
void UpdatePromoted();
// Used by the generated code.
- uword PredefinedClassHeapStatsTableAddress() {
- return reinterpret_cast<uword>(predefined_class_heap_stats_table_);
- }
+ static intptr_t ClassOffsetFor(intptr_t cid);
- // Used by generated code.
- uword ClassStatsTableAddress() {
- return reinterpret_cast<uword>(&class_heap_stats_table_);
- }
+ // Used by the generated code.
+ ClassHeapStats** TableAddressFor(intptr_t cid);
+ static intptr_t TableOffsetFor(intptr_t cid);
+
+ // Used by the generated code.
+ ClassHeapStats** CountAddressFor(intptr_t cid,
+ bool is_new_space,
+ intptr_t* offset);
+
+ // Used by the generated code.
+ ClassHeapStats** StateAddressFor(intptr_t cid,
+ intptr_t* offset);
+
+ // Used by the generated code.
+ static intptr_t SizeOffsetFor(intptr_t cid, bool is_new_space);
ClassHeapStats* StatsWithUpdatedSize(intptr_t cid);

Powered by Google App Engine
This is Rietveld 408576698