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 12 matching lines...) Expand all Loading... |
23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 23 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 24 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 25 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
27 | 27 |
28 #include "v8.h" | 28 #include "v8.h" |
29 | 29 |
30 #include "compiler.h" | 30 #include "compiler.h" |
31 | 31 |
32 #include "bootstrapper.h" | 32 #include "bootstrapper.h" |
| 33 #include "code-events.h" |
33 #include "codegen.h" | 34 #include "codegen.h" |
34 #include "compilation-cache.h" | 35 #include "compilation-cache.h" |
35 #include "debug.h" | 36 #include "debug.h" |
36 #include "full-codegen.h" | 37 #include "full-codegen.h" |
37 #include "gdb-jit.h" | |
38 #include "hydrogen.h" | 38 #include "hydrogen.h" |
39 #include "isolate-inl.h" | 39 #include "isolate-inl.h" |
40 #include "lithium.h" | 40 #include "lithium.h" |
41 #include "liveedit.h" | 41 #include "liveedit.h" |
42 #include "parser.h" | 42 #include "parser.h" |
43 #include "rewriter.h" | 43 #include "rewriter.h" |
44 #include "runtime-profiler.h" | 44 #include "runtime-profiler.h" |
45 #include "scanner-character-streams.h" | 45 #include "scanner-character-streams.h" |
46 #include "scopeinfo.h" | 46 #include "scopeinfo.h" |
47 #include "scopes.h" | 47 #include "scopes.h" |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 Compiler::SetFunctionInfo(result, lit, true, script); | 486 Compiler::SetFunctionInfo(result, lit, true, script); |
487 | 487 |
488 if (script->name()->IsString()) { | 488 if (script->name()->IsString()) { |
489 PROFILE(isolate, CodeCreateEvent( | 489 PROFILE(isolate, CodeCreateEvent( |
490 info->is_eval() | 490 info->is_eval() |
491 ? Logger::EVAL_TAG | 491 ? Logger::EVAL_TAG |
492 : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script), | 492 : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script), |
493 *info->code(), | 493 *info->code(), |
494 *result, | 494 *result, |
495 String::cast(script->name()))); | 495 String::cast(script->name()))); |
496 GDBJIT(AddCode(Handle<String>(String::cast(script->name())), | 496 JIT_CODE_EVENT(AddCode(Handle<String>(String::cast(script->name())), |
497 script, | 497 script, |
498 info->code(), | 498 info->code(), |
499 info)); | 499 info)); |
500 } else { | 500 } else { |
501 PROFILE(isolate, CodeCreateEvent( | 501 PROFILE(isolate, CodeCreateEvent( |
502 info->is_eval() | 502 info->is_eval() |
503 ? Logger::EVAL_TAG | 503 ? Logger::EVAL_TAG |
504 : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script), | 504 : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script), |
505 *info->code(), | 505 *info->code(), |
506 *result, | 506 *result, |
507 isolate->heap()->empty_string())); | 507 isolate->heap()->empty_string())); |
508 GDBJIT(AddCode(Handle<String>(), script, info->code(), info)); | 508 JIT_CODE_EVENT(AddCode(Handle<String>(), script, info->code(), info)); |
509 } | 509 } |
510 | 510 |
511 // Hint to the runtime system used when allocating space for initial | 511 // Hint to the runtime system used when allocating space for initial |
512 // property space by setting the expected number of properties for | 512 // property space by setting the expected number of properties for |
513 // the instances of the function. | 513 // the instances of the function. |
514 SetExpectedNofPropertiesFromEstimate(result, lit->expected_property_count()); | 514 SetExpectedNofPropertiesFromEstimate(result, lit->expected_property_count()); |
515 | 515 |
516 script->set_compilation_state( | 516 script->set_compilation_state( |
517 Smi::FromInt(Script::COMPILATION_STATE_COMPILED)); | 517 Smi::FromInt(Script::COMPILATION_STATE_COMPILED)); |
518 | 518 |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1020 line_num)); | 1020 line_num)); |
1021 } else { | 1021 } else { |
1022 PROFILE(info->isolate(), | 1022 PROFILE(info->isolate(), |
1023 CodeCreateEvent(Logger::ToNativeByScript(tag, *script), | 1023 CodeCreateEvent(Logger::ToNativeByScript(tag, *script), |
1024 *code, | 1024 *code, |
1025 *shared, | 1025 *shared, |
1026 shared->DebugName())); | 1026 shared->DebugName())); |
1027 } | 1027 } |
1028 } | 1028 } |
1029 | 1029 |
1030 GDBJIT(AddCode(Handle<String>(shared->DebugName()), | 1030 JIT_CODE_EVENT(AddCode(Handle<String>(shared->DebugName()), |
1031 Handle<Script>(info->script()), | 1031 Handle<Script>(info->script()), |
1032 Handle<Code>(info->code()), | 1032 Handle<Code>(info->code()), |
1033 info)); | 1033 info)); |
1034 } | 1034 } |
1035 | 1035 |
1036 } } // namespace v8::internal | 1036 } } // namespace v8::internal |
OLD | NEW |