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
c19588cf
Commit
c19588cf
authored
Apr 29, 2016
by
sergeyv
Browse files
Options
Downloads
Patches
Plain Diff
atrace: read package names from multiple sysprops
bug: 28200530 Change-Id: I4597a84f4fb16098b0e57684cde5e57c1f41eed5
parent
ded0f368
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
libcutils/trace-dev.c
+7
-14
7 additions, 14 deletions
libcutils/trace-dev.c
with
7 additions
and
14 deletions
libcutils/trace-dev.c
+
7
−
14
View file @
c19588cf
...
...
@@ -66,24 +66,17 @@ void atrace_set_tracing_enabled(bool enabled)
// values listed in the app_cmdlines property.
static
bool
atrace_is_cmdline_match
(
const
char
*
cmdline
)
{
char
value
[
PROPERTY_VALUE_MAX
];
char
*
start
=
value
;
property_get
(
"debug.atrace.app_cmdlines"
,
value
,
""
);
while
(
start
!=
NULL
)
{
char
*
end
=
strchr
(
start
,
','
);
int
count
=
property_get_int32
(
"debug.atrace.app_number"
,
0
);
if
(
end
!=
NULL
)
{
*
end
=
'\0'
;
end
++
;
}
char
buf
[
PROPERTY_KEY_MAX
];
char
value
[
PROPERTY_VALUE_MAX
];
if
(
strcmp
(
cmdline
,
start
)
==
0
)
{
for
(
int
i
=
0
;
i
<
count
;
i
++
)
{
snprintf
(
buf
,
sizeof
(
buf
),
"debug.atrace.app_%d"
,
i
);
property_get
(
buf
,
value
,
""
);
if
(
strcmp
(
value
,
cmdline
)
==
0
)
{
return
true
;
}
start
=
end
;
}
return
false
;
...
...
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