Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bcc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
bcc
Commits
db724e2c
Commit
db724e2c
authored
Jun 21, 2016
by
Mark Drayton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix nits for /tmp/perf-pid.map support
parent
6862875c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
src/cc/bcc_perf_map.c
src/cc/bcc_perf_map.c
+4
-3
No files found.
src/cc/bcc_perf_map.c
View file @
db724e2c
...
...
@@ -33,12 +33,13 @@ int bcc_perf_map_nspid(int pid) {
// return the original PID if the NSpid line is missing
int
nspid
=
pid
;
size_t
size
;
size_t
size
=
0
;
char
*
line
=
NULL
;
while
(
getline
(
&
line
,
&
size
,
status
)
!=
-
1
)
while
(
getline
(
&
line
,
&
size
,
status
)
!=
-
1
)
{
if
(
strstr
(
line
,
"NSpid:"
)
!=
NULL
)
// PID namespaces can be nested -- last number is innermost PID
nspid
=
(
int
)
strtol
(
strrchr
(
line
,
'\t'
),
NULL
,
10
);
}
free
(
line
);
return
nspid
;
...
...
@@ -70,7 +71,7 @@ int bcc_perf_map_foreach_sym(const char *path, bcc_perf_map_symcb callback,
return
-
1
;
char
*
line
=
NULL
;
size_t
size
;
size_t
size
=
0
;
long
long
begin
,
len
;
while
(
getline
(
&
line
,
&
size
,
file
)
!=
-
1
)
{
char
*
cursor
=
line
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment