Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AndroidSystemCore
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Werner Sembach
AndroidSystemCore
Commits
9d773b97
Commit
9d773b97
authored
11 years ago
by
Jamie Gennis
Committed by
Android (Google) Code Review
11 years ago
Browse files
Options
Downloads
Plain Diff
Merge "trace: Add support for tracing 64-bit ints." into klp-dev
parents
5535b051
f1921c79
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
include/cutils/trace.h
+17
-0
17 additions, 0 deletions
include/cutils/trace.h
with
17 additions
and
0 deletions
include/cutils/trace.h
+
17
−
0
View file @
9d773b97
...
...
@@ -259,6 +259,23 @@ static inline void atrace_int(uint64_t tag, const char* name, int32_t value)
}
}
/**
* Traces a 64-bit integer counter value. name is used to identify the
* counter. This can be used to track how a value changes over time.
*/
#define ATRACE_INT64(name, value) atrace_int64(ATRACE_TAG, name, value)
static
inline
void
atrace_int64
(
uint64_t
tag
,
const
char
*
name
,
int64_t
value
)
{
if
(
CC_UNLIKELY
(
atrace_is_tag_enabled
(
tag
)))
{
char
buf
[
ATRACE_MESSAGE_LENGTH
];
size_t
len
;
len
=
snprintf
(
buf
,
ATRACE_MESSAGE_LENGTH
,
"C|%d|%s|%lld"
,
getpid
(),
name
,
value
);
write
(
atrace_marker_fd
,
buf
,
len
);
}
}
#else // not HAVE_ANDROID_OS
#define ATRACE_INIT()
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment