public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/18555] New: ppc64le: can't probe demangled C++ function names
@ 2015-06-17 19:11 jkenisto at us dot ibm.com
  2015-06-17 19:14 ` [Bug translator/18555] " jkenisto at us dot ibm.com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: jkenisto at us dot ibm.com @ 2015-06-17 19:11 UTC (permalink / raw)
  To: systemtap

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.

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

* [Bug translator/18555] ppc64le: can't probe demangled C++ function names
  2015-06-17 19:11 [Bug translator/18555] New: ppc64le: can't probe demangled C++ function names jkenisto at us dot ibm.com
@ 2015-06-17 19:14 ` 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
  2 siblings, 0 replies; 4+ messages in thread
From: jkenisto at us dot ibm.com @ 2015-06-17 19:14 UTC (permalink / raw)
  To: systemtap

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

--- Comment #1 from Jim Keniston <jkenisto at us dot ibm.com> ---
Others here saw the same problem after applying this patch --
https://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=commitdiff;h=b4c6a4b1cd00fd1681d76de6850a88aa516c4fef
-- to stap v2.6.

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

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

* [Bug translator/18555] ppc64le: can't probe demangled C++ function names
  2015-06-17 19:11 [Bug translator/18555] New: ppc64le: can't probe demangled C++ function names jkenisto at us dot ibm.com
  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
  2 siblings, 0 replies; 4+ messages in thread
From: jkenisto at us dot ibm.com @ 2015-07-01 23:56 UTC (permalink / raw)
  To: systemtap

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

--- Comment #2 from Jim Keniston <jkenisto at us dot ibm.com> ---
With stap v2.8 (from https://sourceware.org/systemtap/ftp/releases/) on ppc64,
this passes.  I haven't tried stap v2.8 + ppc64le.

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

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

* [Bug translator/18555] ppc64le: can't probe demangled C++ function names
  2015-06-17 19:11 [Bug translator/18555] New: ppc64le: can't probe demangled C++ function names jkenisto at us dot ibm.com
  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
  2 siblings, 0 replies; 4+ messages in thread
From: jistone at redhat dot com @ 2015-07-02  0:56 UTC (permalink / raw)
  To: systemtap

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

Josh Stone <jistone at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |jistone at redhat dot com
           Assignee|systemtap at sourceware dot org    |jistone at redhat dot com

--- Comment #3 from Josh Stone <jistone at redhat dot com> ---
Aha!  I was just looking at the same problem in a different bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=1237098

I have a patch posted there.  I tried it on your input too, and it looks good
now.

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

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

end of thread, other threads:[~2015-07-02  0:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-17 19:11 [Bug translator/18555] New: ppc64le: can't probe demangled C++ function names jkenisto at us dot ibm.com
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

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).