aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--bench/nanobench.cpp3
-rw-r--r--site/dev/tools/tracing.md43
2 files changed, 27 insertions, 19 deletions
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index bd23c3e39a..d69db82880 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -46,6 +46,7 @@
#include "SkSurface.h"
#include "SkTaskGroup.h"
#include "SkThreadUtils.h"
+#include "SkTraceEvent.h"
#include "Stats.h"
#include "ThermalManager.h"
#include "ios_utils.h"
@@ -1272,6 +1273,8 @@ int main(int argc, char** argv) {
}
}
+ TRACE_EVENT1("skia", bench->getUniqueName(), "config", config);
+
target->setup();
bench->perCanvasPreDraw(canvas);
diff --git a/site/dev/tools/tracing.md b/site/dev/tools/tracing.md
index f20f76e717..60595bc5df 100644
--- a/site/dev/tools/tracing.md
+++ b/site/dev/tools/tracing.md
@@ -19,6 +19,11 @@ Running any tool with `--trace atrace` on an Android device will cause the appli
tracing information to [atrace](https://source.android.com/devices/tech/debug/ftrace). On other
platforms, this has no effect.
+If you run `systrace` from the host command line, you will need to supply `-a <app_name>`,
+and the `<app_name>` argument will need to exactly match the command line used on the target
+device. For example, if you use `adb shell "cd /data/local/tmp; ./nanobench --trace atrace ..."`
+you must pass `-a ./nanobench` or systrace will ignore events from the application.
+
Console Logging
---------------
@@ -30,25 +35,25 @@ For simple situations, all tracing events can be directed to the console with `-
out/Release/dm --config gl --match ^gamma$ --trace debugf
~~~
-[ 0] <skia.gpu> GrDrawingManager::internalFlush id=1 #0 {
-[ 0] } GrDrawingManager::internalFlush
-[ 0] <skia.gpu> GrGpu::createTexture id=1 #1 {
-[ 0] } GrGpu::createTexture
-[ 0] <skia.gpu> GrRenderTargetContext::discard id=1 #2 {
-[ 0] } GrRenderTargetContext::discard
-[ 0] <skia.gpu> SkGpuDevice::clearAll id=1 #3 {
-[ 1] <skia.gpu> GrRenderTargetContext::clear id=1 #4 {
-[ 1] } GrRenderTargetContext::clear
-[ 0] } SkGpuDevice::clearAll
-[ 0] <skia> SkCanvas::drawRect() #5 {
-[ 1] <skia.gpu> SkGpuDevice::drawRect id=1 #6 {
-[ 2] <skia.gpu> GrRenderTargetContext::drawRect id=1 #7 {
-[ 3] <skia.gpu> GrRenderTargetContext::addDrawOp id=1 #8 {
-[ 3] } GrRenderTargetContext::addDrawOp
-[ 2] } GrRenderTargetContext::drawRect
-[ 1] } SkGpuDevice::drawRect
-[ 0] } SkCanvas::drawRect()
-...
+[ 0] <skia.gpu> GrDrawingManager::internalFlush id=1 #0 {
+[ 0] } GrDrawingManager::internalFlush
+[ 0] <skia.gpu> GrGpu::createTexture id=1 #1 {
+[ 0] } GrGpu::createTexture
+[ 0] <skia.gpu> GrRenderTargetContext::discard id=1 #2 {
+[ 0] } GrRenderTargetContext::discard
+[ 0] <skia.gpu> SkGpuDevice::clearAll id=1 #3 {
+[ 1] <skia.gpu> GrRenderTargetContext::clear id=1 #4 {
+[ 1] } GrRenderTargetContext::clear
+[ 0] } SkGpuDevice::clearAll
+[ 0] <skia> SkCanvas::drawRect() #5 {
+[ 1] <skia.gpu> SkGpuDevice::drawRect id=1 #6 {
+[ 2] <skia.gpu> GrRenderTargetContext::drawRect id=1 #7 {
+[ 3] <skia.gpu> GrRenderTargetContext::addDrawOp id=1 #8 {
+[ 3] } GrRenderTargetContext::addDrawOp
+[ 2] } GrRenderTargetContext::drawRect
+[ 1] } SkGpuDevice::drawRect
+[ 0] } SkCanvas::drawRect()
+...
~~~
Chrome Tracing