History log of /fuchsia/zircon/system/utest/trace/engine_tests.cpp
Revision Date Author Comments
# 6200ff82 05-Sep-2018 Doug Evans <dje@google.com>

[trace-engine] Send a signal for STOPPING->STOPPED state change

Tested: /boot/test/sys/trace-test, passes with new test
Change-Id: Icffa0fdc7def54ff65a4c00c67ae6742e627f5e5


# 83e4b2cc 12-Sep-2018 Doug Evans <dje@google.com>

[trace-engine] Only try to release prolonged context if acquired.

Tested: /boot/test/sys/trace-test
New test crashes without patch, passes with patch.

DX-441 #done

Change-Id: If54642270dc4eba8c008b920feee2b8aeb04df97


# 4956d002 21-Aug-2018 Mark Seaborn <mseaborn@google.com>

[utest] Remove empty-string "msg" args from EXPECT/ASSERT calls in C++

The "msg" argument is optional in C++. A number of instances of
empty-string "msg" arguments have appeared since I last removed them.

This cleanup was automated.

Bug: ZX-905
Test: compile
Change-Id: Ia5ef96a2bc5a91dd8d1d62c90802c26f44f1a31f


# b974608b 08-Jul-2018 Doug Evans <dje@google.com>

[tracing] Add support for circular and streaming modes

Tested:
/boot/test/sys/trace-test
trace-benchmark
Further testing done on the garnet side.

Change-Id: I8ec21ba0adc57d090bbfe4be6d56fc695aa645d4


# bf3a04dd 07-Jul-2018 Doug Evans <dje@google.com>

[tracing] Add beginnings of trace buffering mode support

This patch just adds the basic infrastructure.
Support for circular and streaming modes comes later.

Tested:
/system/test/sys/trace-test
trace record --buffering-mode=oneshot \
--categories=stress:example,stress:something \
/system/bin/trace-stress --count=5000
trace record --buffering-mode=circular \
--categories=stress:example,stress:something \
/system/bin/trace-stress --count=5000
[trace will be empty, but should run]
trace record --buffering-mode=streaming \
--categories=stress:example,stress:something \
/system/bin/trace-stress --count=5000
[trace will be empty, but should run]

Change-Id: I1fc28668dee652c88df9d5e669c8b4ac978604bc


# e0d70dec 16-Mar-2018 James Robinson <jamesr@google.com>

[zx] Move public zx headers to match naming convention

The zx library provides headers intended for general use, so the
include path should be spelled <lib/zx/foo.h> as per
https://fuchsia.googlesource.com/docs/+/master/development/languages/c-cpp/naming.md.
This moves the headers into the proper location and updates includes to
match.

Change-Id: I6fc9b2a491b5f8b0d270c4dfc77fa4be5739071b


# 6c4c064e 12-Mar-2018 Mark Seaborn <mseaborn@google.com>

[utest] Remove empty-string "msg" args from EXPECT/ASSERT calls in C++

The "msg" argument is optional in C++. A number of instances of
empty-string "msg" arguments have appeared since I last removed them.

This cleanup was automated.

ZX-905

Change-Id: I434d129836642216588f110d1cb161859ff3efea


# aa3b7734 24-Jan-2018 Adam Barth <abarth@google.com>

[zx] Update callers to zx::time and zx::duration types

The zx_time_t and zx_duration_t variants will be removed eventually.

Change-Id: Icc54983edc154eee2d1258160f921c3afc212ae0


# f3e2126c 12-Sep-2017 Roland McGrath <mcgrathr@google.com>

[zx] Magenta -> Zircon

The Great Renaming is here!

Change-Id: I3229bdeb2a3d0e40fb4db6fec8ca7d971fbffb94


# d6832978 11-Sep-2017 Jeff Brown <jeffbrown@google.com>

[trace-engine] Fix bug writing arguments within inline names.

Change-Id: I5cbaa3cec12c0423546e3e6db76d8bea9257cfea


# 59e644b1 07-Sep-2017 George Kulakowski <kulakowski@google.com>

[zircon][mxtl->fbl] Rename mxtl to fbl

Change-Id: Ie21b6498e1bfb0a7fa0315e40b9e5c3ee78646be


# 76e6ccd5 29-Aug-2017 Jeff Brown <jeffbrown@google.com>

[trace] Port Fuchsia tracing system to Magenta.

The Fuchsia tracing system supports instrumentation of userspace
programs to collect trace records.

This implementation consists of...

- libtrace: a static library providing C and C++ instrumentation macros
and functions designed to be linked into client programs
- libtrace-engine: a shared library with a C ABI which manages
global tracing state in the process and provides
functions to write trace records
- libtrace-provider: a static library which implements the TraceProvider
FIDL interface and registers an instrumented
program with the trace manager
- libtrace-reader: a static library which provides a C++ API for reading
binary trace data
- unit tests
- benchmarks
- documentation

This is almost a complete rewrite of the code formerly in //apps/tracing
but it remains compatible with the trace format and preserves most of
the structure of the trace event API.

The main differences are...

- The <trace/event.h> API uses identical syntax for C and C++ with
a few extra goodies for C++ type inference.
- The trace engine is factored out as a shared library with a C ABI
instead of being written as a C++ static library, this makes it more
suitable for instrumentation of libraries and device drivers.
- The API is extensively documented.
- We actually have benchmarks to measure instrumentation overhead.

There are still a few pieces left in //apps/tracing, such as the trace
manager and command-line tools, which will be moved over later.

Change-Id: I2d2986be0e63e5aa21fe56dd03024490b0334214