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
7a68964a
Commit
7a68964a
authored
Nov 09, 2016
by
Brenden Blanco
Committed by
GitHub
Nov 09, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #808 from goldshtn/close-table-fd-fix
cc, python: Clean up BPF module and tables
parents
d31f845e
c085977e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
src/cc/bpf_module.cc
src/cc/bpf_module.cc
+2
-0
src/python/bcc/__init__.py
src/python/bcc/__init__.py
+4
-0
No files found.
src/cc/bpf_module.cc
View file @
7a68964a
...
...
@@ -120,6 +120,8 @@ BPFModule::~BPFModule() {
for
(
auto
table
:
*
tables_
)
{
if
(
table
.
is_shared
)
SharedTables
::
instance
()
->
remove_fd
(
table
.
name
);
else
close
(
table
.
fd
);
}
}
}
...
...
src/python/bcc/__init__.py
View file @
7a68964a
...
...
@@ -1049,6 +1049,10 @@ class BPF(object):
self
.
detach_perf_event
(
ev_type
,
ev_config
)
if
self
.
tracefile
:
self
.
tracefile
.
close
()
self
.
tracefile
=
None
if
self
.
module
:
lib
.
bpf_module_destroy
(
self
.
module
)
self
.
module
=
None
from
.usdt
import
USDT
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