Summary: | [ppc64BE/--dyninst] unknown operator @__compat_task | ||
---|---|---|---|
Product: | systemtap | Reporter: | Martin Cermak <mcermak> |
Component: | tapsets | Assignee: | Unassigned <systemtap> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dsmith |
Priority: | P2 | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Host: | Target: | ||
Build: | Last reconfirmed: |
Description
Martin Cermak
2015-08-04 08:03:47 UTC
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 # ======= 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. 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. Fixed in commit 639e6105190df4f80d2230102b53cf0dcaeb559d |