1 // Copyright 2006-2009 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
9 #include "src/isolate.h"
14 Logger::LogEventsAndTags Logger::ToNativeByScript(Logger::LogEventsAndTags tag,
16 if ((tag == FUNCTION_TAG || tag == LAZY_COMPILE_TAG || tag == SCRIPT_TAG)
17 && script->type()->value() == Script::TYPE_NATIVE) {
19 case FUNCTION_TAG: return NATIVE_FUNCTION_TAG;
20 case LAZY_COMPILE_TAG: return NATIVE_LAZY_COMPILE_TAG;
21 case SCRIPT_TAG: return NATIVE_SCRIPT_TAG;
30 void Logger::CallEventLogger(Isolate* isolate, const char* name, StartEnd se,
32 if (isolate->event_logger() != NULL) {
33 if (isolate->event_logger() == DefaultEventLoggerSentinel) {
34 LOG(isolate, TimerEvent(se, name));
35 } else if (expose_to_api) {
36 isolate->event_logger()(name, se);
40 } } // namespace v8::internal
42 #endif // V8_LOG_INL_H_