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
68a52b85
Commit
68a52b85
authored
Apr 07, 2017
by
Teng Qin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't close epoll FD if it's already closed
parent
5440af33
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
src/cc/BPFTable.cc
src/cc/BPFTable.cc
+8
-6
src/cc/perf_reader.c
src/cc/perf_reader.c
+1
-1
No files found.
src/cc/BPFTable.cc
View file @
68a52b85
...
...
@@ -136,12 +136,14 @@ StatusTuple BPFPerfBuffer::close_all_cpu() {
std
::
string
errors
;
bool
has_error
=
false
;
int
close_res
=
close
(
epfd_
);
epfd_
=
-
1
;
ep_events_
.
reset
();
if
(
close_res
!=
0
)
{
has_error
=
true
;
errors
+=
std
::
string
(
std
::
strerror
(
errno
))
+
"
\n
"
;
if
(
epfd_
>=
0
)
{
int
close_res
=
close
(
epfd_
);
epfd_
=
-
1
;
ep_events_
.
reset
();
if
(
close_res
!=
0
)
{
has_error
=
true
;
errors
+=
std
::
string
(
std
::
strerror
(
errno
))
+
"
\n
"
;
}
}
std
::
vector
<
int
>
opened_cpus
;
...
...
src/cc/perf_reader.c
View file @
68a52b85
...
...
@@ -244,7 +244,7 @@ void perf_reader_event_read(struct perf_reader *reader) {
if
(
reader
->
lost_cb
)
{
reader
->
lost_cb
(
lost
);
}
else
{
fprintf
(
stderr
,
"Possibly lost "
PRIu64
" samples
\n
"
,
lost
);
fprintf
(
stderr
,
"Possibly lost
%
"
PRIu64
" samples
\n
"
,
lost
);
}
}
else
if
(
e
->
type
==
PERF_RECORD_SAMPLE
)
{
if
(
reader
->
type
==
PERF_TYPE_TRACEPOINT
)
...
...
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