1// Copyright 2020 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. 4 5#include "src/logging/local-logger.h" 6 7#include "src/execution/isolate.h" 8#include "src/objects/map.h" 9 10namespace v8 { 11namespace internal { 12 13// TODO(leszeks): Add support for logging from off-thread. 14LocalLogger::LocalLogger(Isolate* isolate) 15 : logger_(isolate->logger()), 16 is_logging_(isolate->logger()->is_logging()), 17 is_listening_to_code_events_( 18 isolate->logger()->is_listening_to_code_events()) {} 19 20void LocalLogger::ScriptDetails(Script script) { 21 logger_->ScriptDetails(script); 22} 23void LocalLogger::ScriptEvent(Logger::ScriptEventType type, int script_id) { 24 logger_->ScriptEvent(type, script_id); 25} 26void LocalLogger::CodeLinePosInfoRecordEvent(Address code_start, 27 ByteArray source_position_table, 28 JitCodeEvent::CodeType code_type) { 29 logger_->CodeLinePosInfoRecordEvent(code_start, source_position_table, 30 code_type); 31} 32 33void LocalLogger::MapCreate(Map map) { logger_->MapCreate(map); } 34 35void LocalLogger::MapDetails(Map map) { logger_->MapDetails(map); } 36 37} // namespace internal 38} // namespace v8 39