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
53da6727
Commit
53da6727
authored
Jan 05, 2017
by
4ast
Committed by
GitHub
Jan 05, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #886 from iovisor/llvm_40_fixes
Fixes for LLVM 4.0 and python3
parents
eb6cdda7
2d862046
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
5 deletions
+8
-5
src/cc/bpf_module.cc
src/cc/bpf_module.cc
+2
-1
src/cc/export/helpers.h
src/cc/export/helpers.h
+2
-2
src/cc/frontends/clang/loader.cc
src/cc/frontends/clang/loader.cc
+2
-0
tools/execsnoop.py
tools/execsnoop.py
+2
-2
No files found.
src/cc/bpf_module.cc
View file @
53da6727
...
...
@@ -345,7 +345,8 @@ int BPFModule::load_includes(const string &text) {
int
BPFModule
::
annotate
()
{
for
(
auto
fn
=
mod_
->
getFunctionList
().
begin
();
fn
!=
mod_
->
getFunctionList
().
end
();
++
fn
)
fn
->
addFnAttr
(
Attribute
::
AlwaysInline
);
if
(
!
fn
->
hasFnAttribute
(
Attribute
::
NoInline
))
fn
->
addFnAttr
(
Attribute
::
AlwaysInline
);
// separate module to hold the reader functions
auto
m
=
make_unique
<
Module
>
(
"sscanf"
,
*
ctx_
);
...
...
src/cc/export/helpers.h
View file @
53da6727
...
...
@@ -284,7 +284,7 @@ static inline void bpf_store_dword(void *skb, u64 off, u64 val) {
#define MASK(_n) ((_n) < 64 ? (1ull << (_n)) - 1 : ((u64)-1LL))
#define MASK128(_n) ((_n) < 128 ? ((unsigned __int128)1 << (_n)) - 1 : ((unsigned __int128)-1))
static unsigned int bpf_log2(unsigned int v)
static
inline
unsigned int bpf_log2(unsigned int v)
{
unsigned int r;
unsigned int shift;
...
...
@@ -297,7 +297,7 @@ static unsigned int bpf_log2(unsigned int v)
return r;
}
static unsigned int bpf_log2l(unsigned long v)
static
inline
unsigned int bpf_log2l(unsigned long v)
{
unsigned int hi = v >> 32;
if (hi)
...
...
src/cc/frontends/clang/loader.cc
View file @
53da6727
...
...
@@ -137,6 +137,8 @@ int ClangLoader::parse(unique_ptr<llvm::Module> *mod, unique_ptr<vector<TableDes
"-Wno-deprecated-declarations"
,
"-Wno-gnu-variable-sized-type-not-at-end"
,
"-fno-color-diagnostics"
,
"-fno-unwind-tables"
,
"-fno-asynchronous-unwind-tables"
,
"-x"
,
"c"
,
"-c"
,
abs_file
.
c_str
()});
KBuildHelper
kbuild_helper
(
kdir
,
kernel_path_info
.
first
);
...
...
tools/execsnoop.py
View file @
53da6727
...
...
@@ -197,9 +197,9 @@ def print_event(cpu, data, size):
if
args
.
timestamp
:
print
(
"%-8.3f"
%
(
time
.
time
()
-
start_ts
),
end
=
""
)
ppid
=
get_ppid
(
event
.
pid
)
print
(
"%-16s %-6s %-6s %3s %s"
%
(
event
.
comm
,
event
.
pid
,
print
(
"%-16s %-6s %-6s %3s %s"
%
(
event
.
comm
.
decode
()
,
event
.
pid
,
ppid
if
ppid
>
0
else
"?"
,
event
.
retval
,
' '
.
join
(
argv
[
event
.
pid
]
)))
b' '
.
join
(
argv
[
event
.
pid
]).
decode
(
)))
del
(
argv
[
event
.
pid
])
...
...
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