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

Side by Side Diff: src/compiler.cc

Issue 112036: Introduce Logger::LogCompiledFunctions that logs current map of compiled code. (Closed)
Patch Set: struct -> class Created 11 years, 7 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
« no previous file with comments | « no previous file | src/log.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 if (code.is_null()) { 350 if (code.is_null()) {
351 Top::StackOverflow(); 351 Top::StackOverflow();
352 return false; 352 return false;
353 } 353 }
354 354
355 #if defined ENABLE_LOGGING_AND_PROFILING || defined ENABLE_OPROFILE_AGENT 355 #if defined ENABLE_LOGGING_AND_PROFILING || defined ENABLE_OPROFILE_AGENT
356 // Log the code generation. If source information is available include script 356 // Log the code generation. If source information is available include script
357 // name and line number. Check explicit whether logging is enabled as finding 357 // name and line number. Check explicit whether logging is enabled as finding
358 // the line number is not for free. 358 // the line number is not for free.
359 if (Logger::is_enabled() || OProfileAgent::is_enabled()) { 359 if (Logger::is_enabled() || OProfileAgent::is_enabled()) {
360 Handle<String> func_name(lit->name()->length() > 0 ? 360 Handle<String> func_name(name->length() > 0 ?
361 *lit->name() : shared->inferred_name()); 361 *name : shared->inferred_name());
362 if (script->name()->IsString()) { 362 if (script->name()->IsString()) {
363 int line_num = GetScriptLineNumber(script, start_position); 363 int line_num = GetScriptLineNumber(script, start_position);
364 if (line_num > 0) { 364 if (line_num > 0) {
365 line_num += script->line_offset()->value() + 1; 365 line_num += script->line_offset()->value() + 1;
366 } 366 }
367 LOG(CodeCreateEvent("LazyCompile", *code, *func_name, 367 LOG(CodeCreateEvent("LazyCompile", *code, *func_name,
368 String::cast(script->name()), line_num)); 368 String::cast(script->name()), line_num));
369 OProfileAgent::CreateNativeCodeRegion(*func_name, 369 OProfileAgent::CreateNativeCodeRegion(*func_name,
370 String::cast(script->name()), 370 String::cast(script->name()),
371 line_num, code->address(), 371 line_num, code->address(),
(...skipping 12 matching lines...) Expand all
384 // Set the expected number of properties for instances. 384 // Set the expected number of properties for instances.
385 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count()); 385 SetExpectedNofPropertiesFromEstimate(shared, lit->expected_property_count());
386 386
387 // Check the function has compiled code. 387 // Check the function has compiled code.
388 ASSERT(shared->is_compiled()); 388 ASSERT(shared->is_compiled());
389 return true; 389 return true;
390 } 390 }
391 391
392 392
393 } } // namespace v8::internal 393 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/log.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698