public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug tapsets/18769] New: [ppc64BE/--dyninst] unknown operator @__compat_task
@ 2015-08-04  8:03 mcermak at redhat dot com
  2015-08-04 11:20 ` [Bug tapsets/18769] " mcermak at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: mcermak at redhat dot com @ 2015-08-04  8:03 UTC (permalink / raw)
  To: systemtap

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

            Bug ID: 18769
           Summary: [ppc64BE/--dyninst] unknown operator @__compat_task
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tapsets
          Assignee: systemtap at sourceware dot org
          Reporter: mcermak at redhat dot com
  Target Milestone: ---

Commit 7a563a0 added @__compat_task macro to
/usr/share/systemtap/tapset/powerpc/registers.stp. The commit is correct, but
it causes couple of failures in --dyninst mode on rhel7 ppc64. Thing is that in
dyninst mode /usr/share/systemtap/tapset/linux/syscalls.stpm, which defines
that macro, isn't being parsed.

This doesn't happen on x86_64, since this macro isn't used within
/root/mcermak-systemtap/systemtap-build/share/systemtap/tapset/x86_64/registers.stp
(but should be).

What solves the issue for me is symlinking syscalls.stpm to the ../dyninst
directory.

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

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

* [Bug tapsets/18769] [ppc64BE/--dyninst] unknown operator @__compat_task
  2015-08-04  8:03 [Bug tapsets/18769] New: [ppc64BE/--dyninst] unknown operator @__compat_task mcermak at redhat dot com
@ 2015-08-04 11:20 ` mcermak at redhat dot com
  2015-08-04 11:46 ` mcermak at redhat dot com
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: mcermak at redhat dot com @ 2015-08-04 11:20 UTC (permalink / raw)
  To: systemtap

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

--- Comment #1 from Martin Cermak <mcermak at redhat dot com> ---
I forgot to mention the reproducer. Here is one:

=======
 7.2 S ppc64 # stap -p2  --dyninst  -e 'probe begin { exit() }'
parse error: unknown operator @__compat_task
        saw: operator '@__compat_task' at
/root/mcermak-systemtap/systemtap-build/share/systemtap/tapset/powerpc/registers.stp:159:19
     source:    if ((truncate || @__compat_task) && !force64) {
                                 ^

1 parse error.
WARNING: tapset
"/root/mcermak-systemtap/systemtap-build/share/systemtap/tapset/powerpc/registers.stp"
has errors, and will be skipped
# functions
exit:unknown ()
# probes
begin /* <- begin */
 7.2 S ppc64 #
=======

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

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

* [Bug tapsets/18769] [ppc64BE/--dyninst] unknown operator @__compat_task
  2015-08-04  8:03 [Bug tapsets/18769] New: [ppc64BE/--dyninst] unknown operator @__compat_task mcermak at redhat dot com
  2015-08-04 11:20 ` [Bug tapsets/18769] " mcermak at redhat dot com
@ 2015-08-04 11:46 ` mcermak at redhat dot com
  2015-08-04 13:46 ` dsmith at redhat dot com
  2015-08-04 15:09 ` mcermak at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: mcermak at redhat dot com @ 2015-08-04 11:46 UTC (permalink / raw)
  To: systemtap

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

--- Comment #2 from Martin Cermak <mcermak at redhat dot com> ---
The separation of /linux and /dyninst directories is apparently quite
intentional:

=======
$ grep -A 21 'add empty string as last element' main.cxx  | nl
     1    // add empty string as last element
     2    version_suffixes.push_back ("");

     3    // Add arch variants of every path, just before each
     4    const string& arch = s.architecture;
     5    for (unsigned i=0; i<version_suffixes.size(); i+=2)
     6      version_suffixes.insert(version_suffixes.begin() + i,
     7                              version_suffixes[i] + "/" + arch);

     8    // Add runtime variants of every path, before everything else
     9    string runtime_prefix;
    10    if (s.runtime_mode == systemtap_session::kernel_runtime)
    11      runtime_prefix = "/linux";
    12    else if (s.runtime_mode == systemtap_session::dyninst_runtime)
    13      runtime_prefix = "/dyninst";
    14    if (!runtime_prefix.empty())
    15      for (unsigned i=0; i<version_suffixes.size(); i+=2)
    16        version_suffixes.insert(version_suffixes.begin() + i/2,
    17                                runtime_prefix + version_suffixes[i]);

    18    // First, parse .stpm files on the include path. We need to have the
    19    // resulting macro definitions available for parsing library files,
$
=======

I tried to add /linux into version_suffixes, but many tapsets dedicated for
kernel runtime are unusable for dyninst runtime, and at the end of the day -
it's understandable.

So maybe moving the macro definition from syscalls.stpm one level up in the
directory structure to e.g. compat_task.stpm, where it would be consumed by
both runtimes, might be a way to go.

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

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

* [Bug tapsets/18769] [ppc64BE/--dyninst] unknown operator @__compat_task
  2015-08-04  8:03 [Bug tapsets/18769] New: [ppc64BE/--dyninst] unknown operator @__compat_task mcermak at redhat dot com
  2015-08-04 11:20 ` [Bug tapsets/18769] " mcermak at redhat dot com
  2015-08-04 11:46 ` mcermak at redhat dot com
@ 2015-08-04 13:46 ` dsmith at redhat dot com
  2015-08-04 15:09 ` mcermak at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: dsmith at redhat dot com @ 2015-08-04 13:46 UTC (permalink / raw)
  To: systemtap

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

David Smith <dsmith at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dsmith at redhat dot com

--- Comment #3 from David Smith <dsmith at redhat dot com> ---
I think the easiest solution might be to move @__compat_task() from
tapset/linux/syscalls.stpm to tapset/macros.stpm. That way both the linux and
dyninst runtimes could use the definition.

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

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

* [Bug tapsets/18769] [ppc64BE/--dyninst] unknown operator @__compat_task
  2015-08-04  8:03 [Bug tapsets/18769] New: [ppc64BE/--dyninst] unknown operator @__compat_task mcermak at redhat dot com
                   ` (2 preceding siblings ...)
  2015-08-04 13:46 ` dsmith at redhat dot com
@ 2015-08-04 15:09 ` mcermak at redhat dot com
  3 siblings, 0 replies; 5+ messages in thread
From: mcermak at redhat dot com @ 2015-08-04 15:09 UTC (permalink / raw)
  To: systemtap

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

Martin Cermak <mcermak at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Martin Cermak <mcermak at redhat dot com> ---
Fixed in commit 639e6105190df4f80d2230102b53cf0dcaeb559d

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

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

end of thread, other threads:[~2015-08-04 15:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-04  8:03 [Bug tapsets/18769] New: [ppc64BE/--dyninst] unknown operator @__compat_task mcermak at redhat dot com
2015-08-04 11:20 ` [Bug tapsets/18769] " mcermak at redhat dot com
2015-08-04 11:46 ` mcermak at redhat dot com
2015-08-04 13:46 ` dsmith at redhat dot com
2015-08-04 15:09 ` mcermak 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).