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
44c28bf9
Commit
44c28bf9
authored
Jun 27, 2018
by
Joe Yin
Committed by
yonghong-song
Jun 27, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Switch saddr/daddr to u32's within tools/tcpconnlat.py (#1859)
switch some fields from u64 to their natural size u32/u16
parent
c325d6dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
13 deletions
+13
-13
tools/tcpconnlat.py
tools/tcpconnlat.py
+13
-13
No files found.
tools/tcpconnlat.py
View file @
44c28bf9
...
...
@@ -74,7 +74,7 @@ bpf_text = """
struct info_t {
u64 ts;
u
64
pid;
u
32
pid;
char task[TASK_COMM_LEN];
};
BPF_HASH(start, struct sock *, struct info_t);
...
...
@@ -83,11 +83,11 @@ BPF_HASH(start, struct sock *, struct info_t);
struct ipv4_data_t {
// XXX: switch some to u32's when supported
u64 ts_us;
u
64
pid;
u
64
saddr;
u
64
daddr;
u
32
pid;
u
32
saddr;
u
32
daddr;
u64 ip;
u
64
dport;
u
16
dport;
u64 delta_us;
char task[TASK_COMM_LEN];
};
...
...
@@ -95,11 +95,11 @@ BPF_PERF_OUTPUT(ipv4_events);
struct ipv6_data_t {
u64 ts_us;
u
64
pid;
u
32
pid;
unsigned __int128 saddr;
unsigned __int128 daddr;
u64 ip;
u
64
dport;
u
16
dport;
u64 delta_us;
char task[TASK_COMM_LEN];
};
...
...
@@ -206,11 +206,11 @@ TASK_COMM_LEN = 16 # linux/sched.h
class
Data_ipv4
(
ct
.
Structure
):
_fields_
=
[
(
"ts_us"
,
ct
.
c_ulonglong
),
(
"pid"
,
ct
.
c_u
longlong
),
(
"saddr"
,
ct
.
c_u
longlong
),
(
"daddr"
,
ct
.
c_u
longlong
),
(
"pid"
,
ct
.
c_u
int
),
(
"saddr"
,
ct
.
c_u
int
),
(
"daddr"
,
ct
.
c_u
int
),
(
"ip"
,
ct
.
c_ulonglong
),
(
"dport"
,
ct
.
c_u
longlong
),
(
"dport"
,
ct
.
c_u
short
),
(
"delta_us"
,
ct
.
c_ulonglong
),
(
"task"
,
ct
.
c_char
*
TASK_COMM_LEN
)
]
...
...
@@ -218,11 +218,11 @@ class Data_ipv4(ct.Structure):
class
Data_ipv6
(
ct
.
Structure
):
_fields_
=
[
(
"ts_us"
,
ct
.
c_ulonglong
),
(
"pid"
,
ct
.
c_u
longlong
),
(
"pid"
,
ct
.
c_u
int
),
(
"saddr"
,
(
ct
.
c_ulonglong
*
2
)),
(
"daddr"
,
(
ct
.
c_ulonglong
*
2
)),
(
"ip"
,
ct
.
c_ulonglong
),
(
"dport"
,
ct
.
c_u
longlong
),
(
"dport"
,
ct
.
c_u
short
),
(
"delta_us"
,
ct
.
c_ulonglong
),
(
"task"
,
ct
.
c_char
*
TASK_COMM_LEN
)
]
...
...
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