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"
10 #include "src/objects-inl.h"
15 Logger::LogEventsAndTags Logger::ToNativeByScript(Logger::LogEventsAndTags tag,
17 if ((tag == FUNCTION_TAG || tag == LAZY_COMPILE_TAG || tag == SCRIPT_TAG) &&
18 script->type() == Script::TYPE_NATIVE) {
20 case FUNCTION_TAG: return NATIVE_FUNCTION_TAG;
21 case LAZY_COMPILE_TAG: return NATIVE_LAZY_COMPILE_TAG;
22 case SCRIPT_TAG: return NATIVE_SCRIPT_TAG;
31 void Logger::CallEventLogger(Isolate* isolate, const char* name, StartEnd se,
33 if (isolate->event_logger() != NULL) {
34 if (isolate->event_logger() == DefaultEventLoggerSentinel) {
35 LOG(isolate, TimerEvent(se, name));
36 } else if (expose_to_api) {
37 isolate->event_logger()(name, se);
41 } // namespace internal
44 #endif // V8_LOG_INL_H_