OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
998 void Logger::CodeCreateEvent(LogEventsAndTags tag, | 998 void Logger::CodeCreateEvent(LogEventsAndTags tag, |
999 Code* code, | 999 Code* code, |
1000 SharedFunctionInfo* shared, | 1000 SharedFunctionInfo* shared, |
1001 String* name) { | 1001 String* name) { |
1002 #ifdef ENABLE_LOGGING_AND_PROFILING | 1002 #ifdef ENABLE_LOGGING_AND_PROFILING |
1003 if (!log_->IsEnabled()) return; | 1003 if (!log_->IsEnabled()) return; |
1004 if (FLAG_ll_prof || Serializer::enabled()) { | 1004 if (FLAG_ll_prof || Serializer::enabled()) { |
1005 name_buffer_->Reset(); | 1005 name_buffer_->Reset(); |
1006 name_buffer_->AppendBytes(kLogEventsNames[tag]); | 1006 name_buffer_->AppendBytes(kLogEventsNames[tag]); |
1007 name_buffer_->AppendByte(':'); | 1007 name_buffer_->AppendByte(':'); |
| 1008 name_buffer_->AppendBytes(ComputeMarker(code)); |
1008 name_buffer_->AppendString(name); | 1009 name_buffer_->AppendString(name); |
1009 } | 1010 } |
1010 if (FLAG_ll_prof) { | 1011 if (FLAG_ll_prof) { |
1011 LowLevelCodeCreateEvent(code, name_buffer_->get(), name_buffer_->size()); | 1012 LowLevelCodeCreateEvent(code, name_buffer_->get(), name_buffer_->size()); |
1012 } | 1013 } |
1013 if (Serializer::enabled()) { | 1014 if (Serializer::enabled()) { |
1014 RegisterSnapshotCodeName(code, name_buffer_->get(), name_buffer_->size()); | 1015 RegisterSnapshotCodeName(code, name_buffer_->get(), name_buffer_->size()); |
1015 } | 1016 } |
1016 if (!FLAG_log_code) return; | 1017 if (!FLAG_log_code) return; |
1017 if (code == Isolate::Current()->builtins()->builtin( | 1018 if (code == Isolate::Current()->builtins()->builtin( |
(...skipping 22 matching lines...) Expand all Loading... |
1040 void Logger::CodeCreateEvent(LogEventsAndTags tag, | 1041 void Logger::CodeCreateEvent(LogEventsAndTags tag, |
1041 Code* code, | 1042 Code* code, |
1042 SharedFunctionInfo* shared, | 1043 SharedFunctionInfo* shared, |
1043 String* source, int line) { | 1044 String* source, int line) { |
1044 #ifdef ENABLE_LOGGING_AND_PROFILING | 1045 #ifdef ENABLE_LOGGING_AND_PROFILING |
1045 if (!log_->IsEnabled()) return; | 1046 if (!log_->IsEnabled()) return; |
1046 if (FLAG_ll_prof || Serializer::enabled()) { | 1047 if (FLAG_ll_prof || Serializer::enabled()) { |
1047 name_buffer_->Reset(); | 1048 name_buffer_->Reset(); |
1048 name_buffer_->AppendBytes(kLogEventsNames[tag]); | 1049 name_buffer_->AppendBytes(kLogEventsNames[tag]); |
1049 name_buffer_->AppendByte(':'); | 1050 name_buffer_->AppendByte(':'); |
| 1051 name_buffer_->AppendBytes(ComputeMarker(code)); |
1050 name_buffer_->AppendString(shared->DebugName()); | 1052 name_buffer_->AppendString(shared->DebugName()); |
1051 name_buffer_->AppendByte(' '); | 1053 name_buffer_->AppendByte(' '); |
1052 name_buffer_->AppendString(source); | 1054 name_buffer_->AppendString(source); |
1053 name_buffer_->AppendByte(':'); | 1055 name_buffer_->AppendByte(':'); |
1054 name_buffer_->AppendInt(line); | 1056 name_buffer_->AppendInt(line); |
1055 } | 1057 } |
1056 if (FLAG_ll_prof) { | 1058 if (FLAG_ll_prof) { |
1057 LowLevelCodeCreateEvent(code, name_buffer_->get(), name_buffer_->size()); | 1059 LowLevelCodeCreateEvent(code, name_buffer_->get(), name_buffer_->size()); |
1058 } | 1060 } |
1059 if (Serializer::enabled()) { | 1061 if (Serializer::enabled()) { |
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1982 void SamplerRegistry::RemoveActiveSampler(Sampler* sampler) { | 1984 void SamplerRegistry::RemoveActiveSampler(Sampler* sampler) { |
1983 ASSERT(sampler->IsActive()); | 1985 ASSERT(sampler->IsActive()); |
1984 ScopedLock lock(mutex_); | 1986 ScopedLock lock(mutex_); |
1985 ASSERT(active_samplers_ != NULL); | 1987 ASSERT(active_samplers_ != NULL); |
1986 bool removed = active_samplers_->RemoveElement(sampler); | 1988 bool removed = active_samplers_->RemoveElement(sampler); |
1987 ASSERT(removed); | 1989 ASSERT(removed); |
1988 USE(removed); | 1990 USE(removed); |
1989 } | 1991 } |
1990 | 1992 |
1991 } } // namespace v8::internal | 1993 } } // namespace v8::internal |
OLD | NEW |