joelagnel / adeb

A debian-based shell environment designed for Android and adb
Apache License 2.0
319 stars 100 forks source link

biolatency biosnoop biotop bitesize no log output #14

Closed lipf1987 closed 6 years ago

lipf1987 commented 6 years ago

Hi I am trying to get adeb-BCC working on a arm64 android platform. linux kernel is 4.9 biolatency biosnoop biotop bitesize no log output

root@localhost:/usr/share/bcc/tools# ./bitesize

In file included from /virtual/main.c:3: In file included from include/linux/blkdev.h:14: include/linux/pagemap.h:556:16: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths] if (unlikely(put_user(0, uaddr) != 0)) ^ ./arch/arm64/include/asm/uaccess.h:340:2: note: expanded from macro '__put_user' put_user_err((x), (ptr), pu_err); \ ^ ./arch/arm64/include/asm/uaccess.h:328:38: note: expanded from macro 'put_user_err' put_user_asm("str", "sttr", "%", __pu_val, (ptr), \ ^ include/linux/pagemap.h:556:16: note: use constraint modifier "w" ./arch/arm64/include/asm/uaccess.h:340:2: note: expanded from macro 'put_user' put_user_err((x), (ptr), pu_err); \ ^ ./arch/arm64/include/asm/uaccess.h:328:34: note: expanded from macro 'put_user_err' put_user_asm("str", "sttr", "%", pu_val, (ptr), \ ^ In file included from /virtual/main.c:3: In file included from include/linux/blkdev.h:14: include/linux/pagemap.h:556:16: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths] if (unlikely(__put_user(0, uaddr) != 0)) ^ ./arch/arm64/include/asm/uaccess.h:340:2: note: expanded from macro 'put_user' put_user_err((x), (ptr), pu_err); \ ^ ./arch/arm64/include/asm/uaccess.h:328:38: note: expanded from macro 'put_user_err' put_user_asm("str", "sttr", "%", pu_val, (ptr), \ ^ include/linux/pagemap.h:556:16: note: use constraint modifier "w" ./arch/arm64/include/asm/uaccess.h:340:2: note: expanded from macro '__put_user' put_user_err((x), (ptr), pu_err); \ ^ ./arch/arm64/include/asm/uaccess.h:328:34: note: expanded from macro 'put_user_err' put_user_asm("str", "sttr", "%", __pu_val, (ptr), \ ^ In file included from /virtual/main.c:3: In file included from include/linux/blkdev.h:14: include/linux/pagemap.h:564:10: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths] return put_user(0, end); ^ ./arch/arm64/include/asm/uaccess.h:340:2: note: expanded from macro 'put_user' put_user_err((x), (ptr), pu_err); \ ^ ./arch/arm64/include/asm/uaccess.h:328:38: note: expanded from macro 'put_user_err' put_user_asm("str", "sttr", "%", pu_val, (ptr), \ ^ include/linux/pagemap.h:564:10: note: use constraint modifier "w" ./arch/arm64/include/asm/uaccess.h:340:2: note: expanded from macro 'put_user' put_user_err((x), (ptr), pu_err); \ ^ ./arch/arm64/include/asm/uaccess.h:328:34: note: expanded from macro 'put_user_err' put_user_asm("str", "sttr", "%", pu_val, (ptr), \ ^ In file included from /virtual/main.c:3: In file included from include/linux/blkdev.h:14: include/linux/pagemap.h:564:10: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths] return put_user(0, end); ^ ./arch/arm64/include/asm/uaccess.h:340:2: note: expanded from macro '__put_user' put_user_err((x), (ptr), pu_err); \ ^ ./arch/arm64/include/asm/uaccess.h:328:38: note: expanded from macro 'put_user_err' put_user_asm("str", "sttr", "%", __pu_val, (ptr), \ ^ include/linux/pagemap.h:564:10: note: use constraint modifier "w" ./arch/arm64/include/asm/uaccess.h:340:2: note: expanded from macro 'put_user' put_user_err((x), (ptr), pu_err); \ ^ ./arch/arm64/include/asm/uaccess.h:328:34: note: expanded from macro 'put_user_err' put_user_asm("str", "sttr", "%", __pu_val, (ptr), \ ^ 4 warnings generated.

Tracing... Hit Ctrl-C to end.

^Croot@localhost:/usr/share/bcc/tools#

Any suggestions? Thank you very much

joelagnel commented 6 years ago

Erick Could you take a look at this please? I'm ooo.

On Wed, Sep 5, 2018, 4:35 AM lipf1987 notifications@github.com wrote:

I am trying to get adeb-BCC working on a arm64 android platform. linux kernel is 4.9 biolatency biosnoop biotop bitesize no log output

root@localhost:/usr/share/bcc/tools# ./bitesize

In file included from /virtual/main.c:3: In file included from include/linux/blkdev.h:14: include/linux/pagemap.h:556:16: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths] if (unlikely(put_user(0, uaddr) != 0)) ^ ./arch/arm64/include/asm/uaccess.h:340:2: note: expanded from macro '__put_user' put_user_err((x), (ptr), pu_err); ^ ./arch/arm64/include/asm/uaccess.h:328:38: note: expanded from macro 'put_user_err' put_user_asm("str", "sttr", "%", __pu_val, (ptr), ^ include/linux/pagemap.h:556:16: note: use constraint modifier "w" ./arch/arm64/include/asm/uaccess.h:340:2: note: expanded from macro 'put_user' put_user_err((x), (ptr), pu_err); ^ ./arch/arm64/include/asm/uaccess.h:328:34: note: expanded from macro 'put_user_err' put_user_asm("str", "sttr", "%", pu_val, (ptr), ^ In file included from /virtual/main.c:3: In file included from include/linux/blkdev.h:14: include/linux/pagemap.h:556:16: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths] if (unlikely(__put_user(0, uaddr) != 0)) ^ ./arch/arm64/include/asm/uaccess.h:340:2: note: expanded from macro 'put_user' put_user_err((x), (ptr), pu_err); ^ ./arch/arm64/include/asm/uaccess.h:328:38: note: expanded from macro 'put_user_err' put_user_asm("str", "sttr", "%", pu_val, (ptr), ^ include/linux/pagemap.h:556:16: note: use constraint modifier "w" ./arch/arm64/include/asm/uaccess.h:340:2: note: expanded from macro '__put_user' put_user_err((x), (ptr), pu_err); ^ ./arch/arm64/include/asm/uaccess.h:328:34: note: expanded from macro 'put_user_err' put_user_asm("str", "sttr", "%", __pu_val, (ptr), ^ In file included from /virtual/main.c:3: In file included from include/linux/blkdev.h:14: include/linux/pagemap.h:564:10: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths] return put_user(0, end); ^ ./arch/arm64/include/asm/uaccess.h:340:2: note: expanded from macro 'put_user' put_user_err((x), (ptr), pu_err); ^ ./arch/arm64/include/asm/uaccess.h:328:38: note: expanded from macro 'put_user_err' put_user_asm("str", "sttr", "%", pu_val, (ptr), ^ include/linux/pagemap.h:564:10: note: use constraint modifier "w" ./arch/arm64/include/asm/uaccess.h:340:2: note: expanded from macro 'put_user' put_user_err((x), (ptr), pu_err); ^ ./arch/arm64/include/asm/uaccess.h:328:34: note: expanded from macro 'put_user_err' put_user_asm("str", "sttr", "%", pu_val, (ptr), ^ In file included from /virtual/main.c:3: In file included from include/linux/blkdev.h:14: include/linux/pagemap.h:564:10: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths] return put_user(0, end); ^ ./arch/arm64/include/asm/uaccess.h:340:2: note: expanded from macro '__put_user' put_user_err((x), (ptr), pu_err); ^ ./arch/arm64/include/asm/uaccess.h:328:38: note: expanded from macro 'put_user_err' put_user_asm("str", "sttr", "%", __pu_val, (ptr), ^ include/linux/pagemap.h:564:10: note: use constraint modifier "w" ./arch/arm64/include/asm/uaccess.h:340:2: note: expanded from macro 'put_user' put_user_err((x), (ptr), pu_err); ^ ./arch/arm64/include/asm/uaccess.h:328:34: note: expanded from macro 'put_user_err' put_user_asm("str", "sttr", "%", __pu_val, (ptr), ^ 4 warnings generated.

Tracing... Hit Ctrl-C to end.

^Croot@localhost:/usr/share/bcc/tools#

Any suggestions? Thank you very much

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/joelagnel/adeb/issues/14, or mute the thread https://github.com/notifications/unsubscribe-auth/AACSVM_F1fKwJyXbzG6ye7ETOP_kWyyRks5uX4zrgaJpZM4WabqM .

ErickReyesR commented 6 years ago

Hi,

The warnings on your console appear to indicate a problem with your kernel headers. We recently added the option to use pre-built headers for kernels 4.9 and 4.14 on arm64. Could you please try to prepare you device using: adeb prepare --full with no other options?

lipf1987 commented 6 years ago
Hi adeb prepare --full -------------- adeb: v0.99g

11:09:49 - INFO : Looking for device.. 11:09:49 - INFO : Preparing device... 11:09:49 - INFO : Doing a full install. 11:09:49 - INFO : 11:09:49 - INFO : Downloading Androdeb from the web... 11:09:49 - INFO : 11:09:49 - INFO : No repository URL provided in enviromnent. Attempting to auto-detect it 11:09:49 - INFO : Detected URL: github.com/joelagnel/adeb/ % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 610 0 610 0 0 376 0 --:--:-- 0:00:01 --:--:-- 377 100 295M 100 295M 0 0 1754k 0 0:02:52 0:02:52 --:--:-- 1307k Archive: /tmp/tmp.KiUIYmKTYc/androdeb-fs.tgz.zip inflating: /tmp/tmp.KiUIYmKTYc/androdeb-fs.tgz
11:09:43 - INFO : Kernel headers are needed but none were provided. Downloading pre-built headers % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 619 0 619 0 0 521 0 --:--:-- 0:00:01 --:--:-- 521 100 11.6M 100 11.6M 0 0 422k 0 0:00:28 0:00:28 --:--:-- 699k Archive: /tmp/tmp.KiUIYmKTYc/headers-arm64-4.9.tar.gz.zip inflating: /tmp/tmp.KiUIYmKTYc/headers-arm64-4.9.tar.gz
11:09:12 - INFO : Building updating kernel headers from supplied tar.gz (/tmp/tmp.KiUIYmKTYc/headers-arm64-4.9.tar.gz) 11:09:12 - INFO : Using archive at /tmp/tmp.KiUIYmKTYc/androdeb-fs.tgz for filesystem preparation 11:09:12 - INFO : Pushing filesystem to device.. 11:09:36 - INFO : Pushing addons to device.. 11:09:36 - INFO : Unpacking filesystem in device..

root@localhost:/# biosnoop WARNING: Linux version for eBPF program is being overridden with: 264475 WARNING: Due to this, the results of the program may be unpredictable TIME(s) COMM PID DISK T SECTOR BYTES LAT(ms)

^CTraceback (most recent call last): File "/usr/share/bcc/tools/biosnoop", line 189, in b.perf_buffer_poll() File "/usr/lib/python2.7/dist-packages/bcc/init.py", line 1216, in perf_buffer_poll lib.perf_reader_poll(len(readers), readers, timeout) KeyboardInterrupt root@localhost:/# but still no log out put.

lipf1987 commented 6 years ago

Hi ErickReyesR

Could you give me a patch how to fix the warnings on my console or any suggestions? Thank you very much

ErickReyesR commented 6 years ago

Hi,

The warnings you are seeing are normal when using the pre-built headers.

These tools rely on kprobes. I suspect something in your kernel is preventing kprobes from working. Could you share more details about your platform? (SoC and Kernel config file if possible).

lipf1987 commented 6 years ago

Hi ErickReyesR Thanks for your help. I know why no log out put, I did not config kprobes in my kernel. now it can work. I will close this issue.