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

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

Issue 18332010: Revert "CPUProfiler: propagate scriptId to the front-end" (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 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 | « src/api.cc ('k') | src/profile-generator.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 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 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, 248 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
249 Code* code, 249 Code* code,
250 SharedFunctionInfo* shared, 250 SharedFunctionInfo* shared,
251 CompilationInfo* info, 251 CompilationInfo* info,
252 Name* name) { 252 Name* name) {
253 if (FilterOutCodeCreateEvent(tag)) return; 253 if (FilterOutCodeCreateEvent(tag)) return;
254 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); 254 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION);
255 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; 255 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_;
256 rec->start = code->address(); 256 rec->start = code->address();
257 rec->entry = profiles_->NewCodeEntry(tag, profiles_->GetFunctionName(name)); 257 rec->entry = profiles_->NewCodeEntry(tag, profiles_->GetFunctionName(name));
258 if (info) { 258 rec->entry->set_no_frame_ranges(info ?
259 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); 259 info->ReleaseNoFrameRanges() :
260 } 260 NULL);
261 ASSERT(Script::cast(shared->script()));
262 Script* script = Script::cast(shared->script());
263 rec->entry->set_script_id(script->id()->value());
264 rec->size = code->ExecutableSize(); 261 rec->size = code->ExecutableSize();
265 rec->shared = shared->address(); 262 rec->shared = shared->address();
266 processor_->Enqueue(evt_rec); 263 processor_->Enqueue(evt_rec);
267 } 264 }
268 265
269 266
270 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, 267 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
271 Code* code, 268 Code* code,
272 SharedFunctionInfo* shared, 269 SharedFunctionInfo* shared,
273 CompilationInfo* info, 270 CompilationInfo* info,
274 String* source, int line) { 271 String* source, int line) {
275 if (FilterOutCodeCreateEvent(tag)) return; 272 if (FilterOutCodeCreateEvent(tag)) return;
276 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION); 273 CodeEventsContainer evt_rec(CodeEventRecord::CODE_CREATION);
277 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_; 274 CodeCreateEventRecord* rec = &evt_rec.CodeCreateEventRecord_;
278 rec->start = code->address(); 275 rec->start = code->address();
279 rec->entry = profiles_->NewCodeEntry( 276 rec->entry = profiles_->NewCodeEntry(
280 tag, 277 tag,
281 profiles_->GetFunctionName(shared->DebugName()), 278 profiles_->GetFunctionName(shared->DebugName()),
282 TokenEnumerator::kNoSecurityToken, 279 TokenEnumerator::kNoSecurityToken,
283 CodeEntry::kEmptyNamePrefix, 280 CodeEntry::kEmptyNamePrefix,
284 profiles_->GetName(source), 281 profiles_->GetName(source),
285 line); 282 line);
286 if (info) { 283 rec->entry->set_no_frame_ranges(info ?
287 rec->entry->set_no_frame_ranges(info->ReleaseNoFrameRanges()); 284 info->ReleaseNoFrameRanges() :
288 } 285 NULL);
289 ASSERT(Script::cast(shared->script()));
290 Script* script = Script::cast(shared->script());
291 rec->entry->set_script_id(script->id()->value());
292 rec->size = code->ExecutableSize(); 286 rec->size = code->ExecutableSize();
293 rec->shared = shared->address(); 287 rec->shared = shared->address();
294 processor_->Enqueue(evt_rec); 288 processor_->Enqueue(evt_rec);
295 } 289 }
296 290
297 291
298 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag, 292 void CpuProfiler::CodeCreateEvent(Logger::LogEventsAndTags tag,
299 Code* code, 293 Code* code,
300 int args_count) { 294 int args_count) {
301 if (FilterOutCodeCreateEvent(tag)) return; 295 if (FilterOutCodeCreateEvent(tag)) return;
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
521 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; 515 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_;
522 Builtins::Name id = static_cast<Builtins::Name>(i); 516 Builtins::Name id = static_cast<Builtins::Name>(i);
523 rec->start = builtins->builtin(id)->address(); 517 rec->start = builtins->builtin(id)->address();
524 rec->builtin_id = id; 518 rec->builtin_id = id;
525 processor_->Enqueue(evt_rec); 519 processor_->Enqueue(evt_rec);
526 } 520 }
527 } 521 }
528 522
529 523
530 } } // namespace v8::internal 524 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/profile-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698