Skip to content

Commit

Permalink
Port to Magenta tracing system. (flutter#4076)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Brown authored Sep 8, 2017
1 parent 3a5bf56 commit 7c7c788
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion content_handler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ template("flutter_content_handler") {
"//apps/mozart/lib/scenic:client",
"//apps/mozart/services/input",
"//apps/mozart/services/views",
"//apps/tracing/lib/trace:provider",
"//dart/runtime/bin:libdart_builtin",
"//dart/runtime/platform:libdart_platform",
"//flutter/assets",
Expand All @@ -65,6 +64,7 @@ template("flutter_content_handler") {
"//garnet/public/lib/mtl",
"//garnet/public/lib/zip",
"//lib/tonic",
"//magenta/system/ulib/trace-provider",
"//magma:vulkan",
"//third_party/rapidjson",
"//third_party/skia",
Expand Down
3 changes: 0 additions & 3 deletions content_handler/app.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <thread>
#include <utility>

#include "apps/tracing/lib/trace/provider.h"
#include "flutter/common/settings.h"
#include "flutter/common/threads.h"
#include "flutter/sky/engine/platform/fonts/fuchsia/FontCacheFuchsia.h"
Expand Down Expand Up @@ -38,8 +37,6 @@ App::App() {
g_app = this;
context_ = app::ApplicationContext::CreateFromStartupInfo();

tracing::InitializeTracer(context_.get(), {});

gpu_thread_ = std::make_unique<mtl::Thread>();
io_thread_ = std::make_unique<mtl::Thread>();

Expand Down
3 changes: 3 additions & 0 deletions content_handler/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <trace-provider/provider.h>

#include "flutter/content_handler/app.h"
#include "lib/mtl/tasks/message_loop.h"

int main(int argc, const char** argv) {
mtl::MessageLoop loop;
trace::TraceProvider provider(loop.async());
flutter_runner::App app;
loop.Run();
return 0;
Expand Down
3 changes: 2 additions & 1 deletion content_handler/vulkan_surface_pool.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <trace/event.h>

#include "flutter/content_handler/vulkan_surface_pool.h"
#include "apps/tracing/lib/trace/event.h"
#include "third_party/skia/include/gpu/GrContext.h"

namespace flutter_runner {
Expand Down
2 changes: 1 addition & 1 deletion glue/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ source_set("glue") {
sources += [ "stack_trace_fuchsia.cc" ]

public_deps = [
"//apps/tracing/lib/trace",
"//magenta/system/ulib/trace",
]
} else {
sources += [ "stack_trace_base.cc" ]
Expand Down
2 changes: 1 addition & 1 deletion glue/trace_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#if defined(__Fuchsia__)

#include "apps/tracing/lib/trace/event.h"
#include <trace/event.h>

#define TRACE_EVENT0(a, b) TRACE_DURATION(a, b)
#define TRACE_EVENT1(a, b, c, d) TRACE_DURATION(a, b, c, d)
Expand Down

0 comments on commit 7c7c788

Please sign in to comment.