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

Side by Side Diff: src/compiler.cc

Issue 14253015: Skip samples where top function's stack frame is not setup properly (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Reverted build/common.gypi Created 7 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 | Annotate | Revision Log
OLDNEW
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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 isolate_ = isolate; 95 isolate_ = isolate;
96 function_ = NULL; 96 function_ = NULL;
97 scope_ = NULL; 97 scope_ = NULL;
98 global_scope_ = NULL; 98 global_scope_ = NULL;
99 extension_ = NULL; 99 extension_ = NULL;
100 pre_parse_data_ = NULL; 100 pre_parse_data_ = NULL;
101 zone_ = zone; 101 zone_ = zone;
102 deferred_handles_ = NULL; 102 deferred_handles_ = NULL;
103 code_stub_ = NULL; 103 code_stub_ = NULL;
104 prologue_offset_ = kPrologueOffsetNotSet; 104 prologue_offset_ = kPrologueOffsetNotSet;
105 frame_destroy_offset_ = kPrologueOffsetNotSet;
105 opt_count_ = shared_info().is_null() ? 0 : shared_info()->opt_count(); 106 opt_count_ = shared_info().is_null() ? 0 : shared_info()->opt_count();
106 if (mode == STUB) { 107 if (mode == STUB) {
107 mode_ = STUB; 108 mode_ = STUB;
108 return; 109 return;
109 } 110 }
110 mode_ = V8::UseCrankshaft() ? mode : NONOPT; 111 mode_ = V8::UseCrankshaft() ? mode : NONOPT;
111 if (script_->type()->value() == Script::TYPE_NATIVE) { 112 if (script_->type()->value() == Script::TYPE_NATIVE) {
112 MarkAsNative(); 113 MarkAsNative();
113 } 114 }
114 if (!shared_info_.is_null()) { 115 if (!shared_info_.is_null()) {
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 ASSERT_EQ(RelocInfo::kNoPosition, lit->function_token_position()); 567 ASSERT_EQ(RelocInfo::kNoPosition, lit->function_token_position());
567 Compiler::SetFunctionInfo(result, lit, true, script); 568 Compiler::SetFunctionInfo(result, lit, true, script);
568 569
569 if (script->name()->IsString()) { 570 if (script->name()->IsString()) {
570 PROFILE(isolate, CodeCreateEvent( 571 PROFILE(isolate, CodeCreateEvent(
571 info->is_eval() 572 info->is_eval()
572 ? Logger::EVAL_TAG 573 ? Logger::EVAL_TAG
573 : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script), 574 : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script),
574 *info->code(), 575 *info->code(),
575 *result, 576 *result,
577 info,
576 String::cast(script->name()))); 578 String::cast(script->name())));
577 GDBJIT(AddCode(Handle<String>(String::cast(script->name())), 579 GDBJIT(AddCode(Handle<String>(String::cast(script->name())),
578 script, 580 script,
579 info->code(), 581 info->code(),
580 info)); 582 info));
581 } else { 583 } else {
582 PROFILE(isolate, CodeCreateEvent( 584 PROFILE(isolate, CodeCreateEvent(
583 info->is_eval() 585 info->is_eval()
584 ? Logger::EVAL_TAG 586 ? Logger::EVAL_TAG
585 : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script), 587 : Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script),
586 *info->code(), 588 *info->code(),
587 *result, 589 *result,
590 info,
588 isolate->heap()->empty_string())); 591 isolate->heap()->empty_string()));
589 GDBJIT(AddCode(Handle<String>(), script, info->code(), info)); 592 GDBJIT(AddCode(Handle<String>(), script, info->code(), info));
590 } 593 }
591 594
592 // Hint to the runtime system used when allocating space for initial 595 // Hint to the runtime system used when allocating space for initial
593 // property space by setting the expected number of properties for 596 // property space by setting the expected number of properties for
594 // the instances of the function. 597 // the instances of the function.
595 SetExpectedNofPropertiesFromEstimate(result, lit->expected_property_count()); 598 SetExpectedNofPropertiesFromEstimate(result, lit->expected_property_count());
596 599
597 script->set_compilation_state( 600 script->set_compilation_state(
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
1149 Handle<Code> code = info->code(); 1152 Handle<Code> code = info->code();
1150 if (*code == info->isolate()->builtins()->builtin(Builtins::kLazyCompile)) 1153 if (*code == info->isolate()->builtins()->builtin(Builtins::kLazyCompile))
1151 return; 1154 return;
1152 if (script->name()->IsString()) { 1155 if (script->name()->IsString()) {
1153 int line_num = GetScriptLineNumber(script, shared->start_position()) + 1; 1156 int line_num = GetScriptLineNumber(script, shared->start_position()) + 1;
1154 USE(line_num); 1157 USE(line_num);
1155 PROFILE(info->isolate(), 1158 PROFILE(info->isolate(),
1156 CodeCreateEvent(Logger::ToNativeByScript(tag, *script), 1159 CodeCreateEvent(Logger::ToNativeByScript(tag, *script),
1157 *code, 1160 *code,
1158 *shared, 1161 *shared,
1162 info,
1159 String::cast(script->name()), 1163 String::cast(script->name()),
1160 line_num)); 1164 line_num));
1161 } else { 1165 } else {
1162 PROFILE(info->isolate(), 1166 PROFILE(info->isolate(),
1163 CodeCreateEvent(Logger::ToNativeByScript(tag, *script), 1167 CodeCreateEvent(Logger::ToNativeByScript(tag, *script),
1164 *code, 1168 *code,
1165 *shared, 1169 *shared,
1170 info,
1166 shared->DebugName())); 1171 shared->DebugName()));
1167 } 1172 }
1168 } 1173 }
1169 1174
1170 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 1175 GDBJIT(AddCode(Handle<String>(shared->DebugName()),
1171 Handle<Script>(info->script()), 1176 Handle<Script>(info->script()),
1172 Handle<Code>(info->code()), 1177 Handle<Code>(info->code()),
1173 info)); 1178 info));
1174 } 1179 }
1175 1180
1176 } } // namespace v8::internal 1181 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/compiler.h ('k') | src/cpu-profiler.h » ('j') | src/cpu-profiler.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698