public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* ARM, SystemTap, userspace probing, and hardware assisted virtualization
@ 2013-09-10 20:08 William Cohen
  2013-09-16 19:49 ` William Cohen
  0 siblings, 1 reply; 2+ messages in thread
From: William Cohen @ 2013-09-10 20:08 UTC (permalink / raw)
  To: systemtap

Last week Frank mentioned there were some patches for uprobes on ARM (https://blueprints.launchpad.net/linux-linaro/+spec/arm-uprobes).  I have taken a look at the patches and built a local kernel for my Samsung Chromebook that included those patches.  I thought this is cool!  These allow probing user-space applications on ARM. But then the question was "What would be an interesting user-space application to probe?"  Then I thought about another new feature that is available on ARM, kvm hardware acceleration for virtualization.  With some more tweaking of the 3.11 kernel I was able to get a kernel that supports KVM on arm. I also needed very new versions of elfutils, qemu, and systemtap rpms installed on the machine.

With the host set up I was able to set up a guest Fedora 18 vm based on the instructions at https://fedoraproject.org/wiki/Architectures/ARM/F18/Versatile_Express.  With this guest vm running I can run the qemu_count.stp example.  Things are not perfect (some args locations can't be parsed), but at least to the point of getting some interesting information on ARM:

[wcohen@chromebook-f19 testsuite]$ rpm -q qemu elfutils systemtapqemu-1.6.0-5.fc19.armv7hl
elfutils-0.156-5.fc19.armv7hl
systemtap-2.4-1.fc19.armv7hl
[wcohen@chromebook-f19 testsuite]$ uname -a
Linux chromebook-f19 3.11.0kvm-00011-gb393c6f #2 SMP Mon Sep 9 17:25:40 EDT 2013 armv7l armv7l armv7l GNU/Linux
[wcohen@chromebook-f19 testsuite]$ stap -v systemtap.examples/virtualization/qemu_count.stp 
Pass 1: parsed user script and 155 library script(s) using 134036virt/119520res/2556shr/120116data kb, in 5570usr/390sys/7532real ms.
WARNING: Can't parse SDT_V3 operand 'r10': identifier '$arg3' at /usr/share/systemtap/tapset/qemu-system-alpha.stp:310:9
 source:   ret = $arg3;
                 ^
WARNING: Can't parse SDT_V3 operand '[r4]': identifier '$arg4' at :102:17
 source:   format_name = $arg4;
                         ^
WARNING: Can't parse SDT_V3 operand '[r2]': identifier '$arg2' at :4238:10
 source:   name = $arg2;
                  ^
WARNING: Can't parse SDT_V3 operand '[r1]': identifier '$arg2' at :4243:10
 source:   name = $arg2;
                  ^
WARNING: Can't parse SDT_V3 operand '[sp]': identifier '$arg1' at :3638:9
 source:   mon = $arg1;
                 ^
WARNING: Can't parse SDT_V3 operand '[r7]': identifier '$arg1' at :3443:11
 source:   iscsi = $arg1;
                   ^
WARNING: Can't parse SDT_V3 operand '[r6]': identifier '$arg1' at :2714:9
 source:   cmd = $arg1;
                 ^
WARNING: Can't parse SDT_V3 operand '[r8]': identifier '$arg1' at :2746:9
 source:   cmd = $arg1;
                 ^
WARNING: Can't parse SDT_V3 operand '[r5]': identifier '$arg1' at :2781:9
 source:   cmd = $arg1;
                 ^
WARNING: Can't parse SDT_V3 operand '[ip]': identifier '$arg1' at :2763:9
 source:   cmd = $arg1;
                 ^
WARNING: Can't parse SDT_V3 operand '[r0]': identifier '$arg1' at :2704:9
 source:   cmd = $arg1;
                 ^
WARNING: Can't parse SDT_V3 operand '[r10, #196]': identifier '$arg3' at :280:15
 source:   in_flight = $arg3;
                       ^
WARNING: Can't parse SDT_V3 operand '[r3]': identifier '$arg3' at :1033:9
 source:   nxt = $arg3;
                 ^
WARNING: Can't parse SDT_V3 operand '[r10, #56]': identifier '$arg5' at :1753:12
 source:   length = $arg5;
                    ^
WARNING: Can't parse SDT_V3 operand '[r10, #52]': identifier '$arg4' at :1752:12
 source:   status = $arg4;
                    ^
WARNING: Can't parse SDT_V3 operand '[r10, #36]': identifier '$arg6' at :1745:10
 source:   size = $arg6;
                  ^
WARNING: Can't parse SDT_V3 operand '[r10, #60]': identifier '$arg1' at :963:9
 source:   bus = $arg1;
                 ^
WARNING: Can't parse SDT_V3 operand '[r10, #4]': identifier '$arg1' at :3742:9
 source:   tag = $arg1;
                 ^
WARNING: Can't parse SDT_V3 operand '[r10, #6]': identifier '$arg2' at :3743:8
 source:   id = $arg2;
                ^
Pass 2: analyzed script: 14518 probe(s), 1 function(s), 2 embed(s), 1 global(s) using 587232virt/563912res/5128shr/563756data kb, in 40300usr/4690sys/59483real ms.
Pass 3: using cached /home/wcohen/.systemtap/cache/d1/stap_d1c63eb2fc55869b856116eb5f46dfad_2482326.c
Pass 4: using cached /home/wcohen/.systemtap/cache/d1/stap_d1c63eb2fc55869b856116eb5f46dfad_2482326.ko
Pass 5: starting run.
^Cqemu.system.arm.bdrv_co_io_em = 37733
qemu.system.arm.bdrv_co_readv = 13160
qemu.system.arm.bdrv_co_writev = 24573
qemu.system.arm.kvm_run_exit = 5908038
qemu.system.arm.kvm_vcpu_ioctl = 5908037
qemu.system.arm.kvm_vm_ioctl = 499559
qemu.system.arm.memory_region_ops_read = 2481865
qemu.system.arm.memory_region_ops_write = 3426173
qemu.system.arm.object_dynamic_cast_assert = 499559
qemu.system.arm.paio_submit = 37733
qemu.system.arm.qemu_co_queue_run_restart = 113199
qemu.system.arm.qemu_coroutine_enter = 75466
qemu.system.arm.qemu_coroutine_terminate = 37733
qemu.system.arm.qemu_coroutine_yield = 37733
qemu.system.arm.thread_pool_complete = 37733
qemu.system.arm.thread_pool_submit = 37733
Pass 5: run completed in 20usr/140sys/190875real ms.

-Will

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: ARM, SystemTap, userspace probing, and hardware assisted virtualization
  2013-09-10 20:08 ARM, SystemTap, userspace probing, and hardware assisted virtualization William Cohen
@ 2013-09-16 19:49 ` William Cohen
  0 siblings, 0 replies; 2+ messages in thread
