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

Unified Diff: src/hydrogen.h

Issue 12481015: Track Hydrogen statistics on a per-Isolate basis (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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 | « src/compiler.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.h
diff --git a/src/hydrogen.h b/src/hydrogen.h
index 6be75816826a9184bd772737af466afd16c9181b..b3a056fa1b35d2f2c04b98d8a3e1f84f31080b05 100644
--- a/src/hydrogen.h
+++ b/src/hydrogen.h
@@ -61,6 +61,7 @@ class HBasicBlock: public ZoneObject {
int block_id() const { return block_id_; }
void set_block_id(int id) { block_id_ = id; }
HGraph* graph() const { return graph_; }
+ Isolate* isolate() const;
const ZoneList<HPhi*>* phis() const { return &phis_; }
HInstruction* first() const { return first_; }
HInstruction* last() const { return last_; }
@@ -870,7 +871,8 @@ class HGraphBuilder {
return current_block()->last_environment();
}
Zone* zone() const { return info_->zone(); }
- HGraph* graph() { return graph_; }
+ HGraph* graph() const { return graph_; }
+ Isolate* isolate() const { return graph_->isolate(); }
HGraph* CreateGraph();
@@ -1534,16 +1536,20 @@ class HSideEffectMap BASE_EMBEDDED {
class HStatistics: public Malloced {
public:
+ HStatistics()
+ : timing_(5),
+ names_(5),
+ sizes_(5),
+ create_graph_(0),
+ optimize_graph_(0),
+ generate_code_(0),
+ total_size_(0),
+ full_code_gen_(0),
+ source_size_(0) { }
+
void Initialize(CompilationInfo* info);
void Print();
void SaveTiming(const char* name, int64_t ticks, unsigned size);
- static HStatistics* Instance() {
- static SetOncePointer<HStatistics> instance;
- if (!instance.is_set()) {
- instance.set(new HStatistics());
- }
- return instance.get();
- }
void IncrementSubtotals(int64_t create_graph,
int64_t optimize_graph,
@@ -1554,17 +1560,6 @@ class HStatistics: public Malloced {
}
private:
- HStatistics()
- : timing_(5),
- names_(5),
- sizes_(5),
- create_graph_(0),
- optimize_graph_(0),
- generate_code_(0),
- total_size_(0),
- full_code_gen_(0),
- source_size_(0) { }
-
List<int64_t> timing_;
List<const char*> names_;
List<unsigned> sizes_;
@@ -1589,10 +1584,10 @@ class HPhase BASE_EMBEDDED {
private:
void Init(Isolate* isolate,
- const char* name,
- HGraph* graph,
- LChunk* chunk,
- LAllocator* allocator);
+ const char* name,
+ HGraph* graph,
+ LChunk* chunk,
+ LAllocator* allocator);
Isolate* isolate_;
const char* name_;
« no previous file with comments | « src/compiler.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698