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
fab43ed9
Commit
fab43ed9
authored
Oct 28, 2017
by
4ast
Committed by
GitHub
Oct 28, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1417 from iovisor/yhs_dev
bpf: make test py_test_tools_smoke pass on arm64
parents
740c4074
eb6ddc0e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
3 deletions
+12
-3
src/cc/export/helpers.h
src/cc/export/helpers.h
+1
-0
tools/lib/ucalls.py
tools/lib/ucalls.py
+1
-1
tools/memleak.py
tools/memleak.py
+2
-0
tools/wakeuptime.py
tools/wakeuptime.py
+8
-2
No files found.
src/cc/export/helpers.h
View file @
fab43ed9
...
...
@@ -566,6 +566,7 @@ int bpf_usdt_readarg_p(int argc, struct pt_regs *ctx, void *buf, u64 len) asm("l
#define PT_REGS_PARM4(ctx) ((ctx)->cx)
#define PT_REGS_PARM5(ctx) ((ctx)->r8)
#define PT_REGS_PARM6(ctx) ((ctx)->r9)
#define PT_REGS_FP(ctx) ((ctx)->bp) /* Works only with CONFIG_FRAME_POINTER */
#define PT_REGS_RC(ctx) ((ctx)->ax)
#define PT_REGS_IP(ctx) ((ctx)->ip)
#define PT_REGS_SP(ctx) ((ctx)->sp)
...
...
tools/lib/ucalls.py
View file @
fab43ed9
...
...
@@ -185,7 +185,7 @@ int trace_return(struct pt_regs *ctx) {
#ifdef SYSCALLS
int syscall_entry(struct pt_regs *ctx) {
u64 pid = bpf_get_current_pid_tgid();
u64 *valp, ip =
ctx->ip
, val = 0;
u64 *valp, ip =
PT_REGS_IP(ctx)
, val = 0;
PID_FILTER
#ifdef LATENCY
struct syscall_entry_t data = {};
...
...
tools/memleak.py
View file @
fab43ed9
...
...
@@ -14,6 +14,7 @@
from
bcc
import
BPF
from
time
import
sleep
from
datetime
import
datetime
import
resource
import
argparse
import
subprocess
import
os
...
...
@@ -366,6 +367,7 @@ if kernel_trace:
bpf_source
=
bpf_source
.
replace
(
"SHOULD_PRINT"
,
"1"
if
trace_all
else
"0"
)
bpf_source
=
bpf_source
.
replace
(
"SAMPLE_EVERY_N"
,
str
(
sample_every_n
))
bpf_source
=
bpf_source
.
replace
(
"PAGE_SIZE"
,
str
(
resource
.
getpagesize
()))
size_filter
=
""
if
min_size
is
not
None
and
max_size
is
not
None
:
...
...
tools/wakeuptime.py
View file @
fab43ed9
...
...
@@ -76,13 +76,19 @@ BPF_HASH(start, u32);
static u64 get_frame(u64 *bp) {
if (*bp) {
// The following stack walker is x86_64 specific
// The following stack walker is x86_64
/arm64
specific
u64 ret = 0;
if (bpf_probe_read(&ret, sizeof(ret), (void *)(*bp+8)))
return 0;
if (bpf_probe_read(bp, sizeof(*bp), (void *)*bp))
return 0;
#ifdef __x86_64__
if (ret < __START_KERNEL_map)
#elif __aarch64__
if (ret < VA_START)
#else
#error "Unsupported architecture for stack walker"
#endif
return 0;
return ret;
}
...
...
@@ -121,7 +127,7 @@ int waker(struct pt_regs *ctx, struct task_struct *p) {
bpf_probe_read(&key.target, sizeof(key.target), p->comm);
bpf_get_current_comm(&key.waker, sizeof(key.waker));
bp =
ctx->bp
;
bp =
PT_REGS_FP(ctx)
;
// unrolled loop (MAXDEPTH):
if (!(key.ret[depth++] = get_frame(&bp))) goto out;
...
...
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