This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Met Problem on Enable SystemTap on Android


Hi all,

I met a very weird problem during the cross compiling. The followings
are what I did:
1. Downloaded android source and android kernel.
2. Configure the kernel flags in "make ARCH=arm menuconfig", then
modify ptrace.h as required. Compile the kernel code.
3. Download and compile systemtap v1.5. Install both
systemtap-1.5-ubuntu and systemtap-1.5-macharm
4. Cross compile to get .ko file by running command:
   ./stap -gv -a arm –D OMAP_L27 -B
CROSS_COMPILE=arm-none-linux-gnueabi- -r ~/WORKING_DIRECTORY/kernel -I
~/systemtap-1.5-macharm/share/systemtap/tapset/ -R
~/systemtap-1.5-macharm/share/systemtap/runtime/ -m syscall_pid
~/Downloads/syscalls_by_pid.stp

However, I got the following output:
WARNING: kernel release/architecture mismatch with host forces last-pass 4.
Input file '–D' is empty or missing.
Pass 1: parsed user script and 144 library script(s) using
74844virt/38848res/2148shr kb, in 170usr/0sys/171real ms.
Pass 1: parse failed.  Try again with another '--vp 1' option.

I tried to replace OMAP_L27 with OMAP_L23, OMAP_L24 and OMAP_L25, but
none of them works. I also tried to use the "--vp 1", the output is as
following:
WARNING: kernel release/architecture mismatch with host forces last-pass 4.
Input file '–D' is empty or missing.
Searched: " /data/systemtap-1.5-ubuntu/share/systemtap/tapset/*.stp ",
found: 72, processed: 72
Searched: " /data/systemtap-1.5-macharm/share/systemtap/tapset/*.stp
", found: 72, processed: 72
Pass 1: parsed user script and 144 library script(s) using
74844virt/38848res/2152shr kb, in 170usr/20sys/298real ms.
Pass 1: parse failed.  Try again with another '--vp 1' option.
Running rm -rf /tmp/stapli6Rvl
Spawn waitpid result (0x0): 0

I thought the OMAP_Lxx is something default on ubuntu, such that I do
not need to install it explicitly. Maybe I am wrong ...

Does anyone have any idea about why this is happening, and how to fix it?

Thank you very much.

Yours
Sincerely


2011/8/31 Josh Stone <jistone@redhat.com>:
> On 08/31/2011 02:05 AM, Turgis, Frederic wrote:
>> Here are recommendations to make it work. OMAP wiki page assumes
>> some knowledge of systemtap. I will by the way update the wiki with
>> some of the remarks below:
>
> Thanks Fred.
>
>> - Josh: I will clarify -R/-I on the wiki. We did that because our IT
>> forces use of /home/$USER folder, still 1 developer compiles the tool
>> for many others. So tool is hard-coded to /home/developer1 while it
>> is stored in /home/developer2. And we add a temporary
>> LD_LIBRARY_PATH. We never really looked for cleaner solution to
>> exchange binaries.
>
> I see. ?It makes more sense, if there's no common place you can install.
>
> One problem with -I is that it *appends* to the normal tapset path. ?So
> if for some reason the default path happens to be accessible too, you'll
> like get strange behavior from the duplication. ?You can more properly
> override it with the SYSTEMTAP_TAPSET environment.
>
> -R should do the right thing, but there is also SYSTEMTAP_RUNTIME.
>
>> Summary of what I do on my side:
>> - desktop PC: get kernel code, configure right features and compile
>> - desktop PC: compile the host and target tool. Copy target tool on target
>> - desktop PC: edit my .stp then ./stap -a arm xxx.stp. Copy resulting .ko on target
>> - target: ./staprun xxx.ko > yyy/zzz.txt (you can use -o yyy/zzz.txt also)
>
> BTW, if you happen to have ssh listening on the target, then you may be
> able to use "--remote $TARGET" to automate the copy and staprun. ?I'm
> considering adding a new remote scheme, perhaps "--remote adb:..." to
> let you do this over the Android debugging channel too.
>
> Josh
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]