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


On 08/30/2011 12:48 PM, Yao,Yanjun wrote:
> Thank you for your reply.
> 
> 2011/8/30 Josh Stone <jistone@redhat.com>:
>> On 08/30/2011 12:10 PM, Yao,Yanjun wrote:
>>> Hi all,
>>>
>>> I tried enable SystemTap on Android, however, after I finished all the
>>> set up, no matter what I tried to run, I always get a "stap: 57:
>>> Syntax error: "(" unexpected" error.
>>
>> That's an odd error - can you provide more context?  What command line
>> are you running, and what is the full output from it?
>>
> 
> The following is the commands and the output:
> # ./stap syscalls_by_pid.stp -c "sleep 0.2"
> ./stap: 57: Syntax error: "(" unexpected
> 
> The syscalls_by_pid.stp is the example provided in
> http://sourceware.org/systemtap/examples/

This is still strange.  That example only has 28 lines, and as far as I
can see there isn't any place in stap where we print any error of the
form "Syntax error: ...".

To me this looks like a bash shell error, as if ./stap were a script.
Do you have some kind of wrapper in use?

It may also help to try with a few verbose flags, -vvvv

>> Why are you invoking staprun with the wireless driver module?  This is
>> meant to be invoked with a .ko that was compiled by stap.  If you
>> happened to name your stap module with "-m bcm4329", then that's an
>> issue, as it must be unique from the kernel's own modules.
>>
> 
> I followed the instructions in http://omappedia.org/wiki/Systemtap. It
> said I need to copy kernel modules on the target, and launch them
> through staprun. So I find the .ko file in the Android Source. May I
> ask what the .ko file should be? This is the only file I can find in
> both Android Source and the systemtap folders. I even tried to find a
> .ko file in adb shell, but found nothing.

I see.  I believe that wiki page means that you should cross-compile
your systemtap script on the host machine, as described here:
  http://omappedia.org/wiki/Systemtap#Systemtap_Scripts_compilation

Then copy *that* resulting .ko file to your Android device, and that's
the file path that you should give to staprun.


Josh


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