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

Side by Side Diff: src/profiler/cpu-profiler.cc

Issue 1901353003: [profiler] Remove obsolete CompilationInfo argument. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@local_cleanup-compiler-simplify-27
Patch Set: Created 4 years, 8 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 | « src/profiler/cpu-profiler.h ('k') | src/snapshot/code-serializer.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/profiler/cpu-profiler.h" 5 #include "src/profiler/cpu-profiler.h"
6 6
7 #include "src/debug/debug.h" 7 #include "src/debug/debug.h"
8 #include "src/deoptimizer.h" 8 #include "src/deoptimizer.h"
9 #include "src/frames-inl.h" 9 #include "src/frames-inl.h"
10 #include "src/locked-queue-inl.h" 10 #include "src/locked-queue-inl.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 CodeEntry::kEmptyResourceName, CpuProfileNode::kNoLineNumberInfo, 235 CodeEntry::kEmptyResourceName, CpuProfileNode::kNoLineNumberInfo,
236 CpuProfileNode::kNoColumnNumberInfo, NULL, code->instruction_start()); 236 CpuProfileNode::kNoColumnNumberInfo, NULL, code->instruction_start());
237 RecordInliningInfo(rec->entry, code); 237 RecordInliningInfo(rec->entry, code);
238 rec->size = code->ExecutableSize(); 238 rec->size = code->ExecutableSize();
239 processor_->Enqueue(evt_rec); 239 processor_->Enqueue(evt_rec);
240 } 240 }
241 241
242 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, 242 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
243 AbstractCode* code, 243 AbstractCode* code,
244 SharedFunctionInfo* shared, 244 SharedFunctionInfo* shared,
245 CompilationInfo* info, Name* script_name) { 245 Name* script_name) {
246 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); 246 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION);
247 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; 247 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_;
248 rec->start = code->address(); 248 rec->start = code->address();
249 rec->entry = profiles_->NewCodeEntry( 249 rec->entry = profiles_->NewCodeEntry(
250 tag, profiles_->GetFunctionName(shared->DebugName()), 250 tag, profiles_->GetFunctionName(shared->DebugName()),
251 CodeEntry::kEmptyNamePrefix, 251 CodeEntry::kEmptyNamePrefix,
252 profiles_->GetName(InferScriptName(script_name, shared)), 252 profiles_->GetName(InferScriptName(script_name, shared)),
253 CpuProfileNode::kNoLineNumberInfo, CpuProfileNode::kNoColumnNumberInfo, 253 CpuProfileNode::kNoLineNumberInfo, CpuProfileNode::kNoColumnNumberInfo,
254 NULL, code->instruction_start()); 254 NULL, code->instruction_start());
255 RecordInliningInfo(rec->entry, code); 255 RecordInliningInfo(rec->entry, code);
256 if (info) {
Yang 2016/04/21 11:17:15 Does removing this break anything? If not, can we
257 rec->entry->set_inlined_function_infos(info->inlined_function_infos());
258 }
259 rec->entry->FillFunctionInfo(shared); 256 rec->entry->FillFunctionInfo(shared);
260 rec->size = code->ExecutableSize(); 257 rec->size = code->ExecutableSize();
261 processor_->Enqueue(evt_rec); 258 processor_->Enqueue(evt_rec);
262 } 259 }
263 260
264 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, 261 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
265 AbstractCode* abstract_code, 262 AbstractCode* abstract_code,
266 SharedFunctionInfo* shared, 263 SharedFunctionInfo* shared,
267 CompilationInfo* info, Name* script_name, 264 CompilationInfo* info, Name* script_name,
Yang 2016/04/21 11:17:15 What about the compilation info here?
268 int line, int column) { 265 int line, int column) {
269 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); 266 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION);
270 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; 267 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_;
271 rec->start = abstract_code->address(); 268 rec->start = abstract_code->address();
272 Script* script = Script::cast(shared->script()); 269 Script* script = Script::cast(shared->script());
273 JITLineInfoTable* line_table = NULL; 270 JITLineInfoTable* line_table = NULL;
274 if (script) { 271 if (script) {
275 if (abstract_code->IsCode()) { 272 if (abstract_code->IsCode()) {
276 Code* code = abstract_code->GetCode(); 273 Code* code = abstract_code->GetCode();
277 int start_position = shared->start_position(); 274 int start_position = shared->start_position();
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
592 Builtins::Name id = static_cast<Builtins::Name>(i); 589 Builtins::Name id = static_cast<Builtins::Name>(i);
593 rec->start = builtins->builtin(id)->address(); 590 rec->start = builtins->builtin(id)->address();
594 rec->builtin_id = id; 591 rec->builtin_id = id;
595 processor_->Enqueue(evt_rec); 592 processor_->Enqueue(evt_rec);
596 } 593 }
597 } 594 }
598 595
599 596
600 } // namespace internal 597 } // namespace internal
601 } // namespace v8 598 } // namespace v8
OLDNEW
« no previous file with comments | « src/profiler/cpu-profiler.h ('k') | src/snapshot/code-serializer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698