OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 9211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9222 | 9222 |
9223 void HTracer::TraceCompilation(FunctionLiteral* function) { | 9223 void HTracer::TraceCompilation(FunctionLiteral* function) { |
9224 Tag tag(this, "compilation"); | 9224 Tag tag(this, "compilation"); |
9225 Handle<String> name = function->debug_name(); | 9225 Handle<String> name = function->debug_name(); |
9226 PrintStringProperty("name", *name->ToCString()); | 9226 PrintStringProperty("name", *name->ToCString()); |
9227 PrintStringProperty("method", *name->ToCString()); | 9227 PrintStringProperty("method", *name->ToCString()); |
9228 PrintLongProperty("date", static_cast<int64_t>(OS::TimeCurrentMillis())); | 9228 PrintLongProperty("date", static_cast<int64_t>(OS::TimeCurrentMillis())); |
9229 } | 9229 } |
9230 | 9230 |
9231 | 9231 |
9232 void HTracer::TraceLithium(const char* name, LChunkBase* chunk) { | 9232 void HTracer::TraceLithium(const char* name, LChunk* chunk) { |
9233 Trace(name, chunk->graph(), chunk); | 9233 Trace(name, chunk->graph(), chunk); |
9234 } | 9234 } |
9235 | 9235 |
9236 | 9236 |
9237 void HTracer::TraceHydrogen(const char* name, HGraph* graph) { | 9237 void HTracer::TraceHydrogen(const char* name, HGraph* graph) { |
9238 Trace(name, graph, NULL); | 9238 Trace(name, graph, NULL); |
9239 } | 9239 } |
9240 | 9240 |
9241 | 9241 |
9242 void HTracer::Trace(const char* name, HGraph* graph, LChunkBase* chunk) { | 9242 void HTracer::Trace(const char* name, HGraph* graph, LChunk* chunk) { |
9243 Tag tag(this, "cfg"); | 9243 Tag tag(this, "cfg"); |
9244 PrintStringProperty("name", name); | 9244 PrintStringProperty("name", name); |
9245 const ZoneList<HBasicBlock*>* blocks = graph->blocks(); | 9245 const ZoneList<HBasicBlock*>* blocks = graph->blocks(); |
9246 for (int i = 0; i < blocks->length(); i++) { | 9246 for (int i = 0; i < blocks->length(); i++) { |
9247 HBasicBlock* current = blocks->at(i); | 9247 HBasicBlock* current = blocks->at(i); |
9248 Tag block_tag(this, "block"); | 9248 Tag block_tag(this, "block"); |
9249 PrintBlockProperty("name", current->block_id()); | 9249 PrintBlockProperty("name", current->block_id()); |
9250 PrintIntProperty("from_bci", -1); | 9250 PrintIntProperty("from_bci", -1); |
9251 PrintIntProperty("to_bci", -1); | 9251 PrintIntProperty("to_bci", -1); |
9252 | 9252 |
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9494 } | 9494 } |
9495 } | 9495 } |
9496 | 9496 |
9497 | 9497 |
9498 const char* const HPhase::kFullCodeGen = "Full code generator"; | 9498 const char* const HPhase::kFullCodeGen = "Full code generator"; |
9499 const char* const HPhase::kTotal = "Total"; | 9499 const char* const HPhase::kTotal = "Total"; |
9500 | 9500 |
9501 | 9501 |
9502 void HPhase::Begin(const char* name, | 9502 void HPhase::Begin(const char* name, |
9503 HGraph* graph, | 9503 HGraph* graph, |
9504 LChunkBase* chunk, | 9504 LChunk* chunk, |
9505 LAllocator* allocator) { | 9505 LAllocator* allocator) { |
9506 name_ = name; | 9506 name_ = name; |
9507 graph_ = graph; | 9507 graph_ = graph; |
9508 chunk_ = chunk; | 9508 chunk_ = chunk; |
9509 allocator_ = allocator; | 9509 allocator_ = allocator; |
9510 if (allocator != NULL && chunk_ == NULL) { | 9510 if (allocator != NULL && chunk_ == NULL) { |
9511 chunk_ = allocator->chunk(); | 9511 chunk_ = allocator->chunk(); |
9512 } | 9512 } |
9513 if (FLAG_hydrogen_stats) start_ = OS::Ticks(); | 9513 if (FLAG_hydrogen_stats) start_ = OS::Ticks(); |
9514 start_allocation_size_ = Zone::allocation_size_; | 9514 start_allocation_size_ = Zone::allocation_size_; |
(...skipping 18 matching lines...) Expand all Loading... |
9533 } | 9533 } |
9534 } | 9534 } |
9535 | 9535 |
9536 #ifdef DEBUG | 9536 #ifdef DEBUG |
9537 if (graph_ != NULL) graph_->Verify(false); // No full verify. | 9537 if (graph_ != NULL) graph_->Verify(false); // No full verify. |
9538 if (allocator_ != NULL) allocator_->Verify(); | 9538 if (allocator_ != NULL) allocator_->Verify(); |
9539 #endif | 9539 #endif |
9540 } | 9540 } |
9541 | 9541 |
9542 } } // namespace v8::internal | 9542 } } // namespace v8::internal |
OLD | NEW |