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

Unified Diff: src/external-reference-table.h

Issue 2495213003: [serializer] print use count of external references. (Closed)
Patch Set: fix build Created 4 years, 1 month 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/api.cc ('k') | src/external-reference-table.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/external-reference-table.h
diff --git a/src/external-reference-table.h b/src/external-reference-table.h
index fb671a86307d285903cb21f728c5629e0db0f279..e1b97f957c32fca8bd567315523cbb2d2784af3b 100644
--- a/src/external-reference-table.h
+++ b/src/external-reference-table.h
@@ -23,18 +23,34 @@ class ExternalReferenceTable {
Address address(uint32_t i) { return refs_[i].address; }
const char* name(uint32_t i) { return refs_[i].name; }
+#ifdef DEBUG
+ void increment_count(uint32_t i) { refs_[i].count++; }
+ int count(uint32_t i) { return refs_[i].count; }
+ void ResetCount();
+ void PrintCount();
+#endif // DEBUG
+
+ static const char* ResolveSymbol(void* address);
+
static const int kDeoptTableSerializeEntryCount = 64;
private:
struct ExternalReferenceEntry {
Address address;
const char* name;
+#ifdef DEBUG
+ int count;
+#endif // DEBUG
};
explicit ExternalReferenceTable(Isolate* isolate);
void Add(Address address, const char* name) {
+#ifdef DEBUG
+ ExternalReferenceEntry entry = {address, name, 0};
+#else
ExternalReferenceEntry entry = {address, name};
+#endif // DEBUG
refs_.Add(entry);
}
« no previous file with comments | « src/api.cc ('k') | src/external-reference-table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698