mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Add various trace events for tracing startup
@abarth
This commit is contained in:
parent
1f77010ec0
commit
a92597ee07
@ -88,6 +88,8 @@ void DartController::DidLoadMainLibrary(String name) {
|
||||
}
|
||||
|
||||
void DartController::DidLoadSnapshot() {
|
||||
TRACE_EVENT0("flutter", "DartController::DidLoadSnapshot");
|
||||
|
||||
DCHECK(Dart_CurrentIsolate() == nullptr);
|
||||
snapshot_loader_ = nullptr;
|
||||
|
||||
|
||||
@ -281,6 +281,7 @@ bool IsRunningPrecompiledCode() {
|
||||
#endif // DART_ALLOW_DYNAMIC_RESOLUTION
|
||||
|
||||
void InitDartVM() {
|
||||
TRACE_EVENT0("flutter", "InitDartVM");
|
||||
dart::bin::BootstrapDartIo();
|
||||
|
||||
bool enable_checked_mode = RuntimeEnabledFeatures::dartCheckedModeEnabled();
|
||||
|
||||
@ -46,6 +46,7 @@
|
||||
#include "sky/engine/wtf/text/AtomicString.h"
|
||||
#include "sky/engine/wtf/text/TextEncoding.h"
|
||||
#include "sky/engine/wtf/WTF.h"
|
||||
#include "base/trace_event/trace_event.h"
|
||||
|
||||
namespace blink {
|
||||
|
||||
@ -115,6 +116,8 @@ static void cryptographicallyRandomValues(unsigned char* buffer, size_t length)
|
||||
|
||||
void initialize(Platform* platform)
|
||||
{
|
||||
TRACE_EVENT0("flutter", "blink::initialize");
|
||||
|
||||
ASSERT(!s_webKitInitialized);
|
||||
s_webKitInitialized = true;
|
||||
|
||||
|
||||
@ -12,6 +12,7 @@ import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
|
||||
import org.chromium.base.PathUtils;
|
||||
import org.chromium.base.TraceEvent;
|
||||
import org.chromium.mojom.sky.EventType;
|
||||
import org.chromium.mojom.sky.InputEvent;
|
||||
|
||||
@ -113,6 +114,8 @@ public class SkyActivity extends Activity {
|
||||
* Override this function to customize startup behavior.
|
||||
*/
|
||||
protected void onSkyReady() {
|
||||
TraceEvent.instant("SkyActivity.onSkyReady");
|
||||
|
||||
if (loadIntent(getIntent())) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -170,6 +170,8 @@ void Engine::RunFromLibrary(const std::string& name) {
|
||||
void Engine::RunFromSnapshotStream(
|
||||
const std::string& name,
|
||||
mojo::ScopedDataPipeConsumerHandle snapshot) {
|
||||
TRACE_EVENT0("flutter", "Engine::RunFromSnapshotStream");
|
||||
|
||||
sky_view_ = blink::SkyView::Create(this);
|
||||
sky_view_->CreateView(blink::WebString::fromUTF8(name));
|
||||
sky_view_->RunFromSnapshot(blink::WebString::fromUTF8(name), snapshot.Pass());
|
||||
@ -201,6 +203,8 @@ void Engine::RunFromFile(const mojo::String& main,
|
||||
}
|
||||
|
||||
void Engine::RunFromBundle(const mojo::String& path) {
|
||||
TRACE_EVENT0("flutter", "Engine::RunFromBundle");
|
||||
|
||||
AssetUnpackerJob* unpacker = new AssetUnpackerJob(
|
||||
mojo::GetProxy(&root_bundle_), base::WorkerPool::GetTaskRunner(true));
|
||||
std::string path_str = path;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user