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

Side by Side Diff: src/log.cc

Issue 1523015: C++ profiles processor: align browser mode with the old implementation, sample VM state. (Closed)
Patch Set: Using Script::type to filter out native scripts. Created 10 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/log.h ('k') | src/log-inl.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 2009 the V8 project authors. All rights reserved. 1 // Copyright 2009 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 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1330 Handle<SharedFunctionInfo> shared = sfis[i]; 1330 Handle<SharedFunctionInfo> shared = sfis[i];
1331 Handle<String> name(String::cast(shared->name())); 1331 Handle<String> name(String::cast(shared->name()));
1332 Handle<String> func_name(name->length() > 0 ? 1332 Handle<String> func_name(name->length() > 0 ?
1333 *name : shared->inferred_name()); 1333 *name : shared->inferred_name());
1334 if (shared->script()->IsScript()) { 1334 if (shared->script()->IsScript()) {
1335 Handle<Script> script(Script::cast(shared->script())); 1335 Handle<Script> script(Script::cast(shared->script()));
1336 if (script->name()->IsString()) { 1336 if (script->name()->IsString()) {
1337 Handle<String> script_name(String::cast(script->name())); 1337 Handle<String> script_name(String::cast(script->name()));
1338 int line_num = GetScriptLineNumber(script, shared->start_position()); 1338 int line_num = GetScriptLineNumber(script, shared->start_position());
1339 if (line_num > 0) { 1339 if (line_num > 0) {
1340 PROFILE(CodeCreateEvent(Logger::LAZY_COMPILE_TAG, 1340 PROFILE(CodeCreateEvent(
1341 shared->code(), *func_name, 1341 Logger::ToNativeByScript(Logger::LAZY_COMPILE_TAG, *script),
1342 *script_name, line_num + 1)); 1342 shared->code(), *func_name,
1343 *script_name, line_num + 1));
1343 } else { 1344 } else {
1344 // Can't distinguish enum and script here, so always use Script. 1345 // Can't distinguish eval and script here, so always use Script.
1345 PROFILE(CodeCreateEvent(Logger::SCRIPT_TAG, 1346 PROFILE(CodeCreateEvent(
1346 shared->code(), *script_name)); 1347 Logger::ToNativeByScript(Logger::SCRIPT_TAG, *script),
1348 shared->code(), *script_name));
1347 } 1349 }
1348 } else { 1350 } else {
1349 PROFILE(CodeCreateEvent( 1351 PROFILE(CodeCreateEvent(
1350 Logger::LAZY_COMPILE_TAG, shared->code(), *func_name)); 1352 Logger::ToNativeByScript(Logger::LAZY_COMPILE_TAG, *script),
1353 shared->code(), *func_name));
1351 } 1354 }
1352 } else if (shared->IsApiFunction()) { 1355 } else if (shared->IsApiFunction()) {
1353 // API function. 1356 // API function.
1354 FunctionTemplateInfo* fun_data = shared->get_api_func_data(); 1357 FunctionTemplateInfo* fun_data = shared->get_api_func_data();
1355 Object* raw_call_data = fun_data->call_code(); 1358 Object* raw_call_data = fun_data->call_code();
1356 if (!raw_call_data->IsUndefined()) { 1359 if (!raw_call_data->IsUndefined()) {
1357 CallHandlerInfo* call_data = CallHandlerInfo::cast(raw_call_data); 1360 CallHandlerInfo* call_data = CallHandlerInfo::cast(raw_call_data);
1358 Object* callback_obj = call_data->callback(); 1361 Object* callback_obj = call_data->callback();
1359 Address entry_point = v8::ToCData<Address>(callback_obj); 1362 Address entry_point = v8::ToCData<Address>(callback_obj);
1360 PROFILE(CallbackEvent(*func_name, entry_point)); 1363 PROFILE(CallbackEvent(*func_name, entry_point));
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1560 } 1563 }
1561 // Otherwise, if the sliding state window computation has not been 1564 // Otherwise, if the sliding state window computation has not been
1562 // started we do it now. 1565 // started we do it now.
1563 if (sliding_state_window_ == NULL) { 1566 if (sliding_state_window_ == NULL) {
1564 sliding_state_window_ = new SlidingStateWindow(); 1567 sliding_state_window_ = new SlidingStateWindow();
1565 } 1568 }
1566 #endif 1569 #endif
1567 } 1570 }
1568 1571
1569 } } // namespace v8::internal 1572 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/log.h ('k') | src/log-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698