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

Side by Side Diff: src/compiler.cc

Issue 10870108: Revert "Add a new API V8::SetJitCodeEventHandler to push code name and location to users such as pr… (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 3 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/cpu-profiler.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 985 matching lines...) Expand 10 before | Expand all | Expand 10 after
996 996
997 void Compiler::RecordFunctionCompilation(Logger::LogEventsAndTags tag, 997 void Compiler::RecordFunctionCompilation(Logger::LogEventsAndTags tag,
998 CompilationInfo* info, 998 CompilationInfo* info,
999 Handle<SharedFunctionInfo> shared) { 999 Handle<SharedFunctionInfo> shared) {
1000 // SharedFunctionInfo is passed separately, because if CompilationInfo 1000 // SharedFunctionInfo is passed separately, because if CompilationInfo
1001 // was created using Script object, it will not have it. 1001 // was created using Script object, it will not have it.
1002 1002
1003 // Log the code generation. If source information is available include 1003 // Log the code generation. If source information is available include
1004 // script name and line number. Check explicitly whether logging is 1004 // script name and line number. Check explicitly whether logging is
1005 // enabled as finding the line number is not free. 1005 // enabled as finding the line number is not free.
1006 if (info->isolate()->logger()->is_logging_code_events() || 1006 if (info->isolate()->logger()->is_logging() ||
1007 CpuProfiler::is_profiling(info->isolate())) { 1007 CpuProfiler::is_profiling(info->isolate())) {
1008 Handle<Script> script = info->script(); 1008 Handle<Script> script = info->script();
1009 Handle<Code> code = info->code(); 1009 Handle<Code> code = info->code();
1010 if (*code == info->isolate()->builtins()->builtin(Builtins::kLazyCompile)) 1010 if (*code == info->isolate()->builtins()->builtin(Builtins::kLazyCompile))
1011 return; 1011 return;
1012 if (script->name()->IsString()) { 1012 if (script->name()->IsString()) {
1013 int line_num = GetScriptLineNumber(script, shared->start_position()) + 1; 1013 int line_num = GetScriptLineNumber(script, shared->start_position()) + 1;
1014 USE(line_num); 1014 USE(line_num);
1015 PROFILE(info->isolate(), 1015 PROFILE(info->isolate(),
1016 CodeCreateEvent(Logger::ToNativeByScript(tag, *script), 1016 CodeCreateEvent(Logger::ToNativeByScript(tag, *script),
(...skipping 10 matching lines...) Expand all
1027 } 1027 }
1028 } 1028 }
1029 1029
1030 GDBJIT(AddCode(Handle<String>(shared->DebugName()), 1030 GDBJIT(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
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/cpu-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698