public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "jkenisto at us dot ibm.com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug translator/18555] New: ppc64le: can't probe demangled C++ function names
Date: Wed, 17 Jun 2015 19:11:00 -0000	[thread overview]
Message-ID: <bug-18555-6586@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=18555

            Bug ID: 18555
           Summary: ppc64le: can't probe demangled C++ function names
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: jkenisto at us dot ibm.com
  Target Milestone: ---

I'm running stap 2.8/0.160 (built from a June 11 git snapshot) on RHEL7.1 in a
ppc64le VM.  In this configuration, stap fails the systemtap.base/cast-scope
tests.

In particular, stap seems able to probe mangled C++ function names (see ok.stp
below), but not demangled names (see bug.stp below).  I've seen this problem
with other C++ programs as well.

BTW, FWIW, a disassembly of a.out shows that the call to length() is NOT
inlined.

I don't see this problem on the same RHEL and stap versions on x86_64.

-bash-4.2# cat bug.cxx
#include <string>

size_t
length(const std::string& str)
{
    int res, r;
    r = str.length() * 2;
    res = r / 2;
    return res;
}

int
main()
{
    std::string hello = "Hello World!";
    return 12 != length(hello);
}
-bash-4.2# g++ -g bug.cxx
-bash-4.2# cat bug.stp
probe process.function("length")
{
        log("length() called")
}
-bash-4.2# stap bug.stp -c ./a.out
semantic error: while resolving probe point: identifier 'process' at
bug.stp:1:7
        source: probe process.function("length")
                      ^

semantic error: no match (similar functions: _init, main, _Z6lengthRKSs, _fini,
_start)

Pass 2: analysis failed.  [man error::pass2]
-bash-4.2# cat ok.stp
probe process.function("_Z6lengthRKSs")
{
        log("length() called")
}
-bash-4.2# stap ok.stp -c ./a.out
length() called
-bash-4.2# stap -V
Systemtap translator/driver (version 2.8/0.160, commit
release-2.7-194-g2be83613ebdc + changes)
Copyright (C) 2005-2015 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
enabled features: TR1_UNORDERED_MAP NLS
-bash-4.2#

-- 
You are receiving this mail because:
You are the assignee for the bug.

             reply	other threads:[~2015-06-17 19:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-17 19:11 jkenisto at us dot ibm.com [this message]
2015-06-17 19:14 ` [Bug translator/18555] " jkenisto at us dot ibm.com
2015-07-01 23:56 ` jkenisto at us dot ibm.com
2015-07-02  0:56 ` jistone at redhat dot com

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=bug-18555-6586@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sourceware.org \
    /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).