Commit graph

5 commits

Author SHA1 Message Date
sergeyv
c19588cfc8 atrace: read package names from multiple sysprops
bug: 28200530
Change-Id: I4597a84f4fb16098b0e57684cde5e57c1f41eed5
2016-04-29 10:56:41 -07:00
Christopher Ferris
82d84897b1 Fix incorrect handling of snprintf return value.
The code assumed that snprintf would never return a value less than
the passed in size of the buffer. This is not accurate, so fix all
of the places this assumptions is made. Also, if the name is too large,
then truncate just the name to make everything fit.

Added a new set of tests for this code. Verified that the old code passes
on the _normal and _exact version of the tests, but fails with the
FORTIFY error on the _truncated version of the tests. All tests pass
on the new code.

Bug: 27324359

(cherry picked from commit 626efb78a6)

Change-Id: Iba60a926cf5a1d6b517a6bfd8c797d724f093010
2016-02-25 14:02:00 -08:00
Nick Kralevich
dee1ef48a9 trace-dev.c: more O_CLOEXEC
Stop the file descriptors from leaking.

Change-Id: Ib5ca1c2e5031fbec8751bde9e86b32e51e10fcbc
2015-12-16 12:32:26 -08:00
Yabin Cui
a8ac32c781 Move trace.h to stdatomic.
Bug: 20262261
Change-Id: Idaf984786804eb76c285f38b11abbbc0d3706509
2015-04-16 10:41:16 -07:00
Richard Uhler
7d451ab96d Define atrace_* functions for both target and host.
This change defines atrace_* functions for the host that act as
no-ops, which makes it easier to add tracing in ART.

Change-Id: I89397e83986686a2b6a6f245c25017eb379081b1
2015-03-27 14:58:30 -07:00
Renamed from libcutils/trace.c (Browse further)