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

Side by Side Diff: src/log.cc

Issue 6717018: Introduce accessors on builtins instance (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix tests and lint. Created 9 years, 9 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/liveedit.cc ('k') | src/mark-compact.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 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 771 matching lines...) Expand 10 before | Expand all | Expand 10 after
782 #endif 782 #endif
783 783
784 784
785 void Logger::CodeCreateEvent(LogEventsAndTags tag, 785 void Logger::CodeCreateEvent(LogEventsAndTags tag,
786 Code* code, 786 Code* code,
787 SharedFunctionInfo* shared, 787 SharedFunctionInfo* shared,
788 String* name) { 788 String* name) {
789 #ifdef ENABLE_LOGGING_AND_PROFILING 789 #ifdef ENABLE_LOGGING_AND_PROFILING
790 if (!log_->IsEnabled() || !FLAG_log_code) return; 790 if (!log_->IsEnabled() || !FLAG_log_code) return;
791 if (code == Isolate::Current()->builtins()->builtin( 791 if (code == Isolate::Current()->builtins()->builtin(
792 Builtins::LazyCompile)) 792 Builtins::kLazyCompile))
793 return; 793 return;
794 794
795 LogMessageBuilder msg(this); 795 LogMessageBuilder msg(this);
796 SmartPointer<char> str = 796 SmartPointer<char> str =
797 name->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL); 797 name->ToCString(DISALLOW_NULLS, ROBUST_STRING_TRAVERSAL);
798 msg.Append("%s,%s,", 798 msg.Append("%s,%s,",
799 kLogEventsNames[CODE_CREATION_EVENT], 799 kLogEventsNames[CODE_CREATION_EVENT],
800 kLogEventsNames[tag]); 800 kLogEventsNames[tag]);
801 msg.AppendAddress(code->address()); 801 msg.AppendAddress(code->address());
802 msg.Append(",%d,\"%s\",", code->ExecutableSize(), *str); 802 msg.Append(",%d,\"%s\",", code->ExecutableSize(), *str);
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 HandleScope scope; 1411 HandleScope scope;
1412 const int compiled_funcs_count = EnumerateCompiledFunctions(NULL, NULL); 1412 const int compiled_funcs_count = EnumerateCompiledFunctions(NULL, NULL);
1413 ScopedVector< Handle<SharedFunctionInfo> > sfis(compiled_funcs_count); 1413 ScopedVector< Handle<SharedFunctionInfo> > sfis(compiled_funcs_count);
1414 ScopedVector< Handle<Code> > code_objects(compiled_funcs_count); 1414 ScopedVector< Handle<Code> > code_objects(compiled_funcs_count);
1415 EnumerateCompiledFunctions(sfis.start(), code_objects.start()); 1415 EnumerateCompiledFunctions(sfis.start(), code_objects.start());
1416 1416
1417 // During iteration, there can be heap allocation due to 1417 // During iteration, there can be heap allocation due to
1418 // GetScriptLineNumber call. 1418 // GetScriptLineNumber call.
1419 for (int i = 0; i < compiled_funcs_count; ++i) { 1419 for (int i = 0; i < compiled_funcs_count; ++i) {
1420 if (*code_objects[i] == Isolate::Current()->builtins()->builtin( 1420 if (*code_objects[i] == Isolate::Current()->builtins()->builtin(
1421 Builtins::LazyCompile)) 1421 Builtins::kLazyCompile))
1422 continue; 1422 continue;
1423 Handle<SharedFunctionInfo> shared = sfis[i]; 1423 Handle<SharedFunctionInfo> shared = sfis[i];
1424 Handle<String> func_name(shared->DebugName()); 1424 Handle<String> func_name(shared->DebugName());
1425 if (shared->script()->IsScript()) { 1425 if (shared->script()->IsScript()) {
1426 Handle<Script> script(Script::cast(shared->script())); 1426 Handle<Script> script(Script::cast(shared->script()));
1427 if (script->name()->IsString()) { 1427 if (script->name()->IsString()) {
1428 Handle<String> script_name(String::cast(script->name())); 1428 Handle<String> script_name(String::cast(script->name()));
1429 int line_num = GetScriptLineNumber(script, shared->start_position()); 1429 int line_num = GetScriptLineNumber(script, shared->start_position());
1430 if (line_num > 0) { 1430 if (line_num > 0) {
1431 PROFILE(ISOLATE, 1431 PROFILE(ISOLATE,
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1657 void SamplerRegistry::RemoveActiveSampler(Sampler* sampler) { 1657 void SamplerRegistry::RemoveActiveSampler(Sampler* sampler) {
1658 ASSERT(sampler->IsActive()); 1658 ASSERT(sampler->IsActive());
1659 ScopedLock lock(mutex_); 1659 ScopedLock lock(mutex_);
1660 ASSERT(active_samplers_ != NULL); 1660 ASSERT(active_samplers_ != NULL);
1661 bool removed = active_samplers_->RemoveElement(sampler); 1661 bool removed = active_samplers_->RemoveElement(sampler);
1662 ASSERT(removed); 1662 ASSERT(removed);
1663 USE(removed); 1663 USE(removed);
1664 } 1664 }
1665 1665
1666 } } // namespace v8::internal 1666 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/liveedit.cc ('k') | src/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698