From: William Cohen @ 2013-09-16 19:49 UTC (permalink / raw)
  To: systemtap

On 09/10/2013 04:08 PM, William Cohen wrote:
> Last week Frank mentioned there were some patches for uprobes on ARM (https://blueprints.launchpad.net/linux-linaro/+spec/arm-uprobes).  I have taken a look at the patches and built a local kernel for my Samsung Chromebook that included those patches.  I thought this is cool!  These allow probing user-space applications on ARM. But then the question was "What would be an interesting user-space application to probe?"  Then I thought about another new feature that is available on ARM, kvm hardware acceleration for virtualization.  With some more tweaking of the 3.11 kernel I was able to get a kernel that supports KVM on arm. I also needed very new versions of elfutils, qemu, and systemtap rpms installed on the machine.
> 
> With the host set up I was able to set up a guest Fedora 18 vm based on the instructions at https://fedoraproject.org/wiki/Architectures/ARM/F18/Versatile_Express.  With this guest vm running I can run the qemu_count.stp example.  Things are not perfect (some args locations can't be parsed), but at least to the point of getting some interesting information on ARM:

A bit more playing around with hardware virtuatlization acceleration on arm.  I got a stock fedora 19 image guest image set up on the chromebook.  The kvm support is working well enough to build systemtap and test  systemtap within the guest.  The results look pretty respectable. This is the stock fedora arm 3.9.5-301.fc19.armv7hl kernel that doesn't support uprobes and a older elfutils that may not find argument in some cases (https://admin.fedoraproject.org/updates/FEDORA-2013-15993/elfutils-0.156-5.fc19?_csrf_token=5628cac0c8d25fdcd58f68f73a4cc019fcd0439c).


		=== systemtap Summary ===

# of expected passes		1744
# of unexpected failures	85
# of expected failures		280
# of known failures		10
# of untested testcases		367
# of unsupported tests		12

More detailed breakdown of the results are at:


https://web.elastic.org/~dejazilla/viewsummary.php?summary=%3D%27%3C52375620.5080708%40redhat.com%3E%27

-Will

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-16 19:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-10 20:08 ARM, SystemTap, userspace probing, and hardware assisted virtualization William Cohen
2013-09-16 19:49 ` William Cohen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).