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

Side by Side Diff: src/hydrogen.cc

Issue 7273033: --trace_hydrogen cleanup (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Also remove vestigial <|@ tail Created 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 6284 matching lines...) Expand 10 before | Expand all | Expand 10 after
6295 6295
6296 6296
6297 void HTracer::Trace(const char* name, HGraph* graph, LChunk* chunk) { 6297 void HTracer::Trace(const char* name, HGraph* graph, LChunk* chunk) {
6298 Tag tag(this, "cfg"); 6298 Tag tag(this, "cfg");
6299 PrintStringProperty("name", name); 6299 PrintStringProperty("name", name);
6300 const ZoneList<HBasicBlock*>* blocks = graph->blocks(); 6300 const ZoneList<HBasicBlock*>* blocks = graph->blocks();
6301 for (int i = 0; i < blocks->length(); i++) { 6301 for (int i = 0; i < blocks->length(); i++) {
6302 HBasicBlock* current = blocks->at(i); 6302 HBasicBlock* current = blocks->at(i);
6303 Tag block_tag(this, "block"); 6303 Tag block_tag(this, "block");
6304 PrintBlockProperty("name", current->block_id()); 6304 PrintBlockProperty("name", current->block_id());
6305 PrintIntProperty("from_bci", -1);
6306 PrintIntProperty("to_bci", -1);
6307 6305
6308 if (!current->predecessors()->is_empty()) { 6306 if (!current->predecessors()->is_empty()) {
6309 PrintIndent(); 6307 PrintIndent();
6310 trace_.Add("predecessors"); 6308 trace_.Add("predecessors");
6311 for (int j = 0; j < current->predecessors()->length(); ++j) { 6309 for (int j = 0; j < current->predecessors()->length(); ++j) {
6312 trace_.Add(" \"B%d\"", current->predecessors()->at(j)->block_id()); 6310 trace_.Add(" \"B%d\"", current->predecessors()->at(j)->block_id());
6313 } 6311 }
6314 trace_.Add("\n"); 6312 trace_.Add("\n");
6315 } else { 6313 } else {
6316 PrintEmptyProperty("predecessors"); 6314 PrintEmptyProperty("predecessors");
6317 } 6315 }
6318 6316
6319 if (current->end()->SuccessorCount() == 0) { 6317 if (current->end()->SuccessorCount() == 0) {
6320 PrintEmptyProperty("successors"); 6318 PrintEmptyProperty("successors");
6321 } else { 6319 } else {
6322 PrintIndent(); 6320 PrintIndent();
6323 trace_.Add("successors"); 6321 trace_.Add("successors");
6324 for (HSuccessorIterator it(current->end()); !it.Done(); it.Advance()) { 6322 for (HSuccessorIterator it(current->end()); !it.Done(); it.Advance()) {
6325 trace_.Add(" \"B%d\"", it.Current()->block_id()); 6323 trace_.Add(" \"B%d\"", it.Current()->block_id());
6326 } 6324 }
6327 trace_.Add("\n"); 6325 trace_.Add("\n");
6328 } 6326 }
6329 6327
6330 PrintEmptyProperty("xhandlers");
6331 PrintEmptyProperty("flags");
6332
6333 if (current->dominator() != NULL) { 6328 if (current->dominator() != NULL) {
6334 PrintBlockProperty("dominator", current->dominator()->block_id()); 6329 PrintBlockProperty("dominator", current->dominator()->block_id());
6335 } 6330 }
6336 6331
6337 if (chunk != NULL) { 6332 if (chunk != NULL) {
6338 int first_index = current->first_instruction_index(); 6333 int first_index = current->first_instruction_index();
6339 int last_index = current->last_instruction_index(); 6334 int last_index = current->last_instruction_index();
6340 PrintIntProperty( 6335 PrintIntProperty(
6341 "first_lir_id", 6336 "first_lir_id",
6342 LifetimePosition::FromInstructionIndex(first_index).Value()); 6337 LifetimePosition::FromInstructionIndex(first_index).Value());
(...skipping 16 matching lines...) Expand all
6359 trace_.Add(" "); 6354 trace_.Add(" ");
6360 phi->PrintTo(&trace_); 6355 phi->PrintTo(&trace_);
6361 trace_.Add("\n"); 6356 trace_.Add("\n");
6362 } 6357 }
6363 } 6358 }
6364 6359
6365 { 6360 {
6366 Tag HIR_tag(this, "HIR"); 6361 Tag HIR_tag(this, "HIR");
6367 HInstruction* instruction = current->first(); 6362 HInstruction* instruction = current->first();
6368 while (instruction != NULL) { 6363 while (instruction != NULL) {
6369 int bci = 0;
6370 int uses = instruction->UseCount(); 6364 int uses = instruction->UseCount();
6371 PrintIndent(); 6365 PrintIndent();
6372 trace_.Add("%d %d ", bci, uses); 6366 trace_.Add("%d ", uses);
6373 instruction->PrintNameTo(&trace_); 6367 instruction->PrintNameTo(&trace_);
6374 trace_.Add(" "); 6368 trace_.Add(" ");
6375 instruction->PrintTo(&trace_); 6369 instruction->PrintTo(&trace_);
6376 trace_.Add(" <|@\n"); 6370 trace_.Add("\n");
6377 instruction = instruction->next(); 6371 instruction = instruction->next();
6378 } 6372 }
6379 } 6373 }
6380 6374
6381 6375
6382 if (chunk != NULL) { 6376 if (chunk != NULL) {
6383 Tag LIR_tag(this, "LIR"); 6377 Tag LIR_tag(this, "LIR");
6384 int first_index = current->first_instruction_index(); 6378 int first_index = current->first_instruction_index();
6385 int last_index = current->last_instruction_index(); 6379 int last_index = current->last_instruction_index();
6386 if (first_index != -1 && last_index != -1) { 6380 if (first_index != -1 && last_index != -1) {
6387 const ZoneList<LInstruction*>* instructions = chunk->instructions(); 6381 const ZoneList<LInstruction*>* instructions = chunk->instructions();
6388 for (int i = first_index; i <= last_index; ++i) { 6382 for (int i = first_index; i <= last_index; ++i) {
6389 LInstruction* linstr = instructions->at(i); 6383 LInstruction* linstr = instructions->at(i);
6390 if (linstr != NULL) { 6384 if (linstr != NULL) {
6391 PrintIndent(); 6385 PrintIndent();
6392 trace_.Add("%d ", 6386 trace_.Add("%d ",
6393 LifetimePosition::FromInstructionIndex(i).Value()); 6387 LifetimePosition::FromInstructionIndex(i).Value());
6394 linstr->PrintTo(&trace_); 6388 linstr->PrintTo(&trace_);
6395 trace_.Add(" <|@\n"); 6389 trace_.Add("\n");
6396 } 6390 }
6397 } 6391 }
6398 } 6392 }
6399 } 6393 }
6400 } 6394 }
6401 } 6395 }
6402 6396
6403 6397
6404 void HTracer::TraceLiveRanges(const char* name, LAllocator* allocator) { 6398 void HTracer::TraceLiveRanges(const char* name, LAllocator* allocator) {
6405 Tag tag(this, "intervals"); 6399 Tag tag(this, "intervals");
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
6577 } 6571 }
6578 } 6572 }
6579 6573
6580 #ifdef DEBUG 6574 #ifdef DEBUG
6581 if (graph_ != NULL) graph_->Verify(); 6575 if (graph_ != NULL) graph_->Verify();
6582 if (allocator_ != NULL) allocator_->Verify(); 6576 if (allocator_ != NULL) allocator_->Verify();
6583 #endif 6577 #endif
6584 } 6578 }
6585 6579
6586 } } // namespace v8::internal 6580 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698