public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Eugeniy Meshcheryakov <eugen@debian.org>
To: Indraneel Mukherjee <indro.ml@gmail.com>
Cc: systemtap@sources.redhat.com
Subject: Re: systemtap-1.0.0 runtime failure on ARM - simple stap script  translation fails
Date: Mon, 14 Dec 2009 07:09:00 -0000	[thread overview]
Message-ID: <20091214070934.GA5456@localhost.localdomain> (raw)
In-Reply-To: <48e37220912132155j7989f649r5cf719f49eb75ac6@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1984 bytes --]

Hello,

This bug was fixed yesterday in the git repository. You can build
systemtap from git repo, or use simple patch (attached).

Regards,
Eugeniy Meshcheryakov

14 грудня 2009 о 11:25 +0530 Indraneel Mukherjee написав(-ла):
> Hi,
> I'm getting the following runtime error on ARM when i try to execute a
> simple stap script. The error log is below.
> 
> [root@fedora-arm root]# stap -v test.stp
> Pass 1: parsed user script and 56 library script(s) in
> 6040usr/120sys/6210real ms.
> Pass 2: analyzed script: 1 probe(s), 11 function(s), 2 embed(s), 1
> global(s) in 5050usr/4610sys/13504real ms.
> Pass 3: translated to C into
> "/tmp/stapkharFx/stap_b865062b08e6d305fd52a1f8999b8bbf_4768.c" in
> 12590usr/1230sys/22308real ms.
> In file included from /root/stap/share/systemtap/runtime/runtime.h:124,
>                  from
> /tmp/stapkharFx/stap_b865062b08e6d305fd52a1f8999b8bbf_4768.c:51:
> /root/stap/share/systemtap/runtime/regs.c: In function '_stp_print_regs':
> /root/stap/share/systemtap/runtime/regs.c:270: error: implicit
> declaration of function 'condition_codes'
> make[1]: *** [/tmp/stapkharFx/stap_b865062b08e6d305fd52a1f8999b8bbf_4768.o]
> Error 1
> make: *** [_module_/tmp/stapkharFx] Error 2
> Pass 4: compiled C into
> "stap_b865062b08e6d305fd52a1f8999b8bbf_4768.ko" in
> 53690usr/9670sys/66343real ms.
> Pass 4: compilation failed.  Try again with another '--vp 0001' option.
> 
> 
> The Stap Script is a simple one:
> #! /usr/bin/env stap
> proble vfs.read {
> printf("Systemtap ARM test.\n");
> exit();
> }
> 
> SYSTEMTAP VERSION INFO:
> I'm using the Fedora ARM distro
> - systemtap-1.0.0
> - gcc (GCC) 4.4.2 20091019 (Red Hat 4.4.2-5)
> - elfutils-0.143-1.fc12.armv5tel
> 
> The build and run m/c is ARM(no cross instrumentation). Please let me
> know if more verbose logs are required.
> Googled without any meaningful pointers. Any pointers will be very helpful!!
> 
> TIA,
> Indro

[-- Attachment #1.2: arm-condition-codes.diff --]
[-- Type: text/x-diff, Size: 862 bytes --]

commit 958c58e8231563e9349e4d8ea56c04c25e1501c0
Author: Eugeniy Meshcheryakov <eugen@debian.org>
Date:   Sat Dec 12 00:56:36 2009 +0100

    Do not use condition_codes() on arm
    
    It does not exist in recent kernels.
    
    Use regs->ARM_cpsr instead, this should work with all versions
    of linux found in git repo (versions >=2.6.12-rc2). Difference
    between condition_codes() and regs->ARM_cpsr should not matter
    for systemtap.

diff --git a/runtime/regs.c b/runtime/regs.c
index e963aff..61f2f31 100644
--- a/runtime/regs.c
+++ b/runtime/regs.c
@@ -267,7 +267,7 @@ static const char *processor_modes[]=
 
 static void _stp_print_regs(struct pt_regs * regs)
 {
-	unsigned long flags = condition_codes(regs);
+	unsigned long flags = regs->ARM_cpsr;
 
 #ifdef CONFIG_SMP
 	_stp_printf(" CPU: %d", smp_processor_id());

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2009-12-14  7:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-14  5:55 Indraneel Mukherjee
2009-12-14  7:09 ` Eugeniy Meshcheryakov [this message]
2009-12-14  7:12   ` Eugeniy Meshcheryakov
2009-12-14 10:41     ` Indraneel Mukherjee
2009-12-14 11:00       ` Eugeniy Meshcheryakov
2009-12-14 12:25         ` Indraneel Mukherjee
2009-12-14 15:26           ` Eugeniy Meshcheryakov
2009-12-15 13:50           ` Eugeniy Meshcheryakov
2009-12-17  6:09             ` naresh kamboju

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091214070934.GA5456@localhost.localdomain \
    --to=eugen@debian.org \
    --cc=indro.ml@gmail.com \
    --cc=systemtap@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).