Skip to content

Commit

Permalink
Revert "Remove superfluous INFO logs from //flutter/runtime. (flutter…
Browse files Browse the repository at this point in the history
…#16280)"

This reverts commit aa78c13.
  • Loading branch information
NoamDev authored Feb 27, 2020
1 parent a697d8b commit 661dbd3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
12 changes: 12 additions & 0 deletions runtime/dart_isolate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ bool DartIsolate::Run(const std::string& entrypoint_name,
}

phase_ = Phase::Running;
FML_DLOG(INFO) << "New isolate is in the running state.";

if (on_run) {
on_run();
Expand Down Expand Up @@ -539,6 +540,7 @@ bool DartIsolate::RunFromLibrary(const std::string& library_name,
}

phase_ = Phase::Running;
FML_DLOG(INFO) << "New isolate is in the running state.";

if (on_run) {
on_run();
Expand Down Expand Up @@ -586,6 +588,7 @@ Dart_Isolate DartIsolate::DartCreateAndStartServiceIsolate(
const auto& settings = vm_data->GetSettings();

if (!settings.enable_observatory) {
FML_DLOG(INFO) << "Observatory is disabled.";
return nullptr;
}

Expand Down Expand Up @@ -831,13 +834,19 @@ void DartIsolate::DartIsolateShutdownCallback(
std::shared_ptr<DartIsolateGroupData>* isolate_group_data,
std::shared_ptr<DartIsolate>* isolate_data) {
TRACE_EVENT0("flutter", "DartIsolate::DartIsolateShutdownCallback");
FML_DLOG(INFO) << "DartIsolateShutdownCallback"
<< " isolate_group_data " << isolate_group_data
<< " isolate_data " << isolate_data;
isolate_data->get()->OnShutdownCallback();
}

// |Dart_IsolateGroupCleanupCallback|
void DartIsolate::DartIsolateGroupCleanupCallback(
std::shared_ptr<DartIsolateGroupData>* isolate_data) {
TRACE_EVENT0("flutter", "DartIsolate::DartIsolateGroupCleanupCallback");
FML_DLOG(INFO) << "DartIsolateGroupCleanupCallback isolate_data "
<< isolate_data;

delete isolate_data;
}

Expand All @@ -846,6 +855,9 @@ void DartIsolate::DartIsolateCleanupCallback(
std::shared_ptr<DartIsolateGroupData>* isolate_group_data,
std::shared_ptr<DartIsolate>* isolate_data) {
TRACE_EVENT0("flutter", "DartIsolate::DartIsolateCleanupCallback");

FML_DLOG(INFO) << "DartIsolateCleanupCallback cleaned up isolate_data "
<< isolate_data;
delete isolate_data;
}

Expand Down
1 change: 1 addition & 0 deletions runtime/dart_isolate_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ class AutoIsolateShutdown {
fml::AutoResetWaitableEvent latch;
fml::TaskRunner::RunNowOrPostTask(
runner_, [isolate = std::move(isolate_), &latch]() {
FML_LOG(INFO) << "Shutting down isolate.";
if (!isolate->Shutdown()) {
FML_LOG(ERROR) << "Could not shutdown isolate.";
FML_CHECK(false);
Expand Down
9 changes: 9 additions & 0 deletions runtime/dart_vm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ DartVM::DartVM(std::shared_ptr<const DartVMData> vm_data,
FML_DCHECK(isolate_name_server_);
FML_DCHECK(service_protocol_);

FML_DLOG(INFO) << "Attempting Dart VM launch for mode: "
<< (IsRunningPrecompiledCode() ? "AOT" : "Interpreter");

{
TRACE_EVENT0("flutter", "dart::bin::BootstrapDartIo");
dart::bin::BootstrapDartIo();
Expand Down Expand Up @@ -453,6 +456,9 @@ DartVM::DartVM(std::shared_ptr<const DartVMData> vm_data,
Dart_SetDartLibrarySourcesKernel(dart_library_sources->GetMapping(),
dart_library_sources->GetSize());
}

FML_DLOG(INFO) << "New Dart VM instance created. Instance count: "
<< gVMLaunchCount;
}

DartVM::~DartVM() {
Expand All @@ -472,6 +478,9 @@ DartVM::~DartVM() {
<< "Could not cleanly shut down the Dart VM. Error: \"" << result
<< "\".";
free(result);

FML_DLOG(INFO) << "Dart VM instance destroyed. Instance count: "
<< gVMLaunchCount;
}

std::shared_ptr<const DartVMData> DartVM::GetVMData() const {
Expand Down

0 comments on commit 661dbd3

Please sign in to comment.