projects
/
platform
/
upstream
/
bcc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af66546
)
expose buitin byte swap methods
author
Jean-Tiare Le Bigot
<jt@yadutaf.fr>
Mon, 28 Mar 2016 15:32:35 +0000
(15:32 +0000)
committer
Jean-Tiare Le Bigot
<jt@yadutaf.fr>
Mon, 28 Mar 2016 15:34:07 +0000
(15:34 +0000)
src/python/bcc/__init__.py
patch
|
blob
|
history
diff --git
a/src/python/bcc/__init__.py
b/src/python/bcc/__init__.py
index
6671f8a
..
79764d8
100644
(file)
--- a/
src/python/bcc/__init__.py
+++ b/
src/python/bcc/__init__.py
@@
-39,6
+39,11
@@
ksyms = []
ksym_names = {}
ksym_loaded = 0
_kprobe_limit = 1000
+BASE_CFLAGS = [
+ '-D__HAVE_BUILTIN_BSWAP16__',
+ '-D__HAVE_BUILTIN_BSWAP32__',
+ '-D__HAVE_BUILTIN_BSWAP64__',
+]
@atexit.register
def cleanup_kprobes():
@@
-140,6
+145,7
@@
class BPF(object):
self.debug = debug
self.funcs = {}
self.tables = {}
+ cflags = BASE_CFLAGS + cflags
cflags_array = (ct.c_char_p * len(cflags))()
for i, s in enumerate(cflags): cflags_array[i] = s.encode("ascii")
if text: