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
72c20c1c
Commit
72c20c1c
authored
Nov 29, 2016
by
Brenden Blanco
Committed by
GitHub
Nov 29, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #821 from palmtenor/adjust_headers
Improve the structure of exception related header files
parents
b06d97c1
3b4e31f0
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
19 additions
and
20 deletions
+19
-20
src/cc/BPF.cc
src/cc/BPF.cc
+1
-2
src/cc/BPF.h
src/cc/BPF.h
+1
-1
src/cc/BPFTable.cc
src/cc/BPFTable.cc
+1
-2
src/cc/BPFTable.h
src/cc/BPFTable.h
+1
-1
src/cc/CMakeLists.txt
src/cc/CMakeLists.txt
+1
-1
src/cc/bcc_exception.h
src/cc/bcc_exception.h
+7
-5
src/cc/bpf_module.cc
src/cc/bpf_module.cc
+1
-1
src/cc/common.h
src/cc/common.h
+0
-2
src/cc/frontends/b/codegen_llvm.cc
src/cc/frontends/b/codegen_llvm.cc
+1
-1
src/cc/frontends/b/node.h
src/cc/frontends/b/node.h
+1
-0
src/cc/frontends/b/parser.cc
src/cc/frontends/b/parser.cc
+1
-1
src/cc/frontends/b/printer.cc
src/cc/frontends/b/printer.cc
+1
-1
src/cc/frontends/b/type_check.cc
src/cc/frontends/b/type_check.cc
+1
-1
src/cc/frontends/clang/loader.cc
src/cc/frontends/clang/loader.cc
+1
-1
No files found.
src/cc/BPF.cc
View file @
72c20c1c
...
@@ -23,10 +23,9 @@
...
@@ -23,10 +23,9 @@
#include <sstream>
#include <sstream>
#include <vector>
#include <vector>
#include "bcc_exception.h"
#include "bcc_syms.h"
#include "bcc_syms.h"
#include "bpf_module.h"
#include "bpf_module.h"
#include "common.h"
#include "exception.h"
#include "libbpf.h"
#include "libbpf.h"
#include "perf_reader.h"
#include "perf_reader.h"
...
...
src/cc/BPF.h
View file @
72c20c1c
...
@@ -21,9 +21,9 @@
...
@@ -21,9 +21,9 @@
#include <string>
#include <string>
#include "BPFTable.h"
#include "BPFTable.h"
#include "bcc_exception.h"
#include "bcc_syms.h"
#include "bcc_syms.h"
#include "bpf_module.h"
#include "bpf_module.h"
#include "common.h"
#include "compat/linux/bpf.h"
#include "compat/linux/bpf.h"
#include "libbpf.h"
#include "libbpf.h"
...
...
src/cc/BPFTable.cc
View file @
72c20c1c
...
@@ -21,9 +21,8 @@
...
@@ -21,9 +21,8 @@
#include "BPFTable.h"
#include "BPFTable.h"
#include "bcc_exception.h"
#include "bcc_syms.h"
#include "bcc_syms.h"
#include "common.h"
#include "exception.h"
#include "libbpf.h"
#include "libbpf.h"
#include "perf_reader.h"
#include "perf_reader.h"
...
...
src/cc/BPFTable.h
View file @
72c20c1c
...
@@ -23,8 +23,8 @@
...
@@ -23,8 +23,8 @@
#include <utility>
#include <utility>
#include <vector>
#include <vector>
#include "bcc_exception.h"
#include "bpf_module.h"
#include "bpf_module.h"
#include "common.h"
#include "libbpf.h"
#include "libbpf.h"
#include "perf_reader.h"
#include "perf_reader.h"
...
...
src/cc/CMakeLists.txt
View file @
72c20c1c
...
@@ -63,7 +63,7 @@ target_link_libraries(bcc-static b_frontend clang_frontend bcc-loader-static ${c
...
@@ -63,7 +63,7 @@ target_link_libraries(bcc-static b_frontend clang_frontend bcc-loader-static ${c
install
(
TARGETS bcc-shared LIBRARY COMPONENT libbcc
install
(
TARGETS bcc-shared LIBRARY COMPONENT libbcc
DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
)
DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
)
install
(
FILES bpf_common.h bpf_module.h bcc_syms.h
common.h
exception.h libbpf.h perf_reader.h BPF.h BPFTable.h COMPONENT libbcc
install
(
FILES bpf_common.h bpf_module.h bcc_syms.h
bcc_
exception.h libbpf.h perf_reader.h BPF.h BPFTable.h COMPONENT libbcc
DESTINATION include/bcc
)
DESTINATION include/bcc
)
install
(
DIRECTORY compat/linux/ COMPONENT libbcc
install
(
DIRECTORY compat/linux/ COMPONENT libbcc
DESTINATION include/bcc/compat/linux
DESTINATION include/bcc/compat/linux
...
...
src/cc/exception.h
→
src/cc/
bcc_
exception.h
View file @
72c20c1c
...
@@ -26,24 +26,26 @@
...
@@ -26,24 +26,26 @@
namespace
ebpf
{
namespace
ebpf
{
typedef
std
::
tuple
<
int
,
std
::
string
>
StatusTuple
;
template
<
typename
...
Args
>
template
<
typename
...
Args
>
std
::
tuple
<
int
,
std
::
string
>
mkstatus
(
int
ret
,
const
char
*
fmt
,
Args
...
args
)
{
StatusTuple
mkstatus
(
int
ret
,
const
char
*
fmt
,
Args
...
args
)
{
char
buf
[
1024
];
char
buf
[
1024
];
snprintf
(
buf
,
sizeof
(
buf
),
fmt
,
args
...);
snprintf
(
buf
,
sizeof
(
buf
),
fmt
,
args
...);
return
std
::
make_tuple
(
ret
,
std
::
string
(
buf
));
return
std
::
make_tuple
(
ret
,
std
::
string
(
buf
));
}
}
static
inline
std
::
tuple
<
int
,
std
::
string
>
mkstatus
(
int
ret
,
const
char
*
msg
)
{
static
inline
StatusTuple
mkstatus
(
int
ret
,
const
char
*
msg
)
{
return
std
::
make_tuple
(
ret
,
std
::
string
(
msg
));
return
std
::
make_tuple
(
ret
,
std
::
string
(
msg
));
}
}
static
inline
std
::
tuple
<
int
,
std
::
string
>
mkstatus
(
static
inline
StatusTuple
mkstatus
(
int
ret
,
const
std
::
string
&
msg
int
ret
,
const
std
::
string
&
msg
)
{
)
{
return
std
::
make_tuple
(
ret
,
msg
);
return
std
::
make_tuple
(
ret
,
msg
);
}
}
static
inline
std
::
tuple
<
int
,
std
::
string
>
mkstatus
(
int
ret
)
{
static
inline
StatusTuple
mkstatus
(
int
ret
)
{
return
std
::
make_tuple
(
ret
,
std
::
string
());
return
std
::
make_tuple
(
ret
,
std
::
string
());
}
}
...
@@ -57,7 +59,7 @@ static inline std::tuple<int, std::string> mkstatus(int ret) {
...
@@ -57,7 +59,7 @@ static inline std::tuple<int, std::string> mkstatus(int ret) {
#define TRY2(CMD) \
#define TRY2(CMD) \
do { \
do { \
std::tuple<int, std::string>
__stp = (CMD); \
StatusTuple
__stp = (CMD); \
if (std::get<0>(__stp) != 0) { \
if (std::get<0>(__stp) != 0) { \
return __stp; \
return __stp; \
} \
} \
...
...
src/cc/bpf_module.cc
View file @
72c20c1c
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
#include <llvm/Transforms/IPO/PassManagerBuilder.h>
#include <llvm/Transforms/IPO/PassManagerBuilder.h>
#include <llvm-c/Transforms/IPO.h>
#include <llvm-c/Transforms/IPO.h>
#include "exception.h"
#include "
bcc_
exception.h"
#include "frontends/b/loader.h"
#include "frontends/b/loader.h"
#include "frontends/clang/loader.h"
#include "frontends/clang/loader.h"
#include "frontends/clang/b_frontend_action.h"
#include "frontends/clang/b_frontend_action.h"
...
...
src/cc/common.h
View file @
72c20c1c
...
@@ -28,6 +28,4 @@ make_unique(Args &&... args) {
...
@@ -28,6 +28,4 @@ make_unique(Args &&... args) {
return
std
::
unique_ptr
<
T
>
(
new
T
(
std
::
forward
<
Args
>
(
args
)...));
return
std
::
unique_ptr
<
T
>
(
new
T
(
std
::
forward
<
Args
>
(
args
)...));
}
}
typedef
std
::
tuple
<
int
,
std
::
string
>
StatusTuple
;
}
// namespace ebpf
}
// namespace ebpf
src/cc/frontends/b/codegen_llvm.cc
View file @
72c20c1c
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
#include <llvm/IR/LLVMContext.h>
#include <llvm/IR/LLVMContext.h>
#include <llvm/IR/Module.h>
#include <llvm/IR/Module.h>
#include "exception.h"
#include "
bcc_
exception.h"
#include "codegen_llvm.h"
#include "codegen_llvm.h"
#include "lexer.h"
#include "lexer.h"
#include "table_desc.h"
#include "table_desc.h"
...
...
src/cc/frontends/b/node.h
View file @
72c20c1c
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#include <stdint.h>
#include <stdint.h>
#include "common.h"
#include "common.h"
#include "bcc_exception.h"
#include "scope.h"
#include "scope.h"
#define REVISION_MASK 0xfff
#define REVISION_MASK 0xfff
...
...
src/cc/frontends/b/parser.cc
View file @
72c20c1c
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
#include <algorithm>
#include <algorithm>
#include <assert.h>
#include <assert.h>
#include "exception.h"
#include "
bcc_
exception.h"
#include "parser.h"
#include "parser.h"
#include "type_helper.h"
#include "type_helper.h"
...
...
src/cc/frontends/b/printer.cc
View file @
72c20c1c
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
#include "printer.h"
#include "printer.h"
#include "lexer.h"
#include "lexer.h"
#include "exception.h"
#include "
bcc_
exception.h"
namespace
ebpf
{
namespace
ebpf
{
namespace
cc
{
namespace
cc
{
...
...
src/cc/frontends/b/type_check.cc
View file @
72c20c1c
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
#include <set>
#include <set>
#include <algorithm>
#include <algorithm>
#include "exception.h"
#include "
bcc_
exception.h"
#include "type_check.h"
#include "type_check.h"
#include "lexer.h"
#include "lexer.h"
...
...
src/cc/frontends/clang/loader.cc
View file @
72c20c1c
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
#include <llvm/IR/Module.h>
#include <llvm/IR/Module.h>
#include "common.h"
#include "common.h"
#include "exception.h"
#include "
bcc_
exception.h"
#include "exported_files.h"
#include "exported_files.h"
#include "kbuild_helper.h"
#include "kbuild_helper.h"
#include "b_frontend_action.h"
#include "b_frontend_action.h"
...
...
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