aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkTraceEvent.h
Commit message (Collapse)AuthorAge
* Add support for object creation/snapshot/deletion eventsGravatar Brian Osman2017-08-03
| | | | | | | | | | | | | - Bring back some previously deleted macros and helper types. - Automatically inject base_type information into snapshot events, to allow simpler tracking of polymorphic object types. - Fix JSON formatting of pointer values (they were serializing as bool). Bug: skia: Change-Id: Iac7803f72ce5396ffd2fbcb5a36d76745c5e3f3e Reviewed-on: https://skia-review.googlesource.com/28220 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* Automatically prepend "disabled-by-default-" to TRACE categoriesGravatar Brian Osman2017-07-26
| | | | | | | | | | | Ensures that all Skia events are disabled by default in Chrome, and eliminates redundant typing. Bug: skia: Change-Id: I289c5e5a01084fcf4cccf512da65a4727f4aeca2 Reviewed-on: https://skia-review.googlesource.com/26880 Commit-Queue: Mike Klein <mtklein@chromium.org> Reviewed-by: Mike Klein <mtklein@chromium.org>
* sprinkle more tracing in GM, tests, and ok, and add TRACE_FUNCGravatar Mike Klein2017-07-24
| | | | | | | Change-Id: I562d438bd65e9fd900cfc6831f971b4af25c8ae6 Reviewed-on: https://skia-review.googlesource.com/26361 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Mike Klein <mtklein@chromium.org>
* Tracing cleanup and bugfixesGravatar Brian Osman2017-07-21
| | | | | | | | | | | | | | | | TraceID was unused, remove it. Simplify casting logic by using the same union helper as the macros. This fixes a bug that was present in the bool handling - we were treating the union value as a pointer, so we were dereferencing random stack memory. Luckily it never crashes, we did get the wrong values for bools. Bug: skia: Change-Id: I15d44756214f34c1f6479980d9a487ac7f3d8f6c Reviewed-on: https://skia-review.googlesource.com/25801 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
* Delete more event tracing macros (take 2)Gravatar Brian Osman2017-07-21
| | | | | | | | | | | | Also tried to clean up the comments to be clearer. Re-land of: https://skia-review.googlesource.com/25364, with some macros that are used by Flutter restored. Change-Id: I648815c275dfea2ec83a382a633af8d9f7780512 Reviewed-on: https://skia-review.googlesource.com/25561 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* Revert "Delete more event tracing macros"Gravatar Mike Klein2017-07-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit fd52317bf6d2acdbedf7477093204c9d642fcc22. Reason for revert: ../../flutter/shell/common/skia_event_tracer_impl.cc:34:12: error: use of undeclared identifier 'TRACE_EVENT_PHASE_BEGIN' case TRACE_EVENT_PHASE_BEGIN: :( Original change's description: > Delete more event tracing macros > > Also tried to clean up the comments to be clearer. > > Bug: skia: > Change-Id: I9762564a7f59bbfbd6a43afe902596d25ff1d523 > Reviewed-on: https://skia-review.googlesource.com/25364 > Reviewed-by: Mike Klein <mtklein@chromium.org> > Commit-Queue: Brian Osman <brianosman@google.com> TBR=mtklein@chromium.org,brianosman@google.com Change-Id: I3869991b8aa3d0d67d12fbe76a207a1167801a63 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia: Reviewed-on: https://skia-review.googlesource.com/25440 Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
* Delete more event tracing macrosGravatar Brian Osman2017-07-20
| | | | | | | | | | Also tried to clean up the comments to be clearer. Bug: skia: Change-Id: I9762564a7f59bbfbd6a43afe902596d25ff1d523 Reviewed-on: https://skia-review.googlesource.com/25364 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Brian Osman <brianosman@google.com>
* Have /src files use header directly.Gravatar herb2015-09-29
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1373253003
* Move SkAtomics.h to private.Gravatar herb2015-09-28
| | | | | | | | | | There are no API changes. TBR=reed@google.com BUG=skia: Review URL: https://codereview.chromium.org/1369333004
* Style Change: NULL->nullptrGravatar halcanary2015-08-27
| | | | | | DOCS_PREVIEW= https://skia.org/?cl=1316233002 Review URL: https://codereview.chromium.org/1316233002
* Moved common cross-project functionality out from SkTraceEvent.h into ↵Gravatar oysteine2015-08-05
| | | | | | | | | | | | | | | | SkTraceEventCommon.h Traditionally, SkTraceEvent.h was manually kept in sync with base/trace_event/trace_event.h, with project-specific parts intermixed, and tended to drift out of sync a lot (mainly in Blink, less so in Skia). The SkTraceEventCommon.h now has only the cross-project parts, and can be copy-pasted verbatim between projects (it's an identical copy of base/trace_event/trace_event_common.h), meaning SkTraceEvent.h shouldn't go out of sync as it has before. BUG=skia: [mtklein mucking around below here] NOPRESUBMIT=true CQ_EXCLUDE_TRYBOTS=client.skia.fyi:skia_presubmit-Trybot Review URL: https://codereview.chromium.org/1270783002
* Clean up SkDynamicAnnotations.Gravatar mtklein2015-03-12
| | | | | | | | | | | | | | | | Unprotected reads -> relaxed reads. Unprotected write -> relaxed write. The only unprotected write we had was in SkTraceEvent, which it looks like we nabbed from Chrome at some point and changed only to silence TSAN. Chrome's version uses AtomicWord / NoBarrier_Load / NoBarrier_Store, which boils down to the same as here, intptr_t / relaxed load / relaxed store. This leaves one place where we're lying a bit to TSAN, in include/core/SkLazyPtr.h where we're doing a data-dependent consume load. We're telling TSAN it's consume, but telling any other compiler to compile it as relaxed, given how they all upgrade consume to acquire. This eliminates a barrier for us on ARM. How do you guys deal with this? Just use a consume memory order, take the hit, and hope compilers get smarter one day? BUG=chromium:465721 No public API changes. TBR=reed@google.com Review URL: https://codereview.chromium.org/996763002
* Whitelist intentionally racy TRACE_EVENT reads and writes.Gravatar mtklein2014-11-05
| | | | | | | | | | | | | | | | | | | | Chrome's tracing framework appears to be intentionally racy on its quick-reject checks, trading some data loss for better performance when disabled. People will never notice the data loss, but TSAN does. Let's assuage TSAN with some annotations. The 'volatile' val in SK_ANNOTATE_UNPROTECTED_WRITE was making this not compile, but that volatile doesn't really make sense there: the value we're writing is not what we care about, it's the destination. CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu13.10-GCE-NoGPU-x86_64-Release-TSAN-Trybot No API changes. TBR=reed BUG=skia: Review URL: https://codereview.chromium.org/702883002
* Fixed void* to uint64_t cast on win64 in TraceID.Gravatar cjacek2014-09-10
| | | | | | | | | | | | On win64, long is 32-bit. Found by GCC (mingw-w64) build, where this causes an error. This is the Skia version of https://codereview.chromium.org/374043002 . R=bungeman@google.com, humper@google.com Author: cjacek@gmail.com Review URL: https://codereview.chromium.org/510923002
* initial import of Chrome's trace_event into skia frameworkGravatar commit-bot@chromium.org2014-01-31
This patch includes a modified version of Chrome's trace_event.h, which provides tracing macros that can easily integrate into the about://tracing framework. Currently the macros link to a default implementation of the (narrow) tracing class SkDefaultEventTracer which does nothing; next step will be to have Chrome subclass the SkEventTracer with a shim that bolts Skia's trace events to its own, allowing Skia's trace events to show up in about://tracing. I've verified that this file builds properly, and when I added a simple scoped TRACE_EVENT0 to SkCanvas::drawRect, along with some debug prints in the NOP implementation of tracing, I saw what I expected printed to the screen. BUG=skia: R=nduca@chromium.org, reed@google.com, mtklein@google.com, bsalomon@google.com Author: humper@google.com Review URL: https://codereview.chromium.org/149563004 git-svn-id: http://skia.googlecode.com/svn/trunk@13256 2bbb7eff-a529-9590-31e7-b0007b416f81