public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Re: What about MIPS support?
@ 2012-08-22 20:04 Victor Kamensky
  2012-08-23  2:23 ` Maneesh Soni
  2012-08-23 22:11 ` Josh Stone
  0 siblings, 2 replies; 12+ messages in thread
From: Victor Kamensky @ 2012-08-22 20:04 UTC (permalink / raw)
  To: systemtap, Josh Stone, Per Hallsmark; +Cc: Maneesh Soni, Wade Farnsworth

Hi Per, Josh,

We (Cisco) have pretty much full systemtap MIPS port. It works fine on 
Cavium Octeon cpus (mips64). We did very limited testing on OpenWrt 
Broadcom 4710 (in order to cover mips32 variant).

All parts, kernel and user land, are covered and we have almost all CPU 
specific systemtap functions implemented.

Also we had faced bunch of cross compilation related issues and we have
quite extensive patch addressing those.

Maneesh Soni developed mips uprobes and I did all other pieces (mips 
run-time, mips .stp files, cross compile, etc).

We always meant to publish all of it, but never get our hands on it. I 
hope this thread would be final push :). We will do it. Unfortunately, I 
cannot publish our patch series right away. I need to get permission from 
our company legal. It should not be a problem, but it may take two or 
three weeks.

Our latest series of patches is based on systemtap-1.6. I'll see whether I
can find time and move them to latest git ... In worst case scenario we 
just publish what we have.

Wrt of MIPS kprobes, it should be there already, somewhere in latest 
kernel. Most of support was there for a while. Maneesh and I contributed 
patch that let probe be inserted into jump instructions (that was 
limitation of original implementation, which we quickly discovered when we 
used for real cases). We worked on top 2.6.32 kernel. As understand there 
is current gradual departure from uprobes .. so our mips uprobes part may 
need rework a bit.

Thanks,
Victor

On 08/17/2012 Josh Stone wrote:

> On 08/17/2012 09:32 AM, Hallsmark, Per wrote:
> > Dear systemtap gurus,
> > 
> > Are there any plans in near future for a MIPS port?
> 
> I don't know of any plans, but we'll welcome patches. :)
> 
> > I've also tried a bit with release 1.7 (latest release possible that 
> > didn't require a lot of changes in our build environment, like 
> > upgrading elfutils etc). Unfortunately our kernel didn't have
> > support for kprobes so that had to be backported.
> 
> We'll of course prefer that any patches are on git master. Perhaps you
> can configure --with-elfutils=/path/to/new/elfutils to build stap with
> its own copy.  Anything else in your build environment holding you back?
> 
> > So I obviously now need to add more mips support in systemtap 
> > (started with this in tapsets/mips etc)
> > 
> > Any guidance on what is needed todo for a new arch?
> 
> Right, there will need to be tapset/$arch for specific functions, and
> now some of that is split into tapset/linux/$arch too.
> 
> Then runtime/loc2c-runtime.h also has a lot of arch-specific code that
> you'll need to fill in for mips, in order to do any register or memory
> access in your probes.
> 
> Those are the biggies I can think of, but smaller stuff may also be
> sprinkled about.  For instance, if you want process.mark probes (SDT),
> there's a tiny bit of arch #ifdefs in sdt.h, and then tapsets.cxx
> sdt_uprobe_var_expanding_visitor::visit_target_symbol_arg() will need to
> learn mips too.
> 
> Wade Farnsworth might be able to identify more points, as he's been
> working to get ARM support in shape.  It would be nice to start a
> porting guide on our wiki for these things.
> 
> > Anyone started already with mips?
> 
> Just you, afaik. ;)
> 
> 
> Josh

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

* Re: What about MIPS support?
  2012-08-22 20:04 What about MIPS support? Victor Kamensky
@ 2012-08-23  2:23 ` Maneesh Soni
  2012-08-23 14:33   ` Ananth N Mavinakayanahalli
  2012-08-23 22:11 ` Josh Stone
  1 sibling, 1 reply; 12+ messages in thread
From: Maneesh Soni @ 2012-08-23  2:23 UTC (permalink / raw)
  To: Victor Kamensky; +Cc: systemtap, Josh Stone, Per Hallsmark, Wade Farnsworth

On Wed, Aug 22, 2012 at 01:04:12PM -0700, Victor Kamensky wrote:
....
> Wrt of MIPS kprobes, it should be there already, somewhere in latest
> kernel. Most of support was there for a while. Maneesh and I
> contributed patch that let probe be inserted into jump instructions
> (that was limitation of original implementation, which we quickly
> discovered when we used for real cases). We worked on top 2.6.32
> kernel. As understand there is current gradual departure from
> uprobes .. so our mips uprobes part may need rework a bit.
  ^^^^^^ I guess you meant utrace?
> 
Actually the current (as in mainline kernel) approach for uprobes
is not using utrace, so there could be almost a re-write effort.

Thanks
Maneesh

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

* Re: What about MIPS support?
  2012-08-23  2:23 ` Maneesh Soni
@ 2012-08-23 14:33   ` Ananth N Mavinakayanahalli
  0 siblings, 0 replies; 12+ messages in thread
From: Ananth N Mavinakayanahalli @ 2012-08-23 14:33 UTC (permalink / raw)
  To: Maneesh Soni
  Cc: Victor Kamensky, systemtap, Josh Stone, Per Hallsmark, Wade Farnsworth

On Thu, Aug 23, 2012 at 07:52:52AM +0530, Maneesh Soni wrote:
> On Wed, Aug 22, 2012 at 01:04:12PM -0700, Victor Kamensky wrote:
> ....
> > Wrt of MIPS kprobes, it should be there already, somewhere in latest
> > kernel. Most of support was there for a while. Maneesh and I
> > contributed patch that let probe be inserted into jump instructions
> > (that was limitation of original implementation, which we quickly
> > discovered when we used for real cases). We worked on top 2.6.32
> > kernel. As understand there is current gradual departure from
> > uprobes .. so our mips uprobes part may need rework a bit.
>   ^^^^^^ I guess you meant utrace?
> > 
> Actually the current (as in mainline kernel) approach for uprobes
> is not using utrace, so there could be almost a re-write effort.

... though it shouldn't be a major one; see for instance my port to
powerpc http://patchwork.ozlabs.org/patch/179260/ currently under
review/discussion.

Ananth

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

* Re: What about MIPS support?
  2012-08-22 20:04 What about MIPS support? Victor Kamensky
  2012-08-23  2:23 ` Maneesh Soni
@ 2012-08-23 22:11 ` Josh Stone
  2012-10-15 21:21   ` Victor Kamensky
  1 sibling, 1 reply; 12+ messages in thread
From: Josh Stone @ 2012-08-23 22:11 UTC (permalink / raw)
  To: Victor Kamensky; +Cc: systemtap, Per Hallsmark, Maneesh Soni

On 08/22/2012 01:04 PM, Victor Kamensky wrote:
> Hi Per, Josh,
> 
> We (Cisco) have pretty much full systemtap MIPS port.
[...]
> We always meant to publish all of it, but never get our hands on it. I 
> hope this thread would be final push :). We will do it. Unfortunately, I 
> cannot publish our patch series right away. I need to get permission from 
> our company legal. It should not be a problem, but it may take two or 
> three weeks.

This is good news, and better that you're spurred now to share it. :)

> Our latest series of patches is based on systemtap-1.6. I'll see whether I
> can find time and move them to latest git ... In worst case scenario we 
> just publish what we have.

IMO, it would be good to go ahead and post the 1.6 patches directly
after your legal clears it.  Then if you're willing and able to rebase
that onto the latest git, that's great, but we don't need to hold up
everything for that possibility.

Thanks,
Josh

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

* Re: What about MIPS support?
  2012-08-23 22:11 ` Josh Stone
@ 2012-10-15 21:21   ` Victor Kamensky
  2012-10-23 23:43     ` Josh Stone
  2015-08-05 12:42     ` William Cohen
  0 siblings, 2 replies; 12+ messages in thread
From: Victor Kamensky @ 2012-10-15 21:21 UTC (permalink / raw)
  To: systemtap; +Cc: Josh Stone, Per Hallsmark, Maneesh Soni

[-- Attachment #1: Type: TEXT/PLAIN, Size: 11212 bytes --]

Hi All,

It took us much much longer than originally expected. But it is better 
late than never. Here is our patches tarbal attached. Inside of tarbal 
(README file) and copied below I put short description of each patch. Some 
of patches are Cisco specific and may not be any interest for you. Some 
like MIPS support, cross compilation improvements, misc general fixes (i.e 
systemtap issue 6977), I think, could be quite useful to community. Since 
it is quilt patch series and patches may have patch apply order issues, we 
are publishing all of them, exactly as we use/apply them, regardless 
whether we consider them Cisco specific or not.

As it was discussed, for now, I am just dropping our patches as is. Latter 
as time permits, I can work on cleaning them up, moving to latest 
systemtap git and try to prepare them for commit into systemtap tree. It 
would be great if folks could take a look at patches and/or patches 
description and indicate priorities/interests for specific patches on 
which I could start working first.

Please advise if you would like me to post the same on different subject 
line on this mailing list (since it covers more than just mips support). I 
thought I just post it on original thread to get it proper closure.

==== systemtap-1.6-cisco-patches/README start =============================

This is patches series that Cisco did on top of systemtap-1.6. Some of them are 
Cisco specific and most likely are not interesting for community. We decided to
provide them here anyway in order to avoid breakage in applying patches, because
of patch application order issues.

Other like MIPS support, cross compilation improvements, misc general fixes may
be some interest for SystemTap community.

Patch description follows order of patches in series file:

systemtap-configure_cross_compile.patch - change in configure logic to make it
     more cross compilation environment friendly (in cross compile environment
     one cannot test presence of /usr/include files; those are from host). We
     don't use nss3 and avahi in our target so for now just introduce option
     that could disable them. Most likely issue is fixed in latest tree.

systemtap-unwind-table-size.patch - IOS code is too big, we are hitting limit
     on unwind symbol table size. Increase the limit for now. In future it would
     be good code to adjust those values dynamically.

systemtap-fde_byte_order_fix.patch - Fix reading fde entry in case of cross
     compilation where target and host have different byte order (i.e x86 host,
     be mips is target).

systemtap-pointer-byte_size.patch - Fix related to ICC (intel compiler). There
     is a difference how DW_AT_byte_size is stored between gcc and icc. Current
     stap code tailored to gcc way. Need to go back and dig out more details
     here.

systemtap-userland_caller.patch - Trying to introduce ucaller_addr and ucaller
     systemtap function. Most likely this code does not work. But currently
     patch is in our series file so keeping it for now.

systemtap-biendian.patch - Support ICC biendian feature. It is described at
     http://software.intel.com/en-us/articles/dwarf-extensions-for-bi-endian-support/. Most
     like this code has no interest to anyone except Cisco.

systemtap-old_compiler-task_finder.patch - Older gcc compiler (like gcc 3.4.x)
     produce compilation warning here, incorrectly assuming that dentry may be
     used uninitialized

systemtap-cross_compile_helper.patch - Cross compilation assist. Actually
     include a lot of different small things. Here is the list of them (may not
     be complete):
     x) target system build may use difference 'gcc' and different 'make'.
     Different values could be specified through SYSTEMTAP_TARGET_CC and
     SYSTEMTAP_MAKE environment variable
     x) -y option introduced. Once specified it will indicate that systemtap
     compiler operates in cross compilation mode and value of option serves
     sysroot path value. Stap compiler supports several such options (details
     below)
     x) if compiler in cross compilation mode it does not use PATH and
     LD_LIBRARY_PATH to search for executables and libraries. Instead it uses
     SYSTEMTAP_CROSS_PATH and SYSTEMTAP_CROSS_LD_LIBRARY_PATH environment
     variables. PATH and LD_LIBRARY_PATH are usually different between host and
     target. Note SYSTEMTAP_CROSS_PATH and SYSTEMTAP_CROSS_LD_LIBRARY_PATH could
     be specified as relative of sysroot values, as well as host absolute
     pathes
     x) if stap compiler is in cross compilation mode it does not try to rebuild
     uprobes. It assumes that uprobes.ko is already built and installed in
     proper location in sysroot
     x) find_executable function is replaced with special sysroot class that
     handles different ways how file path needed during stap compilation (some
     times it needs file path in host terms, sometimes it would need it as it
     would be seen on target). Sysroot supports multiple sysroot. For example
     like in openwrt case one may have target root file system and overlay file
     system. Stap compiler in cross compilation mode can search both. Normally
     look up happens as iteration over sysroots and for each sysroot we iterate
     over list of directories specified in SYSTEMTAP_CROSS_PATH and
     SYSTEMTAP_CROSS_LD_LIBRARY_PATH. Quite normal case when one sysroot is
     specified so executables will be searched by adding sysroot value in front
     of directories specified by SYSTEMTAP_CROSS_PATH and
     SYSTEMTAP_CROSS_LD_LIBRARY_PATH.

     It is understood that above description may not be really sufficient to get
     full understanding of this patch. If community is interested I can give
     details explanation and see whether we can rework it. Above I just tried to
     give a taste of what sort of issue we are dealing with when we work in
     cross compiled environment

systemtap-data-in_another_cu.patch - Fix for issue
     6977 http://sourceware.org/bugzilla/show_bug.cgi?id=6977. We found it is
     very annoying and limiting for script writers, so we fixed it. It deals
     with  situation of accessing global variables that are defined in *other*
     compilation units.

systemtap-composed_rootfs_finder.patch - in embedded universe final root file
     system may be composed as link farm to set of files system. Example is
     Openwrt root file system and overlay. Systemtap runtime searches
     executables by canonical name. It won't work for link farm case. For
     link farm case ELF file name compiled into script is used as primary file
     path to check for file in file system or as key in list of file systems
     that participate in composition of final link farm. Outside of Cisco
     patch may have interest to distros like OpenWrt.

systemtap-line_range_issue_fix.patch - memory leak and crash in
     iterate_over_srcfile_lines in case of line ranges.

systemtap-icc_line_number.patch - deal with the way how ICC generates line
     number information.

systemtap-data-in_library.patch - fix issues of accessing global data in
     libraries (opposed to executables) Not sure whether it is applicable to
     latest tree.

systemtap-mips-uprobes.patch - MIPS uprobes kernel module code.

systemtap-mips.patch - MIPS systemtap runtime and and tapset code.

systemtap-ppc32.patch - runtime fixes for powerpc 32bit case.

systemtap-smaller_buffer_size.patch - stap debugfs 1Mb buffer size is too big
     for systems like  WRT54GL, where whole box has 16Mb or 32Mb of memory.
     Change 'b' option handling, so smaller buffers could be specified (i.e in
     Kbytes). Patch tries to be backward compatible with previous option usage
     - if no size letter is specified, it is treated like Megabytes

systemtap-incorrect_kernel_buildid_hack.patch - there are idiosyncrasies in
     Cisco build system when kernel rebuilt twice and buildid in target image
     does not correspond to one we left to deal with on the host. This is hack
     to deal with it. Should be ignored by everyone else.

systemtap-ios_keyword.patch - Cisco specific patch. Should be ignored by
     everybody else. Introduces ios keyword (along with 'process' and 'kernel').
     It deals with the fact that IOS process  canonical name changes depending
     on IOS image feature key. 'ios' keyword allows us to have scripts reusable
     across different target images. Real ios process name is passed with -i
     option by higher level wrapper script.

systemtap-no_userland_prologue_search.patch - Add option '-U' that disables
     function prologue  searches in user-land processes. Current -P affects only
     kernel probes.

systemtap-kernel_source_tree.patch - Option -T allows to specify location of
     kernel sources. Normally needed only in cross compilation environment.

systemtap-uprobes_in_kernel_as_module.patch - Fix for case when in cross
     compilation environment we  may have uprobes built as module in kernel
     build (opposite to built by systemtap). In this case, in order for
     kernel_built_uprobes function to see unregister_uprobe symbol it has to be
     added into kernel_exports even-though it comes from module (not uprobes)

systemtap-remote_hack.patch - allows remote_uris mechanism to work in cross
     compilation environment, where target kernel release won't be the same as
     host kernel release

systemtap-cross_testsuite.patch - Attempt to change testsuite to operate in
     cross compilation environment where access to target happens either through
     dejagnu remote target facilities or through stap --remote mechanism.
     Massive patch, across bunch of test cases, not sure whether community has
     any interest in it. It was used by us to validate systemtap operation on our
     targets. In order to run, it requires stap board specific config (not
     provided here), which would specify things like stap_board_args, and others.

systemtap-enable_vma_tracker.patch - cover corner cases where
     _stp_umodule_relocate is used but vma_tracker is not enabled, while it
     should be, becuase it uses stap_find_vma_map_info_user function.

Thanks,
Victor

On Thu, 23 Aug 2012, Josh Stone wrote:

> On 08/22/2012 01:04 PM, Victor Kamensky wrote:
>> Hi Per, Josh,
>>
>> We (Cisco) have pretty much full systemtap MIPS port.
> [...]
>> We always meant to publish all of it, but never get our hands on it. I
>> hope this thread would be final push :). We will do it. Unfortunately, I
>> cannot publish our patch series right away. I need to get permission from
>> our company legal. It should not be a problem, but it may take two or
>> three weeks.
>
> This is good news, and better that you're spurred now to share it. :)
>
>> Our latest series of patches is based on systemtap-1.6. I'll see whether I
>> can find time and move them to latest git ... In worst case scenario we
>> just publish what we have.
>
> IMO, it would be good to go ahead and post the 1.6 patches directly
> after your legal clears it.  Then if you're willing and able to rebase
> that onto the latest git, that's great, but we don't need to hold up
> everything for that possibility.
>
> Thanks,
> Josh
>

[-- Attachment #2: Type: APPLICATION/OCTET-STREAM, Size: 60382 bytes --]

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

* Re: What about MIPS support?
  2012-10-15 21:21   ` Victor Kamensky
@ 2012-10-23 23:43     ` Josh Stone
  2015-08-05 12:42     ` William Cohen
  1 sibling, 0 replies; 12+ messages in thread
From: Josh Stone @ 2012-10-23 23:43 UTC (permalink / raw)
  To: Victor Kamensky; +Cc: systemtap, Per Hallsmark, Maneesh Soni

On 10/15/2012 02:21 PM, Victor Kamensky wrote:
> Hi All,
> 
> It took us much much longer than originally expected. But it is better 
> late than never. Here is our patches tarbal attached. Inside of tarbal 
> (README file) and copied below I put short description of each patch. Some 
> of patches are Cisco specific and may not be any interest for you. Some 
> like MIPS support, cross compilation improvements, misc general fixes (i.e 
> systemtap issue 6977), I think, could be quite useful to community. Since 
> it is quilt patch series and patches may have patch apply order issues, we 
> are publishing all of them, exactly as we use/apply them, regardless 
> whether we consider them Cisco specific or not.
> 
> As it was discussed, for now, I am just dropping our patches as is. Latter 
> as time permits, I can work on cleaning them up, moving to latest 
> systemtap git and try to prepare them for commit into systemtap tree. It 
> would be great if folks could take a look at patches and/or patches 
> description and indicate priorities/interests for specific patches on 
> which I could start working first.

Thanks!

For posterity and hopefully easier review, I applied this series as git
commits, and pushed them out for anyone else to see too:
http://sourceware.org/git/gitweb.cgi?p=systemtap.git;a=shortlog;h=refs/heads/systemtap-1.6-cisco-patches

Since I like to preserve such details, I set you as the --author (except
Maneesh on mips-uprobes), --date from the files in the tarball, and
commit messages from your README descriptions.

> Please advise if you would like me to post the same on different subject 
> line on this mailing list (since it covers more than just mips support). I 
> thought I just post it on original thread to get it proper closure.

This thread is fine with me.  When you start porting patches forward, if
you want to start new threads, that's fine too.

It may be a while before I can review these patches fully, but I do have
a few comments as I glance over them now.  Any patches I skip over just
means I don't have any comment, not total disinterest. ;)

> systemtap-unwind-table-size.patch - IOS code is too big, we are hitting limit
>      on unwind symbol table size. Increase the limit for now. In future it would
>      be good code to adjust those values dynamically.

You went from 6M to 48M - does IOS really need that much?  It's an
arbitrary limit, but we should try to keep it low if possible.

> systemtap-userland_caller.patch - Trying to introduce ucaller_addr and ucaller
>      systemtap function. Most likely this code does not work. But currently
>      patch is in our series file so keeping it for now.

I believe the new ustack() along with usymname() can handle this too.

> systemtap-biendian.patch - Support ICC biendian feature. It is described at
>      http://software.intel.com/en-us/articles/dwarf-extensions-for-bi-endian-support/. Most
>      like this code has no interest to anyone except Cisco.

Well FWIW, I wouldn't be opposed to such ICC-specific patches, as long
as it doesn't break the primary GCC support.

> systemtap-old_compiler-task_finder.patch - Older gcc compiler (like gcc 3.4.x)
>      produce compilation warning here, incorrectly assuming that dentry may be
>      used uninitialized

Wade Farnsworth also fixed this, commit 090a235b.

> systemtap-cross_compile_helper.patch - Cross compilation assist. Actually
>      include a lot of different small things. Here is the list of them (may not
>      be complete):

For the sysroot parts, Wade also added a --sysroot option, so your
changes should be reconciled with that.  And if possible, please break
this one down into discrete pieces.

> systemtap-data-in_another_cu.patch - Fix for issue
>      6977 http://sourceware.org/bugzilla/show_bug.cgi?id=6977. We found it is
>      very annoying and limiting for script writers, so we fixed it. It deals
>      with  situation of accessing global variables that are defined in *other*
>      compilation units.

If this is generally improved, that's great!  Mark also added a @var
accessor, which is a similar idea, but maybe not quite the same.

> systemtap-line_range_issue_fix.patch - memory leak and crash in
>      iterate_over_srcfile_lines in case of line ranges.

If crashes like this are still present in master git, then let's
definitely prioritize them!

> systemtap-kernel_source_tree.patch - Option -T allows to specify location of
>      kernel sources. Normally needed only in cross compilation environment.

The existing -r can take either a DIR or a RELEASE - is that not enough?

> systemtap-remote_hack.patch - allows remote_uris mechanism to work in cross
>      compilation environment, where target kernel release won't be the same as
>      host kernel release

Yeah, this was a bad oversight, fixed in commit 19da0351.

> systemtap-cross_testsuite.patch - Attempt to change testsuite to operate in
>      cross compilation environment where access to target happens either through
>      dejagnu remote target facilities or through stap --remote mechanism.
>      Massive patch, across bunch of test cases, not sure whether community has
>      any interest in it. It was used by us to validate systemtap operation on our
>      targets. In order to run, it requires stap board specific config (not
>      provided here), which would specify things like stap_board_args, and others.

I definitely think testing is great for cross-compilation, and it's also
nice for it to exercise --remote as that has little in the testsuite either.

David's been doing a similar big change to support the different
runtimes (for the dyninst feature), which I think covers a lot of the
same areas in adding additional parameters to various test runs.
Hopefully that overlap is actually helpful here.

> systemtap-enable_vma_tracker.patch - cover corner cases where
>      _stp_umodule_relocate is used but vma_tracker is not enabled, while it
>      should be, becuase it uses stap_find_vma_map_info_user function.

If this is still lacking, we should definitely fix it.

Finally, I noticed systemtap-mv_preempt_rt.patch in your tarball, which
isn't the series or README.  That one looks more hacky than the rest, so
maybe it should be left out. :)  But if there's a real purpose behind
that patch, let's hear it.


Josh

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

* Re: What about MIPS support?
  2012-10-15 21:21   ` Victor Kamensky
  2012-10-23 23:43     ` Josh Stone
@ 2015-08-05 12:42     ` William Cohen
       [not found]       ` <CAJdmCr+1s6JLW3DsGxbdqPcpnD1+wNo5VwAifm6UN-SWE+PKmw@mail.gmail.com>
  1 sibling, 1 reply; 12+ messages in thread
From: William Cohen @ 2015-08-05 12:42 UTC (permalink / raw)
  To: Victor Kamensky, systemtap; +Cc: Josh Stone, Per Hallsmark, Maneesh Soni

[-- Attachment #1: Type: text/plain, Size: 12185 bytes --]

On 10/15/2012 05:21 PM, Victor Kamensky wrote:
> Hi All,
> 
> It took us much much longer than originally expected. But it is better late than never. Here is our patches tarbal attached. Inside of tarbal (README file) and copied below I put short description of each patch. Some of patches are Cisco specific and may not be any interest for you. Some like MIPS support, cross compilation improvements, misc general fixes (i.e systemtap issue 6977), I think, could be quite useful to community. Since it is quilt patch series and patches may have patch apply order issues, we are publishing all of them, exactly as we use/apply them, regardless whether we consider them Cisco specific or not.
> 
> As it was discussed, for now, I am just dropping our patches as is. Latter as time permits, I can work on cleaning them up, moving to latest systemtap git and try to prepare them for commit into systemtap tree. It would be great if folks could take a look at patches and/or patches description and indicate priorities/interests for specific patches on which I could start working first.
> 
> Please advise if you would like me to post the same on different subject line on this mailing list (since it covers more than just mips support). I thought I just post it on original thread to get it proper closure.
> 
Hi All,

Last week I was on vacation, playing around with a MIPS base creator
board (http://www.elinux.org/MIPS_Creator_CI20), and seeing if I could
get systemtap running on it. After locally building the linux-3.0.8
kernel I was able to massage the systemtap-mips.patch from
https://sourceware.org/ml/systemtap/2012-q4/msg00084.html, so that
current systemtap is buildable and able to run a portion of the
testsuite on MIPS. Attached is the current modified patch. The tests hung in
the ./systemtap.base/limits.stp tests and a number of tests failed
because of issues with utrace functions not being found. The
systemtap.sum is also attached to this email.

-Will

> ==== systemtap-1.6-cisco-patches/README start =============================
> 
> This is patches series that Cisco did on top of systemtap-1.6. Some of them are Cisco specific and most likely are not interesting for community. We decided to
> provide them here anyway in order to avoid breakage in applying patches, because
> of patch application order issues.
> 
> Other like MIPS support, cross compilation improvements, misc general fixes may
> be some interest for SystemTap community.
> 
> Patch description follows order of patches in series file:
> 
> systemtap-configure_cross_compile.patch - change in configure logic to make it
>     more cross compilation environment friendly (in cross compile environment
>     one cannot test presence of /usr/include files; those are from host). We
>     don't use nss3 and avahi in our target so for now just introduce option
>     that could disable them. Most likely issue is fixed in latest tree.
> 
> systemtap-unwind-table-size.patch - IOS code is too big, we are hitting limit
>     on unwind symbol table size. Increase the limit for now. In future it would
>     be good code to adjust those values dynamically.
> 
> systemtap-fde_byte_order_fix.patch - Fix reading fde entry in case of cross
>     compilation where target and host have different byte order (i.e x86 host,
>     be mips is target).
> 
> systemtap-pointer-byte_size.patch - Fix related to ICC (intel compiler). There
>     is a difference how DW_AT_byte_size is stored between gcc and icc. Current
>     stap code tailored to gcc way. Need to go back and dig out more details
>     here.
> 
> systemtap-userland_caller.patch - Trying to introduce ucaller_addr and ucaller
>     systemtap function. Most likely this code does not work. But currently
>     patch is in our series file so keeping it for now.
> 
> systemtap-biendian.patch - Support ICC biendian feature. It is described at
>     http://software.intel.com/en-us/articles/dwarf-extensions-for-bi-endian-support/. Most
>     like this code has no interest to anyone except Cisco.
> 
> systemtap-old_compiler-task_finder.patch - Older gcc compiler (like gcc 3.4.x)
>     produce compilation warning here, incorrectly assuming that dentry may be
>     used uninitialized
> 
> systemtap-cross_compile_helper.patch - Cross compilation assist. Actually
>     include a lot of different small things. Here is the list of them (may not
>     be complete):
>     x) target system build may use difference 'gcc' and different 'make'.
>     Different values could be specified through SYSTEMTAP_TARGET_CC and
>     SYSTEMTAP_MAKE environment variable
>     x) -y option introduced. Once specified it will indicate that systemtap
>     compiler operates in cross compilation mode and value of option serves
>     sysroot path value. Stap compiler supports several such options (details
>     below)
>     x) if compiler in cross compilation mode it does not use PATH and
>     LD_LIBRARY_PATH to search for executables and libraries. Instead it uses
>     SYSTEMTAP_CROSS_PATH and SYSTEMTAP_CROSS_LD_LIBRARY_PATH environment
>     variables. PATH and LD_LIBRARY_PATH are usually different between host and
>     target. Note SYSTEMTAP_CROSS_PATH and SYSTEMTAP_CROSS_LD_LIBRARY_PATH could
>     be specified as relative of sysroot values, as well as host absolute
>     pathes
>     x) if stap compiler is in cross compilation mode it does not try to rebuild
>     uprobes. It assumes that uprobes.ko is already built and installed in
>     proper location in sysroot
>     x) find_executable function is replaced with special sysroot class that
>     handles different ways how file path needed during stap compilation (some
>     times it needs file path in host terms, sometimes it would need it as it
>     would be seen on target). Sysroot supports multiple sysroot. For example
>     like in openwrt case one may have target root file system and overlay file
>     system. Stap compiler in cross compilation mode can search both. Normally
>     look up happens as iteration over sysroots and for each sysroot we iterate
>     over list of directories specified in SYSTEMTAP_CROSS_PATH and
>     SYSTEMTAP_CROSS_LD_LIBRARY_PATH. Quite normal case when one sysroot is
>     specified so executables will be searched by adding sysroot value in front
>     of directories specified by SYSTEMTAP_CROSS_PATH and
>     SYSTEMTAP_CROSS_LD_LIBRARY_PATH.
> 
>     It is understood that above description may not be really sufficient to get
>     full understanding of this patch. If community is interested I can give
>     details explanation and see whether we can rework it. Above I just tried to
>     give a taste of what sort of issue we are dealing with when we work in
>     cross compiled environment
> 
> systemtap-data-in_another_cu.patch - Fix for issue
>     6977 http://sourceware.org/bugzilla/show_bug.cgi?id=6977. We found it is
>     very annoying and limiting for script writers, so we fixed it. It deals
>     with  situation of accessing global variables that are defined in *other*
>     compilation units.
> 
> systemtap-composed_rootfs_finder.patch - in embedded universe final root file
>     system may be composed as link farm to set of files system. Example is
>     Openwrt root file system and overlay. Systemtap runtime searches
>     executables by canonical name. It won't work for link farm case. For
>     link farm case ELF file name compiled into script is used as primary file
>     path to check for file in file system or as key in list of file systems
>     that participate in composition of final link farm. Outside of Cisco
>     patch may have interest to distros like OpenWrt.
> 
> systemtap-line_range_issue_fix.patch - memory leak and crash in
>     iterate_over_srcfile_lines in case of line ranges.
> 
> systemtap-icc_line_number.patch - deal with the way how ICC generates line
>     number information.
> 
> systemtap-data-in_library.patch - fix issues of accessing global data in
>     libraries (opposed to executables) Not sure whether it is applicable to
>     latest tree.
> 
> systemtap-mips-uprobes.patch - MIPS uprobes kernel module code.
> 
> systemtap-mips.patch - MIPS systemtap runtime and and tapset code.
> 
> systemtap-ppc32.patch - runtime fixes for powerpc 32bit case.
> 
> systemtap-smaller_buffer_size.patch - stap debugfs 1Mb buffer size is too big
>     for systems like  WRT54GL, where whole box has 16Mb or 32Mb of memory.
>     Change 'b' option handling, so smaller buffers could be specified (i.e in
>     Kbytes). Patch tries to be backward compatible with previous option usage
>     - if no size letter is specified, it is treated like Megabytes
> 
> systemtap-incorrect_kernel_buildid_hack.patch - there are idiosyncrasies in
>     Cisco build system when kernel rebuilt twice and buildid in target image
>     does not correspond to one we left to deal with on the host. This is hack
>     to deal with it. Should be ignored by everyone else.
> 
> systemtap-ios_keyword.patch - Cisco specific patch. Should be ignored by
>     everybody else. Introduces ios keyword (along with 'process' and 'kernel').
>     It deals with the fact that IOS process  canonical name changes depending
>     on IOS image feature key. 'ios' keyword allows us to have scripts reusable
>     across different target images. Real ios process name is passed with -i
>     option by higher level wrapper script.
> 
> systemtap-no_userland_prologue_search.patch - Add option '-U' that disables
>     function prologue  searches in user-land processes. Current -P affects only
>     kernel probes.
> 
> systemtap-kernel_source_tree.patch - Option -T allows to specify location of
>     kernel sources. Normally needed only in cross compilation environment.
> 
> systemtap-uprobes_in_kernel_as_module.patch - Fix for case when in cross
>     compilation environment we  may have uprobes built as module in kernel
>     build (opposite to built by systemtap). In this case, in order for
>     kernel_built_uprobes function to see unregister_uprobe symbol it has to be
>     added into kernel_exports even-though it comes from module (not uprobes)
> 
> systemtap-remote_hack.patch - allows remote_uris mechanism to work in cross
>     compilation environment, where target kernel release won't be the same as
>     host kernel release
> 
> systemtap-cross_testsuite.patch - Attempt to change testsuite to operate in
>     cross compilation environment where access to target happens either through
>     dejagnu remote target facilities or through stap --remote mechanism.
>     Massive patch, across bunch of test cases, not sure whether community has
>     any interest in it. It was used by us to validate systemtap operation on our
>     targets. In order to run, it requires stap board specific config (not
>     provided here), which would specify things like stap_board_args, and others.
> 
> systemtap-enable_vma_tracker.patch - cover corner cases where
>     _stp_umodule_relocate is used but vma_tracker is not enabled, while it
>     should be, becuase it uses stap_find_vma_map_info_user function.
> 
> Thanks,
> Victor


> 
> On Thu, 23 Aug 2012, Josh Stone wrote:
> 
>> On 08/22/2012 01:04 PM, Victor Kamensky wrote:
>>> Hi Per, Josh,
>>>
>>> We (Cisco) have pretty much full systemtap MIPS port.
>> [...]
>>> We always meant to publish all of it, but never get our hands on it. I
>>> hope this thread would be final push :). We will do it. Unfortunately, I
>>> cannot publish our patch series right away. I need to get permission from
>>> our company legal. It should not be a problem, but it may take two or
>>> three weeks.
>>
>> This is good news, and better that you're spurred now to share it. :)
>>
>>> Our latest series of patches is based on systemtap-1.6. I'll see whether I
>>> can find time and move them to latest git ... In worst case scenario we
>>> just publish what we have.
>>
>> IMO, it would be good to go ahead and post the 1.6 patches directly
>> after your legal clears it.  Then if you're willing and able to rebase
>> that onto the latest git, that's great, but we don't need to hold up
>> everything for that possibility.
>>
>> Thanks,
>> Josh
>>


[-- Attachment #2: 0001-Add-some-support-for-MIPS-processors.patch --]
[-- Type: text/x-patch, Size: 28794 bytes --]

From a644485abb71047846c15a216fbcfc3b519c0afb Mon Sep 17 00:00:00 2001
From: Victor Kamensky <victor.kamensky@linaro.org>
Date: Wed, 5 Aug 2015 13:21:08 +0100
Subject: [PATCH] Add some support for MIPS processors

Signed-off-by: William Cohen <wcohen@redhat.com>
---
 runtime/linux/arith.c         |   29 ++++-
 runtime/linux/copy.c          |    2 +-
 runtime/linux/loc2c-runtime.h |  114 ++++++++++++++++-
 runtime/loc2c-runtime.h       |   26 ----
 runtime/regs.c                |  117 +++++++++++++++++
 runtime/regs.h                |    4 +
 runtime/stack.c               |    2 +
 runtime/syscall.h             |   49 ++++++++
 runtime/time.c                |   16 +++
 tapset/errno.stp              |    2 +
 tapset/linux/aux_syscalls.stp |    2 +-
 tapset/linux/scheduler.stp    |    2 +-
 tapset/linux/syscalls2.stp    |    8 ++
 tapset/mips/aux_syscalls.stp  |   44 +++++++
 tapset/mips/registers.stp     |  276 +++++++++++++++++++++++++++++++++++++++++
 tapsets.cxx                   |    1 +
 16 files changed, 662 insertions(+), 32 deletions(-)
 create mode 100644 tapset/mips/aux_syscalls.stp
 create mode 100644 tapset/mips/registers.stp

diff --git a/runtime/linux/arith.c b/runtime/linux/arith.c
index b64984a..57f457f 100644
--- a/runtime/linux/arith.c
+++ b/runtime/linux/arith.c
@@ -21,7 +21,8 @@
 /* Other 32-bit cpus will need to modify this file. */
 
 #if defined (__i386__) || defined(__arm__) || \
-	(defined(__powerpc__) && !defined(__powerpc64__))
+	(defined(__powerpc__) && !defined(__powerpc64__)) || \
+	(defined(__mips__) && !defined(__mips64))
 static long long _div64 (long long u, long long v);
 static long long _mod64 (long long u, long long v);
 #endif
@@ -116,7 +117,8 @@ static int _stp_random_pm (unsigned n)
 
 
 #if defined (__i386__) || defined (__arm__) || \
-	(defined(__powerpc__) && !defined(__powerpc64__))
+	(defined(__powerpc__) && !defined(__powerpc64__)) || \
+	(defined(__mips__) && !defined(__mips64))
 
 /* 64-bit division functions extracted from libgcc */
 typedef long long DWtype;
@@ -248,6 +250,29 @@ typedef union
 	   : "r" ((USItype) (a)),					\
 	     "r" ((USItype) (b)) __CLOBBER_CC );}
 
+#elif defined (__mips__)
+
+#define umul_ppmm(w1, w0, m0, m1)                                       \
+    __asm__ ("multu %2,%3\n"						\
+	     "mflo %0\n"						\
+	     "mfhi %1\n"						\
+	     : "=d" ((USItype) (w0)),					\
+	       "=d" ((USItype) (w1))					\
+	     : "d" ((USItype) (m0)),					\
+	       "d" ((USItype) (m1))					\
+	     : "hi", "lo" )
+
+
+#if !defined (sub_ddmmss)
+#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
+  do {									\
+    UWtype __x;								\
+    __x = (al) - (bl);							\
+    (sh) = (ah) - (bh) - (__x > (al));					\
+    (sl) = __x;								\
+  } while (0)
+#endif
+
 #endif
 
 #define __udiv_qrnnd_c(q, r, n1, n0, d) \
diff --git a/runtime/linux/copy.c b/runtime/linux/copy.c
index 4e802b6..362623f 100644
--- a/runtime/linux/copy.c
+++ b/runtime/linux/copy.c
@@ -91,7 +91,7 @@ do {									   \
 #elif defined (__s390__) || defined (__s390x__)|| defined (__aarch64__)
 #define __stp_strncpy_from_user(dst,src,count,res) \
 	do { res = strncpy_from_user(dst, src, count); } while(0)
-#elif defined (__ia64__)
+#elif defined (__ia64__) || defined (__mips__)
 #define __stp_strncpy_from_user(dst,src,count,res)		\
 	do { res = __strncpy_from_user(dst, src, count); } while(0)
 #endif
diff --git a/runtime/linux/loc2c-runtime.h b/runtime/linux/loc2c-runtime.h
index a3bec58..d863c37 100644
--- a/runtime/linux/loc2c-runtime.h
+++ b/runtime/linux/loc2c-runtime.h
@@ -829,7 +829,119 @@ extern void __store_deref_bad(void);
 	STORE_DEREF_FAULT(addr); \
   })
 
-#endif /* (s390) || (s390x) */
+#elif defined __mips__
+
+/* macros lifted from arch/mips/include/asm/uaccess.h and changed a bit */
+
+#define __stp_get_user_asm(val, insn, addr, err)			\
+{									\
+	__asm__ __volatile__(						\
+	"1:	" insn "	%1, %3				\n"	\
+	"2:							\n"	\
+	"	.section .fixup,\"ax\"				\n"	\
+	"3:	li	%0, %4					\n"	\
+	"	j	2b					\n"	\
+	"	.previous					\n"	\
+	"	.section __ex_table,\"a\"			\n"	\
+	"	"__UA_ADDR "\t1b, 3b				\n"	\
+	"	.previous					\n"	\
+	: "=r" (err), "=r" (val)					\
+	: "0" (0), "o" (__m(addr)), "i" (-EFAULT));			\
+}
+
+#define __stp_put_user_asm(val, insn, addr, err)			\
+{									\
+	__asm__ __volatile__(						\
+	"1:	" insn "	%z2, %3		# __put_user_asm\n"	\
+	"2:							\n"	\
+	"	.section	.fixup,\"ax\"			\n"	\
+	"3:	li	%0, %4					\n"	\
+	"	j	2b					\n"	\
+	"	.previous					\n"	\
+	"	.section	__ex_table,\"a\"		\n"	\
+	"	" __UA_ADDR "	1b, 3b				\n"	\
+	"	.previous					\n"	\
+	: "=r" (err)							\
+	: "0" (0), "Jr" (val), "o" (__m(addr)),				\
+	  "i" (-EFAULT));						\
+}
+
+#define _stp_deref(size, addr, seg)					\
+  ({									\
+     int _bad = 0;							\
+     intptr_t _v=0;							\
+     mm_segment_t _oldfs = get_fs();                                    \
+     set_fs(seg);                                                       \
+     pagefault_disable();                                               \
+     if (lookup_bad_addr((unsigned long)addr, size))			\
+       _bad = 1;							\
+     else								\
+       switch (size){							\
+       case 1: __stp_get_user_asm(_v, "lb", addr, _bad); break;		\
+       case 2: __stp_get_user_asm(_v, "lh", addr, _bad); break;		\
+       case 4: __stp_get_user_asm(_v, "lw", addr, _bad); break;		\
+       case 8: __stp_get_user_asm(_v, "ld", addr, _bad); break;		\
+       default: __get_user_unknown(); break;				\
+       }								\
+     pagefault_enable();                                                \
+     set_fs(_oldfs);                                                    \
+     if (_bad)								\
+	DEREF_FAULT(addr);						\
+     _v;								\
+   })
+
+/* TODO kamensky: need to run test; did not have test case for that so far */
+
+#define _stp_store_deref(size, addr, value,seg)				\
+  ({									\
+    int _bad=0;								\
+    mm_segment_t _oldfs = get_fs();                                     \
+    set_fs(seg);                                                        \
+    pagefault_disable();                                                \
+    if (lookup_bad_addr((unsigned long)addr, size))			\
+      _bad = 1;								\
+    else								\
+      switch (size){							\
+      case 1: __stp_put_user_asm(value, "sb", addr, _bad); break;	\
+      case 2: __stp_put_user_asm(value, "sh", addr, _bad); break;	\
+      case 4: __stp_put_user_asm(value, "sw", addr, _bad); break;	\
+      case 8: __stp_put_user_asm(value, "sd", addr, _bad); break;	\
+      default: __put_user_unknown(); break;				\
+      }									\
+    pagefault_enable();                                                 \
+    set_fs(_oldfs);                                                     \
+    if (_bad)								\
+	   STORE_DEREF_FAULT(addr);					\
+   })
+
+#endif
+
+
+#if STP_SKIP_BADVARS
+#define DEREF_FAULT(addr) ({0; })
+#define STORE_DEREF_FAULT(addr) ({0; })
+#define CATCH_DEREF_FAULT() ({0; })
+#else
+#define DEREF_FAULT(addr) ({						    \
+    snprintf(c->error_buffer, sizeof(c->error_buffer),			    \
+      STAP_MSG_LOC2C_01, (void *)(intptr_t)(addr), #addr);   \
+    c->last_error = c->error_buffer;					    \
+    goto deref_fault;							    \
+    })
+
+#define STORE_DEREF_FAULT(addr) ({					    \
+    snprintf(c->error_buffer, sizeof(c->error_buffer),			    \
+      STAP_MSG_LOC2C_02, (void *)(intptr_t)(addr), #addr);  \
+    c->last_error = c->error_buffer;					    \
+    goto deref_fault;							    \
+    })
+
+#define CATCH_DEREF_FAULT()				\
+  if (0) {						\
+deref_fault: ;						\
+  }
+
+#endif
 
 
 /* Map kderef/uderef to the generic segment-aware deref macros. */ 
diff --git a/runtime/loc2c-runtime.h b/runtime/loc2c-runtime.h
index 69df205..52bdc7a 100644
--- a/runtime/loc2c-runtime.h
+++ b/runtime/loc2c-runtime.h
@@ -212,30 +212,4 @@
 
 #endif
 
-
-#if STP_SKIP_BADVARS
-#define DEREF_FAULT(addr) ({0; })
-#define STORE_DEREF_FAULT(addr) ({0; })
-#define CATCH_DEREF_FAULT() ({0; })
-#else
-#define DEREF_FAULT(addr) ({						    \
-    snprintf(c->error_buffer, sizeof(c->error_buffer),			    \
-      STAP_MSG_LOC2C_01, (void *)(intptr_t)(addr), #addr);   \
-    c->last_error = c->error_buffer;					    \
-    goto deref_fault;							    \
-    })
-
-#define STORE_DEREF_FAULT(addr) ({					    \
-    snprintf(c->error_buffer, sizeof(c->error_buffer),			    \
-      STAP_MSG_LOC2C_02, (void *)(intptr_t)(addr), #addr);  \
-    c->last_error = c->error_buffer;					    \
-    goto deref_fault;							    \
-    })
-
-#define CATCH_DEREF_FAULT()				\
-  if (0) {						\
-deref_fault: ;						\
-  }
-#endif
-
 #endif /* _LOC2C_RUNTIME_H_ */
diff --git a/runtime/regs.c b/runtime/regs.c
index ade3ad9..8a3f365 100644
--- a/runtime/regs.c
+++ b/runtime/regs.c
@@ -3,6 +3,7 @@
  * Copyright (C) 2005, 2007 Red Hat Inc.
  * Copyright (C) 2005 Intel Corporation.
  * Copyright (C) 2007 Quentin Barnes.
+ * Copyright (C) 2009 Sony Corporation.
  *
  * This file is part of systemtap, and is free software.  You can
  * redistribute it and/or modify it under the terms of the GNU General
@@ -23,6 +24,122 @@
 
 #include "dyninst/regs.c"
 
+#elif defined (__mips__)
+/*
+ * Only o32 application has 32bit registers. N32 and N64 both
+ * should use 64bit registers regardless of pointer size
+ */
+static int _stp_probing_app_with_32bit_regs(struct pt_regs *regs)
+{
+	if (!regs)
+		return 0;
+	return (user_mode(regs) &&
+                test_tsk_thread_flag(current, TIF_32BIT_REGS));
+}
+
+void _stp_print_regs(struct pt_regs * regs)
+{
+#ifdef MIPS_PRINT_REGS_SHOW_SYMBOLS
+        /* it is too much stack to do symbol translation by default */
+    	char symbol_name[KSYM_SYMBOL_LEN];
+#endif /* MIPS_PRINT_REGS_SHOW_SYMBOLS */
+	const int field = 2 * sizeof(unsigned long);
+	unsigned int cause = regs->cp0_cause;
+	int i;
+
+	_stp_printf("Cpu %d\n", smp_processor_id());
+
+	/*
+	 * Saved main processor registers
+	 */
+	for (i = 0; i < 32;) {
+		if ((i % 4) == 0)
+			_stp_printf("$%2d   :", i);
+		if (i == 0)
+			_stp_printf(" %0*lx", field, 0UL);
+		else if (i == 26 || i == 27)
+			_stp_printf(" %*s", field, "");
+		else
+			_stp_printf(" %0*lx", field, regs->regs[i]);
+
+		i++;
+		if ((i % 4) == 0)
+			_stp_printf("\n");
+	}
+
+	_stp_printf("Hi    : %0*lx\n", field, regs->hi);
+	_stp_printf("Lo    : %0*lx\n", field, regs->lo);
+
+	/*
+	 * Saved cp0 registers
+	 */
+	_stp_printf("epc   : %0*lx ", field, regs->cp0_epc);
+#ifdef MIPS_PRINT_REGS_SHOW_SYMBOLSx
+        sprint_symbol(symbol_name, regs->cp0_epc);
+	_stp_printf("%s ", symbol_name);
+#endif /* MIPS_PRINT_REGS_SHOW_SYMBOLS */
+
+	_stp_printf("ra    : %0*lx ", field, regs->regs[31]);
+#ifdef MIPS_PRINT_REGS_SHOW_SYMBOLS
+        sprint_symbol(symbol_name, regs->regs[31]);
+	_stp_printf("%s", symbol_name);
+#endif /* MIPS_PRINT_REGS_SHOW_SYMBOLS */
+	_stp_printf("\n");
+
+	_stp_printf("Status: %08x    ", (uint32_t) regs->cp0_status);
+
+	if (current_cpu_data.isa_level == MIPS_CPU_ISA_I) {
+		if (regs->cp0_status & ST0_KUO)
+			_stp_printf("KUo ");
+		if (regs->cp0_status & ST0_IEO)
+			_stp_printf("IEo ");
+		if (regs->cp0_status & ST0_KUP)
+			_stp_printf("KUp ");
+		if (regs->cp0_status & ST0_IEP)
+			_stp_printf("IEp ");
+		if (regs->cp0_status & ST0_KUC)
+			_stp_printf("KUc ");
+		if (regs->cp0_status & ST0_IEC)
+			_stp_printf("IEc ");
+	} else {
+		if (regs->cp0_status & ST0_KX)
+			_stp_printf("KX ");
+		if (regs->cp0_status & ST0_SX)
+			_stp_printf("SX ");
+		if (regs->cp0_status & ST0_UX)
+			_stp_printf("UX ");
+		switch (regs->cp0_status & ST0_KSU) {
+		case KSU_USER:
+			_stp_printf("USER ");
+			break;
+		case KSU_SUPERVISOR:
+			_stp_printf("SUPERVISOR ");
+			break;
+		case KSU_KERNEL:
+			_stp_printf("KERNEL ");
+			break;
+		default:
+			_stp_printf("BAD_MODE ");
+			break;
+		}
+		if (regs->cp0_status & ST0_ERL)
+			_stp_printf("ERL ");
+		if (regs->cp0_status & ST0_EXL)
+			_stp_printf("EXL ");
+		if (regs->cp0_status & ST0_IE)
+			_stp_printf("IE ");
+	}
+
+	_stp_printf("\n");
+
+	_stp_printf("Cause : %08x\n", cause);
+
+	cause = (((cause) & CAUSEF_EXCCODE) >> CAUSEB_EXCCODE);
+	if (1 <= cause && cause <= 5)
+		_stp_printf("BadVA : %0*lx\n", field, regs->cp0_badvaddr);
+
+	_stp_printf("PrId  : %08x\n", read_c0_prid());
+}
 #endif
 
 
diff --git a/runtime/regs.h b/runtime/regs.h
index 2f027ad..a4e13d2 100644
--- a/runtime/regs.h
+++ b/runtime/regs.h
@@ -54,6 +54,10 @@
 #define REG_SP(regs) regs->ARM_sp
 #define REG_LINK(regs) regs->ARM_lr
 
+#elif defined (__mips__)
+#define REG_IP(regs) regs->cp0_epc
+#define REG_SP(regs) regs->regs[29]
+
 #elif defined (__s390__) || defined (__s390x__)
 
 #ifndef __s390x__
diff --git a/runtime/stack.c b/runtime/stack.c
index a7d03db..b216e6e 100644
--- a/runtime/stack.c
+++ b/runtime/stack.c
@@ -78,6 +78,8 @@ static int _stp_valid_pc_addr(unsigned long addr, struct task_struct *tsk)
 #include "stack-ia64.c"
 #elif defined (__arm__)
 #include "stack-arm.c"
+#elif defined (__mips__)
+#include "stack-mips.c"
 #elif defined (__s390__)
 #include "stack-s390.c"
 #else
diff --git a/runtime/syscall.h b/runtime/syscall.h
index b959d46..7b50274 100644
--- a/runtime/syscall.h
+++ b/runtime/syscall.h
@@ -77,6 +77,55 @@
 #define MREMAP_SYSCALL_NO(tsk)		1156
 #endif
 
+#if defined(__mips__)
+/* n64 values: scall64-64.S */
+#define MMAP_SYSCALL_NO_MIPS_N64	5009
+#define MMAP2_SYSCALL_NO_MIPS_N64	((unsigned long)-1) /* does not exits */
+#define MPROTECT_SYSCALL_NO_MIPS_N64	5010
+#define MUNMAP_SYSCALL_NO_MIPS_N64	5011
+#define MREMAP_SYSCALL_NO_MIPS_N64	5024
+
+/* n32 values: scall64-n32.S */
+#define MMAP_SYSCALL_NO_MIPS_N32	6009
+#define MMAP2_SYSCALL_NO_MIPS_N32	((unsigned long)-1) /* does not exits */
+#define MPROTECT_SYSCALL_NO_MIPS_N32	6010
+#define MUNMAP_SYSCALL_NO_MIPS_N32	6011
+#define MREMAP_SYSCALL_NO_MIPS_N32	6024
+
+/* o32 values: scall32-o32.S */
+#define MMAP_SYSCALL_NO_MIPS_O32	4090
+#define MMAP2_SYSCALL_NO_MIPS_O32	4210
+#define MPROTECT_SYSCALL_NO_MIPS_O32	4125
+#define MUNMAP_SYSCALL_NO_MIPS_O32	4091
+#define MREMAP_SYSCALL_NO_MIPS_O32	4167
+
+#define MMAP_SYSCALL_NO(tsk) ((test_tsk_thread_flag((tsk), TIF_32BIT_ADDR)) ?	   \
+			      ((test_tsk_thread_flag((tsk), TIF_32BIT_REGS)) ?	   \
+			       (MMAP_SYSCALL_NO_MIPS_O32) :			   \
+			       (MMAP_SYSCALL_NO_MIPS_N32)) :			   \
+			      (MMAP_SYSCALL_NO_MIPS_N64))
+#define MMAP2_SYSCALL_NO(tsk) ((test_tsk_thread_flag((tsk), TIF_32BIT_ADDR)) ?	   \
+			      ((test_tsk_thread_flag((tsk), TIF_32BIT_REGS)) ?	   \
+			       (MMAP2_SYSCALL_NO_MIPS_O32) :			   \
+			       (MMAP2_SYSCALL_NO_MIPS_N32)) :			   \
+			      (MMAP2_SYSCALL_NO_MIPS_N64))
+#define MPROTECT_SYSCALL_NO(tsk) ((test_tsk_thread_flag((tsk), TIF_32BIT_ADDR)) ?  \
+			      ((test_tsk_thread_flag((tsk), TIF_32BIT_REGS)) ?	   \
+			       (MPROTECT_SYSCALL_NO_MIPS_O32) :			   \
+			       (MPROTECT_SYSCALL_NO_MIPS_N32)) :		   \
+			      (MPROTECT_SYSCALL_NO_MIPS_N64))
+#define MUNMAP_SYSCALL_NO(tsk) ((test_tsk_thread_flag((tsk), TIF_32BIT_ADDR)) ?	   \
+			      ((test_tsk_thread_flag((tsk), TIF_32BIT_REGS)) ?	   \
+			       (MUNMAP_SYSCALL_NO_MIPS_O32) :			   \
+			       (MUNMAP_SYSCALL_NO_MIPS_N32)) :			   \
+			      (MUNMAP_SYSCALL_NO_MIPS_N64))
+#define MREMAP_SYSCALL_NO(tsk) ((test_tsk_thread_flag((tsk), TIF_32BIT_ADDR)) ?	   \
+			      ((test_tsk_thread_flag((tsk), TIF_32BIT_REGS)) ?	   \
+			       (MREMAP_SYSCALL_NO_MIPS_O32) :			   \
+			       (MREMAP_SYSCALL_NO_MIPS_N32)) :			   \
+			      (MREMAP_SYSCALL_NO_MIPS_N64))
+#endif
+
 #if defined(__s390__) || defined(__s390x__)
 #define MMAP_SYSCALL_NO(tsk)		90
 #define MMAP2_SYSCALL_NO(tsk)		192
diff --git a/runtime/time.c b/runtime/time.c
index 10bb2aa..9cffc6f 100644
--- a/runtime/time.c
+++ b/runtime/time.c
@@ -40,6 +40,22 @@ static int __stp_cpufreq_notifier_registered = 0;
                                 STP_TIME_SYNC_INTERVAL_NOCPUFREQ)
 #endif
 
+#ifdef CONFIG_CPU_CAVIUM_OCTEON
+/* Octeon supports a 64 bit cycle counter we might as well use it */
+static inline cycles_t octeon_get_cycles(void)
+{
+    cycles_t result;
+    asm volatile ("rdhwr %0,$31\n"
+#ifndef CONFIG_64BIT
+                  "sll %0,0\n"
+#endif
+                  : "=r" (result));
+    return result;
+}
+#define get_cycles octeon_get_cycles
+#endif /* CONFIG_CPU_CAVIUM_OCTEON */
+
+
 #ifndef NSEC_PER_MSEC
 #define NSEC_PER_MSEC	1000000L
 #endif
diff --git a/tapset/errno.stp b/tapset/errno.stp
index df1ccbd..7e1d2f4 100644
--- a/tapset/errno.stp
+++ b/tapset/errno.stp
@@ -390,6 +390,8 @@ static long _stp_returnval(struct pt_regs *regs) {
 		return regs->regs[0];
 #elif defined (__arm__)
 		return regs->ARM_r0;
+#elif defined (__mips__)
+		return regs->regs[2];
 #else
 		_stp_error("returnval() not defined for this architecture");
 		return 0;
diff --git a/tapset/linux/aux_syscalls.stp b/tapset/linux/aux_syscalls.stp
index 6c1ead2..9fd9cf7 100644
--- a/tapset/linux/aux_syscalls.stp
+++ b/tapset/linux/aux_syscalls.stp
@@ -3355,7 +3355,7 @@ static void _stp_sigaction_str(struct sigaction *act, char *ptr, int len)
       strlcat (ptr, ", ", len);
       _stp_lookup_or_str(_stp_sa_flags_list, act->sa_flags, ptr, len);
       strlcat (ptr, ", ", len);
-#if !defined (__ia64__)
+#if !defined (__ia64__) && !defined (__mips__)
       slen = strlen(ptr);
       _stp_snprintf(ptr + slen, len - slen,
 		    "0x%lx, ", (long)act->sa_restorer);
diff --git a/tapset/linux/scheduler.stp b/tapset/linux/scheduler.stp
index 579b4c2..6f5c0cc 100644
--- a/tapset/linux/scheduler.stp
+++ b/tapset/linux/scheduler.stp
@@ -117,7 +117,7 @@ probe scheduler.balance = kernel.function("idle_balance") ?
  */
 
 probe scheduler.ctxswitch = kernel.trace("sched_switch") !,
-%( arch != "x86_64" && arch != "ia64" && arch != "arm" %?
+%( arch != "x86_64" && arch != "ia64" && arch != "arm"  && arch != "mips" %?
 	kernel.function("__switch_to")
 %:
 	kernel.function("context_switch")
diff --git a/tapset/linux/syscalls2.stp b/tapset/linux/syscalls2.stp
index b39f17d..8579c84 100644
--- a/tapset/linux/syscalls2.stp
+++ b/tapset/linux/syscalls2.stp
@@ -1867,7 +1867,11 @@ probe syscall.rt_sigreturn.return =
 	kernel.function("sys32_rt_sigreturn").return ?
 {
 	name = "rt_sigreturn"
+%( arch == "mips" %?
+	retstr = "void"
+%:
 	retstr = return_str(1, $return)
+%)
 }
 
 # rt_sigsuspend ______________________________________________
@@ -3878,7 +3882,11 @@ probe syscall.sigreturn.return = kernel.function("sys_sigreturn").return ?,
                                  kernel.function("sys32_sigreturn").return ?
 {
 	name = "sigreturn"
+%( arch == "mips" %?
+	retstr = "void"
+%:
 	retstr = return_str(1, $return)
+%)
 }
 
 # sigsuspend _________________________________________________
diff --git a/tapset/mips/aux_syscalls.stp b/tapset/mips/aux_syscalls.stp
new file mode 100644
index 0000000..5de5485
--- /dev/null
+++ b/tapset/mips/aux_syscalls.stp
@@ -0,0 +1,44 @@
+# arch-specific requests of ptrace ___________________________
+#
+function _arch_ptrace_argstr(request, pid, addr, data)
+{
+	if (request == %{ PTRACE_GETREGS %})
+		// TODO: Retrieve *data in .return
+		return sprintf ("PTRACE_GETREGS, %d, data=%p", pid, data)
+	if (request == %{ PTRACE_SETREGS %})
+		// TODO: Retrieve *data here
+		return sprintf ("PTRACE_SETREGS, %d, data=%p", pid, data)
+	if (request == %{ PTRACE_GETFPREGS %})
+		// TODO: Retrieve *data in .return
+		return sprintf ("PTRACE_GETFPREGS, %d, data=%p", pid, data)
+	if (request == %{ PTRACE_SETFPREGS %})
+		// TODO: Retrieve *data here
+		return sprintf ("PTRACE_SETFPREGS, %d, data=%p", pid, data)
+	if (request == %{ PTRACE_PEEKTEXT_3264 %})
+		// TODO: Retrieve *data in .return
+		return sprintf ("PTRACE_PEEKTEXT_3264, %d, *addr=%p, data=%p", pid, user_long(addr), data)
+	if (request == %{ PTRACE_PEEKDATA_3264 %})
+		// TODO: Retrieve *data in .return
+		return sprintf ("PTRACE_PEEKDATA_3264, %d, *addr=%p, data=%p", pid, user_long(addr), data)
+	if (request == %{ PTRACE_POKETEXT_3264 %})
+		return sprintf ("PTRACE_POKETEXT_3264, %d, *addr=%p, data=%p", pid, user_long(addr), data)
+	if (request == %{ PTRACE_POKEDATA_3264 %})
+		return sprintf ("PTRACE_POKEDATA_3264, %d, *addr=%p, data=%p", pid, user_long(addr), data)
+	if (request == %{ PTRACE_GET_THREAD_AREA %})
+		// TODO: Retrieve *data in .return
+		return sprintf ("PTRACE_GET_THREAD_AREA, %d, index=%d, data=%p", pid, addr, data)
+	if (request == %{ PTRACE_GET_THREAD_AREA_3264 %})
+		// TODO: Retrieve *data in .return
+		return sprintf ("PTRACE_GET_THREAD_AREA_3264, %d, index=%d, data=%p", pid, addr, data)
+	if (request == %{ PTRACE_GET_WATCH_REGS %})
+		// TODO: Retrieve *data in .return
+		return sprintf ("PTRACE_GET_WATCH_REGS, %d, data=%p", pid, data)
+	if (request == %{ PTRACE_SET_WATCH_REGS %})
+		// TODO: Retrieve *data here
+		return sprintf ("PTRACE_SET_WATCH_REGS, %d, data=%p", pid, data)
+}
+
+function _ptrace_return_arch_prctl_addr:long(request:long, addr:long, data:long)
+{
+	return 0
+}
diff --git a/tapset/mips/registers.stp b/tapset/mips/registers.stp
new file mode 100644
index 0000000..be50f76
--- /dev/null
+++ b/tapset/mips/registers.stp
@@ -0,0 +1,276 @@
+/* Dwarfless register access for mips */
+
+global _reg_offsets, _stp_regs_registered
+
+function _stp_register_regs() {
+%( CONFIG_64BIT == "y" %?
+        /* n32/n64 registers naming scheme */
+	/* Same order as struct pt_regs */
+	_reg_offsets["zero"] = 0
+	_reg_offsets["at"] = 8
+	_reg_offsets["v0"] = 16
+	_reg_offsets["v1"] = 24
+	_reg_offsets["a0"] = 32
+	_reg_offsets["a1"] = 40
+	_reg_offsets["a2"] = 48
+	_reg_offsets["a3"] = 56
+	_reg_offsets["a4"] = 64
+	_reg_offsets["a5"] = 72
+	_reg_offsets["a6"] = 80
+	_reg_offsets["a7"] = 88
+	_reg_offsets["t0"] = 96
+	_reg_offsets["t1"] = 104
+	_reg_offsets["t2"] = 112
+	_reg_offsets["t3"] = 120
+	_reg_offsets["s0"] = 128
+	_reg_offsets["s1"] = 136
+	_reg_offsets["s2"] = 144
+	_reg_offsets["s3"] = 152
+	_reg_offsets["s4"] = 160
+	_reg_offsets["s5"] = 168
+	_reg_offsets["s6"] = 176
+	_reg_offsets["s7"] = 184
+	_reg_offsets["t8"] = 192
+	_reg_offsets["t9"] = 200
+	_reg_offsets["k0"] = 208
+	_reg_offsets["k1"] = 216
+	_reg_offsets["gp"] = 224
+	_reg_offsets["sp"] = 232
+	_reg_offsets["s8"] = 240       _reg_offsets["fp"] = 240
+	_reg_offsets["ra"] = 248
+
+	_reg_offsets["status"] = 256
+	_reg_offsets["hi"] = 264
+	_reg_offsets["lo"] = 272
+
+        /*
+         * no CONFIG_CPU_HAS_SMARTMIPS support for now, if it is
+         * enabled below values will be wrong
+         */
+
+	_reg_offsets["badvaddr"] = 280
+	_reg_offsets["cause"] = 288
+	_reg_offsets["epc"] = 296
+
+        /* no cp0_tcstatus register for now */
+        /* no mpl and mtp registers for now */
+%:
+        /* o32 registers naming scheme */
+	/* Same order as struct pt_regs */
+	_reg_offsets["zero"] = 24
+	_reg_offsets["at"] = 28
+	_reg_offsets["v0"] = 32
+	_reg_offsets["v1"] = 36
+	_reg_offsets["a0"] = 40
+	_reg_offsets["a1"] = 44
+	_reg_offsets["a2"] = 48
+	_reg_offsets["a3"] = 52
+	_reg_offsets["t0"] = 56
+	_reg_offsets["t1"] = 60
+	_reg_offsets["t2"] = 64
+	_reg_offsets["t3"] = 68
+	_reg_offsets["t4"] = 72
+	_reg_offsets["t5"] = 76
+	_reg_offsets["t6"] = 80
+	_reg_offsets["t7"] = 84
+	_reg_offsets["s0"] = 88
+	_reg_offsets["s1"] = 92
+	_reg_offsets["s2"] = 96
+	_reg_offsets["s3"] = 100
+	_reg_offsets["s4"] = 104
+	_reg_offsets["s5"] = 108
+	_reg_offsets["s6"] = 112
+	_reg_offsets["s7"] = 116
+	_reg_offsets["t8"] = 120
+	_reg_offsets["t9"] = 124
+	_reg_offsets["k0"] = 128
+	_reg_offsets["k1"] = 132
+	_reg_offsets["gp"] = 136
+	_reg_offsets["sp"] = 140
+	_reg_offsets["s8"] = 144     _reg_offsets["fp"] = 144
+	_reg_offsets["ra"] = 148
+
+	_reg_offsets["status"] = 152
+	_reg_offsets["hi"] = 156
+	_reg_offsets["lo"] = 160
+
+        /*
+         * no CONFIG_CPU_HAS_SMARTMIPS support for now, if it is
+         * enabled below values will be wrong
+         */
+	_reg_offsets["badvaddr"] = 164
+	_reg_offsets["cause"] = 168
+	_reg_offsets["epc"] = 172
+
+        /* no cp0_tcstatus register for now */
+        /* no mpl and mtp registers for now */
+%)
+	_stp_regs_registered = 1
+}
+
+function probing_app_with_32bit_regs() %{ /* pure */
+        THIS->__retvalue = _stp_probing_app_with_32bit_regs(CONTEXT->regs);
+%}
+
+function _stp_get_register_by_offset:long (offset:long) %{ /* pure */
+	long value;
+	if (!CONTEXT->regs) {
+		CONTEXT->last_error = "No registers available in this context";
+		return;
+	}
+	if (THIS->offset < 0 || THIS->offset > sizeof(struct pt_regs) - sizeof(long)) {
+		snprintf(CONTEXT->error_buffer, sizeof(CONTEXT->error_buffer),
+				"Bad register offset: %lld",
+				(long long)THIS->offset);
+		CONTEXT->last_error = CONTEXT->error_buffer;
+		return;
+	}
+	memcpy(&value, ((char *)CONTEXT->regs) + THIS->offset, sizeof(value));
+	THIS->__retvalue = value;
+%}
+
+function _stp_sign_extend32:long (value:long) {
+	if (value & 0x80000000)
+		value |= (0xffffffff << 32)
+	return value
+}
+
+function _stp_register:long (name:string, sign_extend:long) {
+	if (!registers_valid()) {
+		error("cannot access CPU registers in this context")
+		return 0
+	}
+	if (!_stp_regs_registered)
+		_stp_register_regs()
+	offset = _reg_offsets[name]
+	if (offset == 0 && !(name in _reg_offsets)) {
+		error("Unknown register: " . name)
+		return 0
+	}
+	value = _stp_get_register_by_offset(offset)
+%( CONFIG_64BIT == "y" %?
+	if (probing_app_with_32bit_regs()) {
+%)
+		if (sign_extend)
+			value = _stp_sign_extend32(value)
+		else
+			value &= 0xffffffff
+%( CONFIG_64BIT == "y" %?
+	}
+%)
+	return value
+}
+
+/* Return the named register value as a signed value. */
+function register:long (name:string) {
+	return _stp_register(name, 1)
+}
+
+/*
+ * Return the named register value as an unsigned value.  Specifically,
+ * don't sign-extend the register value when promoting it to 64 bits.
+ */
+function u_register:long (name:string) {
+	return _stp_register(name, 0)
+}
+
+/*
+ * Return the value of function arg #argnum (1=first arg).
+ * If truncate=1, mask off the top 32 bits.
+ * If sign_extend=1 and (truncate=1 or the probepoint we've hit is in a
+ * 32-bit app), sign-extend the 32-bit value.
+ */
+function _stp_arg:long (argnum:long, sign_extend:long, truncate:long) {
+	val = 0
+	if (argnum < 1 || argnum > 8) {
+		error(sprintf("Cannot access arg(%d)", argnum))
+		return 0
+	}
+
+	if (argnum == 1)
+		val = u_register("a0")
+	else if (argnum == 2)
+		val = u_register("a1")
+	else if (argnum == 3)
+		val = u_register("a2")
+	else if (argnum == 4)
+		val = u_register("a3")
+	else if (argnum == 5)
+		val = u_register("a4")
+	else if (argnum == 6)
+		val = u_register("a5")
+	else if (argnum == 7)
+		val = u_register("a6")
+	else if (argnum == 8)
+		val = u_register("a7")
+
+	if (truncate) {
+		if (sign_extend)
+			val = _stp_sign_extend32(val)
+		else
+			/* High bits may be garbage. */
+			val = (val & 0xffffffff);
+	}
+	return val;
+}
+
+/* Return the value of function arg #argnum (1=first arg) as a signed int. */
+function int_arg:long (argnum:long) {
+	return _stp_arg(argnum, 1, 1)
+}
+
+/* Return the value of function arg #argnum (1=first arg) as an unsigned int. */
+function uint_arg:long (argnum:long) {
+	return _stp_arg(argnum, 0, 1)
+}
+
+function long_arg:long (argnum:long) {
+	return _stp_arg(argnum, 1, 0)
+}
+
+function ulong_arg:long (argnum:long) {
+	return _stp_arg(argnum, 0, 0)
+}
+
+function longlong_arg:long (argnum:long) {
+	if (probing_app_with_32bit_regs()) {
+		lowbits = _stp_arg(argnum, 0, 1)
+		highbits = _stp_arg(argnum+1, 0, 1)
+		return ((highbits << 32) | lowbits)
+	} else
+		return _stp_arg(argnum, 0, 0)
+}
+
+function ulonglong_arg:long (argnum:long) {
+	return longlong_arg(argnum)
+}
+
+function pointer_arg:long (argnum:long) {
+	return _stp_arg(argnum, 0, 0)
+}
+
+function s32_arg:long (argnum:long) {
+	return int_arg(argnum)
+}
+
+function u32_arg:long (argnum:long) {
+	return uint_arg(argnum)
+}
+
+function s64_arg:long (argnum:long) {
+	return longlong_arg(argnum)
+}
+
+function u64_arg:long (argnum:long) {
+	return ulonglong_arg(argnum)
+}
+
+function asmlinkage() %{ /* pure */ %}
+
+function fastcall() %{ /* pure */ %}
+
+function regparm() %{
+	snprintf(CONTEXT->error_buffer, sizeof(CONTEXT->error_buffer),
+		"regparm is invalid on mips.");
+	CONTEXT->last_error = CONTEXT->error_buffer;
+%}
diff --git a/tapsets.cxx b/tapsets.cxx
index 2a50fbd..dd80185 100644
--- a/tapsets.cxx
+++ b/tapsets.cxx
@@ -2397,6 +2397,7 @@ validate_module_elf (Dwfl_Module *mod, const char *name,  base_query *q)
     case EM_IA_64: expect_machine = "ia64"; break;
     case EM_ARM: expect_machine = "arm*"; break;
     case EM_AARCH64: expect_machine = "arm64"; break;
+    case EM_MIPS: expect_machine = "mips"; break;
       // XXX: fill in some more of these
     default: expect_machine = "?"; break;
     }
-- 
1.7.10.4


[-- Attachment #3: systemtap.sum --]
[-- Type: text/plain, Size: 25628 bytes --]

Test Run By root on Sun Aug  2 02:23:25 2015
Native configuration is mipsel-unknown-linux-gnu

		=== systemtap tests ===

Schedule of variations:
    unix

Running target unix

Host: Linux ci20 3.0.8loc-12469-gc52aae2 #1 SMP PREEMPT Sat Aug 1 05:04:05 BST 2015 mips GNU/Linux
Snapshot: version 2.9/0.152, commit release-2.8-51-g7cfb10eca050 + changes
GCC: 4.6.3 [gcc (Debian 4.6.3-14) 4.6.3]
Distro: 7.8
SElinux: unknown


Running ./systemtap/notest.exp ...
Running ./systemtap.apps/java.exp ...
UNTESTED: java - no javac
Running ./systemtap.apps/mysql.exp ...
UNTESTED: mysql sdt app
Running ./systemtap.apps/postgres.exp ...
UNTESTED: postgres sdt app
Running ./systemtap.apps/python.exp ...
UNTESTED: python sdt app
Running ./systemtap.apps/tcl.exp ...
UNTESTED: tcl sdt app
Running ./systemtap.apps/xulrunner.exp ...
UNTESTED: xulrunner sdt app
Running ./systemtap.base/add.exp ...
PASS: ./systemtap.base/add.stp startup
PASS: ./systemtap.base/add.stp load generation
PASS: ./systemtap.base/add.stp shutdown and output
Running ./systemtap.base/additional_scripts.exp ...
PASS: additional_scripts (no script)
PASS: additional_scripts (-E BAD_SCRIPT) 
PASS: additional_scripts (-E listing probes) 
PASS: additional_scripts (-E BAD_SCRIPT listing probes) 
PASS: additional_scripts (-e and -E ) 
FAIL: additional_scripts (file and -E)
FAIL: additional_scripts (multiple -E)
Running ./systemtap.base/alias-condition.exp ...
PASS: ./systemtap.base/alias-condition.stp startup
PASS: ./systemtap.base/alias-condition.stp load generation
PASS: ./systemtap.base/alias-condition.stp shutdown and output
Running ./systemtap.base/alias_suffixes.exp ...
PASS: ./systemtap.base/alias_suffixes01.stp startup
PASS: ./systemtap.base/alias_suffixes01.stp load generation
PASS: ./systemtap.base/alias_suffixes01.stp shutdown and output
PASS: ./systemtap.base/alias_suffixes02.stp startup
PASS: ./systemtap.base/alias_suffixes02.stp load generation
PASS: ./systemtap.base/alias_suffixes02.stp shutdown and output
PASS: ./systemtap.base/alias_suffixes03.stp startup
PASS: ./systemtap.base/alias_suffixes03.stp load generation
PASS: ./systemtap.base/alias_suffixes03.stp shutdown and output
PASS: ./systemtap.base/alias_suffixes04.stp startup
PASS: ./systemtap.base/alias_suffixes04.stp load generation
PASS: ./systemtap.base/alias_suffixes04.stp shutdown and output
PASS: ./systemtap.base/alias_suffixes05.stp startup
PASS: ./systemtap.base/alias_suffixes05.stp load generation
PASS: ./systemtap.base/alias_suffixes05.stp shutdown and output
Running ./systemtap.base/alias_tapset.exp ...
PASS: alias_tapset
Running ./systemtap.base/alternatives.exp ...
FAIL: LOCAL1 (0)
FAIL: STRUCT1 (0)
Running ./systemtap.base/argv.exp ...
PASS: argv naked
PASS: argv one
PASS: argv two
PASS: argv one other
PASS: argv two other
PASS: argv two mixed
PASS: argv three mixed
Running ./systemtap.base/arith.exp ...
PASS: arith
Running ./systemtap.base/arith_limits.exp ...
PASS: arith_limits
Running ./systemtap.base/array_size.exp ...
PASS: ./systemtap.base/array_size.stp startup
PASS: ./systemtap.base/array_size.stp load generation
PASS: ./systemtap.base/array_size.stp shutdown and output
Running ./systemtap.base/array_slicing.exp ...
PASS: $test_name foreach (... val[*, *]) startup
PASS: $test_name foreach (... val[*, *]) shutdown and output
PASS: $test_name foreach (... val[int, int]) startup
PASS: $test_name foreach (... val[int, int]) shutdown and output
PASS: $test_name foreach (... val[string, string]) startup
PASS: $test_name foreach (... val[string, string]) shutdown and output
PASS: $test_name foreach (... val[variable, *]) startup
PASS: $test_name foreach (... val[variable, *]) shutdown and output
PASS: $test_name foreach (... val[variable, string]) startup
PASS: $test_name foreach (... val[variable, string]) shutdown and output
PASS: $test_name foreach (... val[c,d]) {c++;d++;} startup
PASS: $test_name foreach (... val[c,d]) {c++;d++;} shutdown and output
PASS: $test_name foreach (... val[expression,*]) startup
PASS: $test_name foreach (... val[expression,*]) shutdown and output
PASS: $test_name foreach sorting startup
PASS: $test_name foreach sorting shutdown and output
PASS: $test_name delete val[*,*] startup
PASS: $test_name delete val[*,*] shutdown and output
PASS: $test_name delete val[*, string] startup
PASS: $test_name delete val[*, string] shutdown and output
PASS: $test_name delete val[int, *] startup
PASS: $test_name delete val[int, *] shutdown and output
PASS: $test_name delete val[epression, *] startup
PASS: $test_name delete val[epression, *] shutdown and output
PASS: $test_name delete pmaps startup
PASS: $test_name delete pmaps shutdown and output
PASS: $test_name membership [*,*] in val startup
PASS: $test_name membership [*,*] in val shutdown and output
PASS: $test_name membership [*, string] in val startup
PASS: $test_name membership [*, string] in val shutdown and output
PASS: $test_name membership [int, *] in val startup
PASS: $test_name membership [int, *] in val shutdown and output
PASS: $test_name membership [expression,*] in val startup
PASS: $test_name membership [expression,*] in val shutdown and output
PASS: $test_name membership pmaps startup
PASS: $test_name membership pmaps shutdown and output
PASS: $test_name membership pmaps (2) startup
PASS: $test_name membership pmaps (2) shutdown and output
Running ./systemtap.base/array_string.exp ...
PASS: ARRAY_STRING startup
PASS: ARRAY_STRING load generation
PASS: ARRAY_STRING shutdown and output
Running ./systemtap.base/at_var.exp ...
UNTESTED: at_var
Running ./systemtap.base/at_var_cu.exp ...
UNTESTED: at_var_cu
Running ./systemtap.base/at_var_func.exp ...
UNTESTED: at_var_func
Running ./systemtap.base/at_var_lvalue.exp ...
UNTESTED: at_var_lvalue
Running ./systemtap.base/at_var_mark.exp ...
UNTESTED: at_var_mark
Running ./systemtap.base/at_var_mark_func.exp ...
UNTESTED: at_var_mark_func
Running ./systemtap.base/at_var_pie.exp ...
UNTESTED: at_var_pie
Running ./systemtap.base/at_var_timer_profile.exp ...
UNTESTED: at_var_timer_profile
Running ./systemtap.base/at_var_tracepoint.exp ...
FAIL: at_var_tracepoint compilation
Running ./systemtap.base/at_var_unresolved.exp ...
PASS: at_var_unresolved (1)
PASS: at_var_unresolved (cuname: 1, 0)
Running ./systemtap.base/at_var_unresolved_lvalue.exp ...
UNTESTED: at_var_unresolved_lvalue
Running ./systemtap.base/at_var_void_stmt.exp ...
FAIL: at_var_void_stmt (0, 2)
Running ./systemtap.base/atomic.exp ...
PASS: atomic1 expected error
PASS: atomic2 expected error
PASS: atomic3 expected error
PASS: atomic4 no expected error
PASS: atomic5 expected error
PASS: atomic6 expected error
PASS: atomic7 expected error
PASS: atomic8 no expected error
Running ./systemtap.base/backtrace.exp ...
KFAIL: backtrace (0 0) (PRMS: 10739)
KFAIL: backtrace-unwindsyms (0 0) (PRMS: 10739)
KPASS: self-unwind-ensure-exact (0) (PRMS 10739)
Running ./systemtap.base/bad-code.exp ...
PASS: bad-code.c compile
FAIL: bad-code
Running ./systemtap.base/badkprobe.exp ...
PASS: bad kprobe registration: kernel.statement(-1).absolute
PASS: bad kprobe registration: kprobe.statement(-1).absolute
PASS: bad optional kprobe registration: kernel.statement(-1).absolute
PASS: bad optional kprobe registration: kprobe.statement(-1).absolute
Running ./systemtap.base/be_loaded.exp ...
PASS: be_loaded
Running ./systemtap.base/be_order.exp ...
PASS: ./systemtap.base/be_order.stp startup
PASS: ./systemtap.base/be_order.stp load generation
PASS: ./systemtap.base/be_order.stp shutdown and output
Running ./systemtap.base/beginenderror.exp ...
PASS: beginenderror (5 3 0)
Running ./systemtap.base/bench.exp ...
PASS: bench (524)
Running ./systemtap.base/bitfield.exp ...
FAIL: ./systemtap.base/bitfield.stp compilation
Running ./systemtap.base/buildid.exp ...
UNTESTED: buildid (uprobes)
Running ./systemtap.base/bz10078.exp ...
PASS: bz10078 compile
UNTESTED: bz10078 -p4
UNTESTED: bz10078 -p5
Running ./systemtap.base/bz1027459.exp ...
FAIL: bz1027459 (timeout)
FAIL: bz1027459 -p5 (0)
Running ./systemtap.base/bz1074541.exp ...
PASS: ./bz1074541
Running ./systemtap.base/bz1126645.exp ...
FAIL: bz1126645 -p5 (0)
Running ./systemtap.base/bz13338.exp ...
PASS: bz13338
Running ./systemtap.base/bz5274.exp ...
UNTESTED: ./bz5274 -p5
Running ./systemtap.base/bz6503.exp ...
FAIL: bz6503 0 0
Running ./systemtap.base/bz6850.exp ...
PASS: bz6850 compile
UNTESTED: bz6850 -p4
UNTESTED: bz6850 -p5
Running ./systemtap.base/cache.exp ...
PASS: BASIC1 wasn't cached
PASS: BASIC2 was cached
PASS: OPTION1 wasn't cached
PASS: OPTION2 was cached
PASS: BULK1 wasn't cached
PASS: BULK2 was cached
PASS: TIMING1 wasn't cached
PASS: TIMING2 was cached
PASS: RUNTIME1 wasn't cached
PASS: RUNTIME2 was cached
PASS: DISABLED1 wasn't cached
PASS: DISABLED2 wasn't cached
PASS: MODNAM1 wasn't cached
PASS: MODNAM2 wasn't cached
PASS: ERROR1 wasn't cached
PASS: ERROR2 wasn't cached
PASS: BASIC3 wasn't cached
PASS: BASIC4 was cached
Running ./systemtap.base/cache_clean.exp ...
PASS: cache_clean premature cleaning
PASS: cache_clean timed cleaning
Running ./systemtap.base/callee.exp ...
UNTESTED: callee
Running ./systemtap.base/caller.exp ...
FAIL: caller startup (eof)
Running ./systemtap.base/cast-scope.exp ...
PASS: cast-scope-m32 compile
UNTESTED: cast-scope-m32
PASS: cast-scope-m32 compile
UNTESTED: cast-scope-m32
PASS: cast-scope-m32-O compile
UNTESTED: cast-scope-m32-O
Running ./systemtap.base/cast-user.exp ...
PASS: cast-user compile
FAIL: cast-user
Running ./systemtap.base/cast.exp ...
FAIL: ./systemtap.base/cast.stp
Running ./systemtap.base/cmd_parse.exp ...
PASS: cmd_parse1
PASS: cmd_parse2
PASS: cmd_parse3
PASS: cmd_parse4
PASS: cmd_parse5
PASS: cmd_parse6
PASS: cmd_parse7
PASS: cmd_parse8
PASS: cmd_parse9
PASS: cmd_parse10
PASS: cmd_parse11
PASS: cmd_parse12
PASS: cmd_parse13
PASS: cmd_parse14
PASS: cmd_parse15
FAIL: cmd_parse16: eof
Running ./systemtap.base/cmdline.exp ...
FAIL: cmdline
Running ./systemtap.base/color_parsing.exp ...
PASS: color_parsing (empty - stap: output matched)
PASS: color_parsing (empty - staprun: output matched)
PASS: color_parsing (short_key1 - stap: output matched)
PASS: color_parsing (short_key1 - staprun: output matched)
PASS: color_parsing (short_key2 - stap: output matched)
PASS: color_parsing (short_key2 - staprun: output matched)
PASS: color_parsing (short_key3 - stap: output matched)
PASS: color_parsing (short_key3 - staprun: output matched)
PASS: color_parsing (short_key4 - stap: output matched)
PASS: color_parsing (short_key4 - staprun: output matched)
PASS: color_parsing (short_key5 - stap: output matched)
PASS: color_parsing (short_key5 - staprun: output matched)
PASS: color_parsing (short_key6 - stap: output matched)
PASS: color_parsing (short_key6 - staprun: output matched)
PASS: color_parsing (short_key7 - stap: output matched)
PASS: color_parsing (short_key7 - staprun: output matched)
PASS: color_parsing (short_key8 - stap: output matched)
PASS: color_parsing (short_key8 - staprun: output matched)
PASS: color_parsing (short_key9 - stap: output matched)
PASS: color_parsing (short_key9 - staprun: output matched)
PASS: color_parsing (no_eq1 - stap: output matched)
PASS: color_parsing (no_eq1 - staprun: output matched)
PASS: color_parsing (no_eq2 - stap: output matched)
PASS: color_parsing (no_eq2 - staprun: output matched)
PASS: color_parsing (no_eq3 - stap: output matched)
PASS: color_parsing (no_eq3 - staprun: output matched)
PASS: color_parsing (no_eq4 - stap: output matched)
PASS: color_parsing (no_eq4 - staprun: output matched)
PASS: color_parsing (no_eq5 - stap: output matched)
PASS: color_parsing (no_eq5 - staprun: output matched)
PASS: color_parsing (no_eq6 - stap: output matched)
PASS: color_parsing (no_eq6 - staprun: output matched)
PASS: color_parsing (no_eq7 - stap: output matched)
PASS: color_parsing (no_eq7 - staprun: output matched)
PASS: color_parsing (no_eq8 - stap: output matched)
PASS: color_parsing (no_eq8 - staprun: output matched)
PASS: color_parsing (no_eq9 - stap: output matched)
PASS: color_parsing (no_eq9 - staprun: output matched)
PASS: color_parsing (no_eq10 - stap: output matched)
PASS: color_parsing (no_eq10 - staprun: output matched)
PASS: color_parsing (no_key1 - stap: output matched)
PASS: color_parsing (no_key1 - staprun: output matched)
PASS: color_parsing (no_key2 - stap: output matched)
PASS: color_parsing (no_key2 - staprun: output matched)
PASS: color_parsing (no_key3 - stap: output matched)
PASS: color_parsing (no_key3 - staprun: output matched)
PASS: color_parsing (no_key4 - stap: output matched)
PASS: color_parsing (no_key4 - staprun: output matched)
PASS: color_parsing (no_key5 - stap: output matched)
PASS: color_parsing (no_key5 - staprun: output matched)
PASS: color_parsing (no_key6 - stap: output matched)
PASS: color_parsing (no_key6 - staprun: output matched)
PASS: color_parsing (no_key7 - stap: output matched)
PASS: color_parsing (no_key7 - staprun: output matched)
PASS: color_parsing (no_key8 - stap: output matched)
PASS: color_parsing (no_key8 - staprun: output matched)
PASS: color_parsing (no_key9 - stap: output matched)
PASS: color_parsing (no_key9 - staprun: output matched)
PASS: color_parsing (no_key10 - stap: output matched)
PASS: color_parsing (no_key10 - staprun: output matched)
PASS: color_parsing (no_key11 - stap: output matched)
PASS: color_parsing (no_key11 - staprun: output matched)
PASS: color_parsing (no_key12 - stap: output matched)
PASS: color_parsing (no_key12 - staprun: output matched)
PASS: color_parsing (no_key13 - stap: output matched)
PASS: color_parsing (no_key13 - staprun: output matched)
PASS: color_parsing (no_val1 - stap: output matched)
PASS: color_parsing (no_val1 - staprun: output matched)
PASS: color_parsing (no_val2 - stap: output matched)
PASS: color_parsing (no_val2 - staprun: output matched)
PASS: color_parsing (no_val3 - stap: output matched)
PASS: color_parsing (no_val3 - staprun: output matched)
PASS: color_parsing (no_val4 - stap: output matched)
PASS: color_parsing (no_val4 - staprun: output matched)
PASS: color_parsing (no_val5 - stap: output matched)
PASS: color_parsing (no_val5 - staprun: output matched)
PASS: color_parsing (bad_val1 - stap: output matched)
PASS: color_parsing (bad_val1 - staprun: output matched)
PASS: color_parsing (bad_val2 - stap: output matched)
PASS: color_parsing (bad_val2 - staprun: output matched)
PASS: color_parsing (bad_val3 - stap: output matched)
PASS: color_parsing (bad_val3 - staprun: output matched)
PASS: color_parsing (bad_val4 - stap: output matched)
PASS: color_parsing (bad_val4 - staprun: output matched)
PASS: color_parsing (bad_val5 - stap: output matched)
PASS: color_parsing (bad_val5 - staprun: output matched)
PASS: color_parsing (valid1 - stap: output matched)
PASS: color_parsing (valid1 - staprun: output matched)
PASS: color_parsing (valid2 - stap: output matched)
PASS: color_parsing (valid2 - staprun: output matched)
PASS: color_parsing (valid3 - stap: output matched)
PASS: color_parsing (valid3 - staprun: output matched)
PASS: color_parsing (valid4 - stap: output matched)
PASS: color_parsing (valid4 - staprun: output matched)
PASS: color_parsing (valid5 - stap: output matched)
PASS: color_parsing (valid5 - staprun: output matched)
PASS: color_parsing
Running ./systemtap.base/const_value.exp ...
PASS: const_value.c compile
UNTESTED: const_value
PASS: const_value_func.c compile
UNTESTED: const_value_func (no-const-value)
Running ./systemtap.base/control_limits.exp ...
PASS: control_limits MAXNESTING (1)
PASS: control_limits MAXACTION (1)
PASS: control_limits MAXSTRINGLEN small (1)
PASS: control_limits MAXSTRINGLEN large (1)
Running ./systemtap.base/crash.exp ...
UNTESTED: crash - no staplog.so
Running ./systemtap.base/ctime.exp ...
PASS: ./systemtap.base/ctime.stp
Running ./systemtap.base/cu-decl.exp ...
PASS: cu-decl-m32 target compilation
UNTESTED: cu-decl-m32
PASS: cu-decl-m32 target compilation
UNTESTED: cu-decl-m32
PASS: cu-decl-m32-O target compilation
UNTESTED: cu-decl-m32-O
Running ./systemtap.base/cxxclass.exp ...
PASS: m32 cxxclass.c compile
UNTESTED: cxxclass-m32
PASS: m32 cxxclass.c compile
UNTESTED: cxxclass-m32
PASS: m32-O cxxclass.c compile
UNTESTED: cxxclass-m32-O
Running ./systemtap.base/debug_mem.exp ...
PASS: debug_mem (run)
PASS: debug_mem
Running ./systemtap.base/debugpath.exp ...
PASS: debugpath-bad
FAIL: debugpath-good (eof)
Running ./systemtap.base/deref.exp ...
PASS: ./systemtap.base/deref.stp startup
PASS: ./systemtap.base/deref.stp load generation
FAIL: ./systemtap.base/deref.stp shutdown (eof)
Running ./systemtap.base/deref2.exp ...
UNTESTED: deref2
Running ./systemtap.base/div0.exp ...
PASS: ./systemtap.base/div0.stp startup
PASS: ./systemtap.base/div0.stp load generation
PASS: ./systemtap.base/div0.stp shutdown and output
Running ./systemtap.base/dtrace.exp ...
PASS: dtrace python -G -64 -fPIC -o dtrace-XXX.o
PASS: dtrace python -G -o dtrace-XXX
PASS: dtrace python -h -o dtrace-XXX.h
PASS: dtrace python -h -o dtrace-XXX
PASS: dtrace python -G -o /tmp/XXX.o
PASS: dtrace python -G -o /tmp/XXX
PASS: dtrace python -h -o /tmp/XXX.h
PASS: dtrace python -h -o /tmp/XXX
PASS: dtrace python -G
PASS: dtrace python -h
PASS: dtrace python CFLAGS= CC=
PASS: dtrace python -C -h -o dtrace-XXX.h
PASS: dtrace python -C -Iincpath -h -o dtrace-XXX.h
PASS: dtrace python -C --no-pyparsing -Iincpath -h -o dtrace-XXX.h
UNTESTED: dtrace python parser check
PASS: dtrace python -Iincpath -G
PASS: dtrace python known uses
PASS: dtrace python -x IGNORED
PASS: dtrace python2 -G -64 -fPIC -o dtrace-XXX.o
PASS: dtrace python2 -G -o dtrace-XXX
PASS: dtrace python2 -h -o dtrace-XXX.h
PASS: dtrace python2 -h -o dtrace-XXX
PASS: dtrace python2 -G -o /tmp/XXX.o
PASS: dtrace python2 -G -o /tmp/XXX
PASS: dtrace python2 -h -o /tmp/XXX.h
PASS: dtrace python2 -h -o /tmp/XXX
PASS: dtrace python2 -G
PASS: dtrace python2 -h
PASS: dtrace python2 CFLAGS= CC=
PASS: dtrace python2 -C -h -o dtrace-XXX.h
PASS: dtrace python2 -C -Iincpath -h -o dtrace-XXX.h
PASS: dtrace python2 -C --no-pyparsing -Iincpath -h -o dtrace-XXX.h
UNTESTED: dtrace python2 parser check
PASS: dtrace python2 -Iincpath -G
PASS: dtrace python2 known uses
PASS: dtrace python2 -x IGNORED
UNSUPPORTED: dtrace python3
Running ./systemtap.base/dump_functions.exp ...
PASS: dump_functions (got output of stap --dump-functions)
PASS: dump_functions (got output of stap -v --dump-functions)
PASS: dump_functions (user_string in output)
PASS: dump_functions (_caller_match not in output)
PASS: dump_functions (user_string in -v output)
PASS: dump_functions (_caller_match in -v output)
PASS: dump_functions (mdelay has guru in output)
PASS: dump_functions (mdelay has guru in -v output)
PASS: dump_functions (uid has unpriv but not pure in output)
PASS: dump_functions (uid has unpriv and pure in -v output)
Running ./systemtap.base/dump_probe_aliases.exp ...
PASS: dump_probe_aliases (got output of stap --dump-probe-aliases)
PASS: dump_probe_aliases (got output of stap -v --dump-probe-aliases)
PASS: dump_probe_aliases (oneshot in output)
PASS: dump_probe_aliases (vfs.read in output)
PASS: dump_probe_aliases (__syscall.accept not in output)
PASS: dump_probe_aliases (oneshot in -v output)
PASS: dump_probe_aliases (vfs.read in -v output)
PASS: dump_probe_aliases (__syscall.accept in -v output)
Running ./systemtap.base/equal.exp ...
PASS: ./systemtap.base/equal.stp startup
PASS: ./systemtap.base/equal.stp load generation
FAIL: ./systemtap.base/equal.stp shutdown (timeout)
Running ./systemtap.base/error_fn.exp ...
PASS: ./systemtap.base/error_fn.stp startup
PASS: ./systemtap.base/error_fn.stp load generation
PASS: ./systemtap.base/error_fn.stp shutdown and output
Running ./systemtap.base/execve.exp ...
FAIL: ./systemtap.base/execve.stp -c /bin/true
Running ./systemtap.base/externalvar.exp ...
UNTESTED: externalvar-m32
UNTESTED: externalvar-m32
UNTESTED: externalvar-m32-O
Running ./systemtap.base/finloop2.exp ...
PASS: ./systemtap.base/finloop2.stp startup
PASS: ./systemtap.base/finloop2.stp load generation
PASS: ./systemtap.base/finloop2.stp shutdown and output
Running ./systemtap.base/flightrec1.exp ...
PASS: flightrec1 (flight recorder option)
PASS: flightrec1 (stapio in background)
PASS: flightrec1 (output file)
PASS: flightrec1 (switch output file)
Running ./systemtap.base/flightrec2.exp ...
PASS: flightrec2 (-S option)
PASS: flightrec2 (log file numbers limitation)
PASS: flightrec2 (log file size limitation)
Running ./systemtap.base/flightrec3.exp ...
PASS: flightrec3 (-S option with bulk mode)
PASS: flightrec3 (log file size limitation with bulk mode)
Running ./systemtap.base/flightrec4.exp ...
PASS: flightrec4 (flight recorder option)
PASS: flightrec4 (output file)
PASS: flightrec4 (old output file is removed)
PASS: flightrec4 (switch output file)
Running ./systemtap.base/flightrec5.exp ...
PASS: flightrec5 (flight recorder option)
PASS: flightrec5 (output file)
PASS: flightrec5 (old output file is removed)
PASS: flightrec5 (switch output file)
Running ./systemtap.base/foreach_aggrsort.exp ...
PASS: foreach_aggrsort
Running ./systemtap.base/foreach_value.exp ...
PASS: foreach_value
Running ./systemtap.base/func_alias.exp ...
UNTESTED: func_alias
Running ./systemtap.base/global_end.exp ...
PASS: global_end (12)
PASS: global_end_var (6)
PASS: global_end_var_used (1)
Running ./systemtap.base/global_init.exp ...
PASS: ./systemtap.base/global_init.stp startup
PASS: ./systemtap.base/global_init.stp load generation
PASS: ./systemtap.base/global_init.stp shutdown and output
Running ./systemtap.base/global_opt.exp ...
PASS: global_opt
Running ./systemtap.base/global_opt_invalid.exp ...
PASS: global_opt_invalid
Running ./systemtap.base/global_opt_unknown.exp ...
UNSUPPORTED: global_opt_unknown - kernel won't ignore unknown options
Running ./systemtap.base/global_stat.exp ...
PASS: global_stat
Running ./systemtap.base/global_var.exp ...
UNTESTED: global_var-m32
UNTESTED: global_var-m32
UNTESTED: global_var-m32-O
Running ./systemtap.base/global_var_kernel.exp ...
FAIL: global_var_kernel compilation
Running ./systemtap.base/global_vars.exp ...
PASS: ./systemtap.base/global_vars.stp startup
PASS: ./systemtap.base/global_vars.stp load generation
PASS: ./systemtap.base/global_vars.stp shutdown and output
Running ./systemtap.base/gtod.exp ...
FAIL: gtod (short range) (0)
FAIL: gtod (10ms interval) (0)
FAIL: gtod (100ms interval) (0)
Running ./systemtap.base/hash_add_buildid.exp ...
UNTESTED: hash_add_buildid
Running ./systemtap.base/helpout.exp ...
PASS: helpout stap -V
PASS: helpout stap -h
PASS: helpout staprun -V
PASS: helpout staprun -h
PASS: helpout /usr/local/libexec/systemtap/stapio -V
PASS: helpout /usr/local/libexec/systemtap/stapio -h
Running ./systemtap.base/if.exp ...
PASS: ./systemtap.base/if.stp startup
PASS: ./systemtap.base/if.stp load generation
PASS: ./systemtap.base/if.stp shutdown and output
Running ./systemtap.base/implicitptr.exp ...
PASS: implicitptr.c compile m32
PASS: probe listing implicitptr-m32 (ijkl)
UNTESTED: implicitptr-m32
PASS: implicitptr.c compile m32
PASS: probe listing implicitptr-m32 (ijkl)
UNTESTED: implicitptr-m32
PASS: implicitptr.c compile m32-O
PASS: probe listing implicitptr-m32-O (ijkl)
UNTESTED: implicitptr-m32-O
Running ./systemtap.base/inc.exp ...
PASS: ./systemtap.base/inc.stp startup
PASS: ./systemtap.base/inc.stp load generation
PASS: ./systemtap.base/inc.stp shutdown and output
Running ./systemtap.base/inherit.exp ...
PASS: inherit-m32 compile
UNTESTED: inherit-m32
PASS: inherit-m32 compile
UNTESTED: inherit-m32
PASS: inherit-m32-O compile
UNTESTED: inherit-m32-O
Running ./systemtap.base/inlinedvars.exp ...
PASS: inlinedvars-m32 compile
UNTESTED: inlinedvars-m32
PASS: inlinedvars-m32 compile
UNTESTED: inlinedvars-m32
PASS: inlinedvars-m32-O compile
UNTESTED: inlinedvars-m32-O
Running ./systemtap.base/ipaddr.exp ...
PASS: ipaddr_IPv4_recvmsg find 'nc'
PASS: ipaddr_IPv4_recvmsg nc server start
FAIL: ipaddr_IPv4_recvmsg compilation
PASS: ipaddr_IPv4_recvmsg nc server stop
PASS: ipaddr_IPv4_receive nc server start
FAIL: ipaddr_IPv4_receive compilation
PASS: ipaddr_IPv4_receive nc server stop
UNTESTED: ipaddr_IPv6_recvmsg starting IPv6 nc server
Running ./systemtap.base/itrace.exp ...
UNTESTED: itrace single step check : no kernel utrace support found
UNTESTED: itrace block step check : no kernel utrace support found
UNTESTED: itrace_single1 : no kernel utrace support found
UNTESTED: itrace_single2 : no kernel utrace support found
UNTESTED: itrace_block1 : no kernel utrace support found
UNTESTED: itrace_block2 : no kernel utrace support found
Running ./systemtap.base/kallsyms_expand_symbol.exp ...
FAIL: ./systemtap.base/kallsyms_expand_symbol.stp -c {head /proc/kallsyms}
Running ./systemtap.base/kbuildenv.exp ...
PASS: kbuild PATH sanitization
Running ./systemtap.base/kfunct.exp ...
PASS: ./systemtap.base/kfunct.stp startup
PASS: ./systemtap.base/kfunct.stp load generation
PASS: ./systemtap.base/kfunct.stp shutdown and output
Running ./systemtap.base/kmodule.exp ...
PASS: kmodule (built and installed module)
PASS: ./systemtap.base/kmodule.stp startup
PASS: ./systemtap.base/kmodule.stp load generation
FAIL: ./systemtap.base/kmodule.stp shutdown (timeout)
FAIL: ./systemtap.base/kprobe_module.stp startup (timeout)
Running ./systemtap.base/kprobes.exp ...
FAIL: ./systemtap.base/kprobes.stp startup (timeout)
Running ./systemtap.base/kretprobe-vars.exp ...
FAIL: ./systemtap.base/kretprobe-vars.stp compilation
Running ./systemtap.base/labels.exp ...
UNTESTED: labels
Running ./systemtap.base/library.exp ...
UNTESTED: library
Running ./systemtap.base/limits.exp ...

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

* Re: What about MIPS support?
       [not found]       ` <CAJdmCr+1s6JLW3DsGxbdqPcpnD1+wNo5VwAifm6UN-SWE+PKmw@mail.gmail.com>
@ 2015-08-05 16:25         ` William Cohen
       [not found]           ` <CAJdmCrLN3w6J3XHTCx0uMDQDAc6LB+5qC3o7Rr+KABAriwNATg@mail.gmail.com>
  0 siblings, 1 reply; 12+ messages in thread
From: William Cohen @ 2015-08-05 16:25 UTC (permalink / raw)
  To: Crestez Dan Leonard; +Cc: systemtap

On 08/05/2015 11:36 AM, Crestez Dan Leonard wrote:
> Hello,
> 
> There is a slightly more up-to-date version of mips support for systemtap here: https://github.com/cdleonard/systemtap/commits/mips-2.7
> 
> That version is based on release 2.7, the email you replied was for some patches against release 1.6. I posted these updates mips patches for review some time ago but they are difficult to integrate properly.
> 
> I only tested my version on my embedded target and never actually attempted to run the actual test suite.
> 
> Regards,
> Leonard

Hi Leonard,

I saw the later patch set from august 2014 emails earlier this week, but haven't really had a chance to try them, they don't apply cleanly to the current systemtap git.  How hard would it be to freshen the mips patches to apply to the current systemtap git repo?

-Will
> 
> On Wed, Aug 5, 2015 at 3:42 PM, William Cohen <wcohen@redhat.com <mailto:wcohen@redhat.com>> wrote:
> 
>     On 10/15/2012 05:21 PM, Victor Kamensky wrote:
>     > Hi All,
>     >
>     > It took us much much longer than originally expected. But it is better late than never. Here is our patches tarbal attached. Inside of tarbal (README file) and copied below I put short description of each patch. Some of patches are Cisco specific and may not be any interest for you. Some like MIPS support, cross compilation improvements, misc general fixes (i.e systemtap issue 6977), I think, could be quite useful to community. Since it is quilt patch series and patches may have patch apply order issues, we are publishing all of them, exactly as we use/apply them, regardless whether we consider them Cisco specific or not.
>     >
>     > As it was discussed, for now, I am just dropping our patches as is. Latter as time permits, I can work on cleaning them up, moving to latest systemtap git and try to prepare them for commit into systemtap tree. It would be great if folks could take a look at patches and/or patches description and indicate priorities/interests for specific patches on which I could start working first.
>     >
>     > Please advise if you would like me to post the same on different subject line on this mailing list (since it covers more than just mips support). I thought I just post it on original thread to get it proper closure.
>     >
>     Hi All,
> 
>     Last week I was on vacation, playing around with a MIPS base creator
>     board (http://www.elinux.org/MIPS_Creator_CI20), and seeing if I could
>     get systemtap running on it. After locally building the linux-3.0.8
>     kernel I was able to massage the systemtap-mips.patch from
>     https://sourceware.org/ml/systemtap/2012-q4/msg00084.html, so that
>     current systemtap is buildable and able to run a portion of the
>     testsuite on MIPS. Attached is the current modified patch. The tests hung in
>     the ./systemtap.base/limits.stp tests and a number of tests failed
>     because of issues with utrace functions not being found. The
>     systemtap.sum is also attached to this email.
> 
>     -Will
> 
>     > ==== systemtap-1.6-cisco-patches/README start =============================
>     >
>     > This is patches series that Cisco did on top of systemtap-1.6. Some of them are Cisco specific and most likely are not interesting for community. We decided to
>     > provide them here anyway in order to avoid breakage in applying patches, because
>     > of patch application order issues.
>     >
>     > Other like MIPS support, cross compilation improvements, misc general fixes may
>     > be some interest for SystemTap community.
>     >
>     > Patch description follows order of patches in series file:
>     >
>     > systemtap-configure_cross_compile.patch - change in configure logic to make it
>     >     more cross compilation environment friendly (in cross compile environment
>     >     one cannot test presence of /usr/include files; those are from host). We
>     >     don't use nss3 and avahi in our target so for now just introduce option
>     >     that could disable them. Most likely issue is fixed in latest tree.
>     >
>     > systemtap-unwind-table-size.patch - IOS code is too big, we are hitting limit
>     >     on unwind symbol table size. Increase the limit for now. In future it would
>     >     be good code to adjust those values dynamically.
>     >
>     > systemtap-fde_byte_order_fix.patch - Fix reading fde entry in case of cross
>     >     compilation where target and host have different byte order (i.e x86 host,
>     >     be mips is target).
>     >
>     > systemtap-pointer-byte_size.patch - Fix related to ICC (intel compiler). There
>     >     is a difference how DW_AT_byte_size is stored between gcc and icc. Current
>     >     stap code tailored to gcc way. Need to go back and dig out more details
>     >     here.
>     >
>     > systemtap-userland_caller.patch - Trying to introduce ucaller_addr and ucaller
>     >     systemtap function. Most likely this code does not work. But currently
>     >     patch is in our series file so keeping it for now.
>     >
>     > systemtap-biendian.patch - Support ICC biendian feature. It is described at
>     >     http://software.intel.com/en-us/articles/dwarf-extensions-for-bi-endian-support/. Most
>     >     like this code has no interest to anyone except Cisco.
>     >
>     > systemtap-old_compiler-task_finder.patch - Older gcc compiler (like gcc 3.4.x)
>     >     produce compilation warning here, incorrectly assuming that dentry may be
>     >     used uninitialized
>     >
>     > systemtap-cross_compile_helper.patch - Cross compilation assist. Actually
>     >     include a lot of different small things. Here is the list of them (may not
>     >     be complete):
>     >     x) target system build may use difference 'gcc' and different 'make'.
>     >     Different values could be specified through SYSTEMTAP_TARGET_CC and
>     >     SYSTEMTAP_MAKE environment variable
>     >     x) -y option introduced. Once specified it will indicate that systemtap
>     >     compiler operates in cross compilation mode and value of option serves
>     >     sysroot path value. Stap compiler supports several such options (details
>     >     below)
>     >     x) if compiler in cross compilation mode it does not use PATH and
>     >     LD_LIBRARY_PATH to search for executables and libraries. Instead it uses
>     >     SYSTEMTAP_CROSS_PATH and SYSTEMTAP_CROSS_LD_LIBRARY_PATH environment
>     >     variables. PATH and LD_LIBRARY_PATH are usually different between host and
>     >     target. Note SYSTEMTAP_CROSS_PATH and SYSTEMTAP_CROSS_LD_LIBRARY_PATH could
>     >     be specified as relative of sysroot values, as well as host absolute
>     >     pathes
>     >     x) if stap compiler is in cross compilation mode it does not try to rebuild
>     >     uprobes. It assumes that uprobes.ko is already built and installed in
>     >     proper location in sysroot
>     >     x) find_executable function is replaced with special sysroot class that
>     >     handles different ways how file path needed during stap compilation (some
>     >     times it needs file path in host terms, sometimes it would need it as it
>     >     would be seen on target). Sysroot supports multiple sysroot. For example
>     >     like in openwrt case one may have target root file system and overlay file
>     >     system. Stap compiler in cross compilation mode can search both. Normally
>     >     look up happens as iteration over sysroots and for each sysroot we iterate
>     >     over list of directories specified in SYSTEMTAP_CROSS_PATH and
>     >     SYSTEMTAP_CROSS_LD_LIBRARY_PATH. Quite normal case when one sysroot is
>     >     specified so executables will be searched by adding sysroot value in front
>     >     of directories specified by SYSTEMTAP_CROSS_PATH and
>     >     SYSTEMTAP_CROSS_LD_LIBRARY_PATH.
>     >
>     >     It is understood that above description may not be really sufficient to get
>     >     full understanding of this patch. If community is interested I can give
>     >     details explanation and see whether we can rework it. Above I just tried to
>     >     give a taste of what sort of issue we are dealing with when we work in
>     >     cross compiled environment
>     >
>     > systemtap-data-in_another_cu.patch - Fix for issue
>     >     6977 http://sourceware.org/bugzilla/show_bug.cgi?id=6977. We found it is
>     >     very annoying and limiting for script writers, so we fixed it. It deals
>     >     with  situation of accessing global variables that are defined in *other*
>     >     compilation units.
>     >
>     > systemtap-composed_rootfs_finder.patch - in embedded universe final root file
>     >     system may be composed as link farm to set of files system. Example is
>     >     Openwrt root file system and overlay. Systemtap runtime searches
>     >     executables by canonical name. It won't work for link farm case. For
>     >     link farm case ELF file name compiled into script is used as primary file
>     >     path to check for file in file system or as key in list of file systems
>     >     that participate in composition of final link farm. Outside of Cisco
>     >     patch may have interest to distros like OpenWrt.
>     >
>     > systemtap-line_range_issue_fix.patch - memory leak and crash in
>     >     iterate_over_srcfile_lines in case of line ranges.
>     >
>     > systemtap-icc_line_number.patch - deal with the way how ICC generates line
>     >     number information.
>     >
>     > systemtap-data-in_library.patch - fix issues of accessing global data in
>     >     libraries (opposed to executables) Not sure whether it is applicable to
>     >     latest tree.
>     >
>     > systemtap-mips-uprobes.patch - MIPS uprobes kernel module code.
>     >
>     > systemtap-mips.patch - MIPS systemtap runtime and and tapset code.
>     >
>     > systemtap-ppc32.patch - runtime fixes for powerpc 32bit case.
>     >
>     > systemtap-smaller_buffer_size.patch - stap debugfs 1Mb buffer size is too big
>     >     for systems like  WRT54GL, where whole box has 16Mb or 32Mb of memory.
>     >     Change 'b' option handling, so smaller buffers could be specified (i.e in
>     >     Kbytes). Patch tries to be backward compatible with previous option usage
>     >     - if no size letter is specified, it is treated like Megabytes
>     >
>     > systemtap-incorrect_kernel_buildid_hack.patch - there are idiosyncrasies in
>     >     Cisco build system when kernel rebuilt twice and buildid in target image
>     >     does not correspond to one we left to deal with on the host. This is hack
>     >     to deal with it. Should be ignored by everyone else.
>     >
>     > systemtap-ios_keyword.patch - Cisco specific patch. Should be ignored by
>     >     everybody else. Introduces ios keyword (along with 'process' and 'kernel').
>     >     It deals with the fact that IOS process  canonical name changes depending
>     >     on IOS image feature key. 'ios' keyword allows us to have scripts reusable
>     >     across different target images. Real ios process name is passed with -i
>     >     option by higher level wrapper script.
>     >
>     > systemtap-no_userland_prologue_search.patch - Add option '-U' that disables
>     >     function prologue  searches in user-land processes. Current -P affects only
>     >     kernel probes.
>     >
>     > systemtap-kernel_source_tree.patch - Option -T allows to specify location of
>     >     kernel sources. Normally needed only in cross compilation environment.
>     >
>     > systemtap-uprobes_in_kernel_as_module.patch - Fix for case when in cross
>     >     compilation environment we  may have uprobes built as module in kernel
>     >     build (opposite to built by systemtap). In this case, in order for
>     >     kernel_built_uprobes function to see unregister_uprobe symbol it has to be
>     >     added into kernel_exports even-though it comes from module (not uprobes)
>     >
>     > systemtap-remote_hack.patch - allows remote_uris mechanism to work in cross
>     >     compilation environment, where target kernel release won't be the same as
>     >     host kernel release
>     >
>     > systemtap-cross_testsuite.patch - Attempt to change testsuite to operate in
>     >     cross compilation environment where access to target happens either through
>     >     dejagnu remote target facilities or through stap --remote mechanism.
>     >     Massive patch, across bunch of test cases, not sure whether community has
>     >     any interest in it. It was used by us to validate systemtap operation on our
>     >     targets. In order to run, it requires stap board specific config (not
>     >     provided here), which would specify things like stap_board_args, and others.
>     >
>     > systemtap-enable_vma_tracker.patch - cover corner cases where
>     >     _stp_umodule_relocate is used but vma_tracker is not enabled, while it
>     >     should be, becuase it uses stap_find_vma_map_info_user function.
>     >
>     > Thanks,
>     > Victor
> 
> 
>     >
>     > On Thu, 23 Aug 2012, Josh Stone wrote:
>     >
>     >> On 08/22/2012 01:04 PM, Victor Kamensky wrote:
>     >>> Hi Per, Josh,
>     >>>
>     >>> We (Cisco) have pretty much full systemtap MIPS port.
>     >> [...]
>     >>> We always meant to publish all of it, but never get our hands on it. I
>     >>> hope this thread would be final push :). We will do it. Unfortunately, I
>     >>> cannot publish our patch series right away. I need to get permission from
>     >>> our company legal. It should not be a problem, but it may take two or
>     >>> three weeks.
>     >>
>     >> This is good news, and better that you're spurred now to share it. :)
>     >>
>     >>> Our latest series of patches is based on systemtap-1.6. I'll see whether I
>     >>> can find time and move them to latest git ... In worst case scenario we
>     >>> just publish what we have.
>     >>
>     >> IMO, it would be good to go ahead and post the 1.6 patches directly
>     >> after your legal clears it.  Then if you're willing and able to rebase
>     >> that onto the latest git, that's great, but we don't need to hold up
>     >> everything for that possibility.
>     >>
>     >> Thanks,
>     >> Josh
>     >>
> 
> 
> 
> 
> -- 
> --
> Regards,
> Leonard

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

* Re: What about MIPS support?
       [not found]           ` <CAJdmCrLN3w6J3XHTCx0uMDQDAc6LB+5qC3o7Rr+KABAriwNATg@mail.gmail.com>
@ 2015-08-06  1:30             ` William Cohen
  2015-08-06 13:04               ` William Cohen
  0 siblings, 1 reply; 12+ messages in thread
From: William Cohen @ 2015-08-06  1:30 UTC (permalink / raw)
  To: Crestez Dan Leonard; +Cc: systemtap

[-- Attachment #1: Type: text/plain, Size: 866 bytes --]

On 08/05/2015 02:45 PM, Crestez Dan Leonard wrote:
> Hello,
> 
> Those patches were on top of an older version. I just rebased on top of latest release 2.8 and only encountered a minor conflict. There are no further conflicts when rebasing on top of latest master. I pushed the branches here:
> 
>     https://github.com/cdleonard/systemtap/commits/mips-2.8
>     https://github.com/cdleonard/systemtap/commits/mips-master
> 
> Regards,
> Leonard

Hi Leonard,

Thanks for the pointers to current git trees with the patches.  I found that the div instruction for the mips processor is not coded correctly and the "make installcheck" smoke test fails as a result.  Attached is a patch to fix that and allow the systemtap.base/arith.exp test to pass.  With this patch the mips-master branch will run the "make installcheck" testsuite on a 32-bit mips processor

-Will


[-- Attachment #2: mips_div_asm.patch --]
[-- Type: text/x-patch, Size: 948 bytes --]

diff --git a/runtime/linux/arith.c b/runtime/linux/arith.c
index 9f65711..9de9bb6 100644
--- a/runtime/linux/arith.c
+++ b/runtime/linux/arith.c
@@ -252,12 +252,14 @@ typedef union
 
 #elif defined (__mips__)
 
-#define umul_ppmm(w1, w0, u, v)                                        \
-  __asm__ ("multu %2,%3"                                               \
-          : "=l" ((USItype) (w0)),                                     \
-            "=h" ((USItype) (w1))                                      \
-          : "d" ((USItype) (u)),                                       \
-            "d" ((USItype) (v)))
+#define umul_ppmm(w1, w0, u, v)						\
+  __asm__ ("multu %2,%3\n"						\
+	   "mflo %0\n"							\
+	   "mfhi %1\n"							\
+	   : "=d" ((USItype) (w0)),					\
+	     "=d" ((USItype) (w1))					\
+	   : "d" ((USItype) (u)),					\
+	     "d" ((USItype) (v)))
 
 #if !defined (sub_ddmmss)
 #define sub_ddmmss(sh, sl, ah, al, bh, bl) \

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

* Re: What about MIPS support?
  2015-08-06  1:30             ` William Cohen
@ 2015-08-06 13:04               ` William Cohen
  0 siblings, 0 replies; 12+ messages in thread
From: William Cohen @ 2015-08-06 13:04 UTC (permalink / raw)
  To: Crestez Dan Leonard; +Cc: systemtap

[-- Attachment #1: Type: text/plain, Size: 1219 bytes --]

On 08/05/2015 09:30 PM, William Cohen wrote:
> On 08/05/2015 02:45 PM, Crestez Dan Leonard wrote:
>> Hello,
>>
>> Those patches were on top of an older version. I just rebased on top of latest release 2.8 and only encountered a minor conflict. There are no further conflicts when rebasing on top of latest master. I pushed the branches here:
>>
>>     https://github.com/cdleonard/systemtap/commits/mips-2.8
>>     https://github.com/cdleonard/systemtap/commits/mips-master
>>
>> Regards,
>> Leonard
> 
> Hi Leonard,
> 
> Thanks for the pointers to current git trees with the patches.  I found that the div instruction for the mips processor is not coded correctly and the "make installcheck" smoke test fails as a result.  Attached is a patch to fix that and allow the systemtap.base/arith.exp test to pass.  With this patch the mips-master branch will run the "make installcheck" testsuite on a 32-bit mips processor
> 
> -Will
> 

Hi Dan,

I rebuild the kernel with CONFIG_DEGUG_INFO=y, had the systemtap source patched for the mips divide and ran the testsuite again.  Things ran a bit better, but the machine still dies on the systemtap.base/limits.exp test.  Attached is the portion of the tests that ran.

-Will

[-- Attachment #2: systemtap.sum --]
[-- Type: text/plain, Size: 26015 bytes --]

Test Run By root on Thu Aug  6 05:18:27 2015
Native configuration is mipsel-unknown-linux-gnu

		=== systemtap tests ===

Schedule of variations:
    unix

Running target unix

Host: Linux ci20 3.0.8loc-12469-gc52aae2 #1 SMP PREEMPT Thu Aug 6 03:45:22 BST 2015 mips GNU/Linux
Snapshot: version 2.9/0.152, commit release-2.7-277-g9a63aeaa5d06 + changes
GCC: 4.6.3 [gcc (Debian 4.6.3-14) 4.6.3]
Distro: 7.8
SElinux: unknown


Running ./systemtap/notest.exp ...
Running ./systemtap.apps/java.exp ...
UNTESTED: java - no javac
Running ./systemtap.apps/mysql.exp ...
UNTESTED: mysql sdt app
Running ./systemtap.apps/postgres.exp ...
UNTESTED: postgres sdt app
Running ./systemtap.apps/python.exp ...
UNTESTED: python sdt app
Running ./systemtap.apps/tcl.exp ...
UNTESTED: tcl sdt app
Running ./systemtap.apps/xulrunner.exp ...
UNTESTED: xulrunner sdt app
Running ./systemtap.base/add.exp ...
PASS: ./systemtap.base/add.stp startup
PASS: ./systemtap.base/add.stp load generation
PASS: ./systemtap.base/add.stp shutdown and output
Running ./systemtap.base/additional_scripts.exp ...
PASS: additional_scripts (no script)
PASS: additional_scripts (-E BAD_SCRIPT) 
PASS: additional_scripts (-E listing probes) 
PASS: additional_scripts (-E BAD_SCRIPT listing probes) 
PASS: additional_scripts (-e and -E ) 
FAIL: additional_scripts (file and -E)
FAIL: additional_scripts (multiple -E)
Running ./systemtap.base/alias-condition.exp ...
PASS: ./systemtap.base/alias-condition.stp startup
PASS: ./systemtap.base/alias-condition.stp load generation
PASS: ./systemtap.base/alias-condition.stp shutdown and output
Running ./systemtap.base/alias_suffixes.exp ...
PASS: ./systemtap.base/alias_suffixes01.stp startup
PASS: ./systemtap.base/alias_suffixes01.stp load generation
PASS: ./systemtap.base/alias_suffixes01.stp shutdown and output
PASS: ./systemtap.base/alias_suffixes02.stp startup
PASS: ./systemtap.base/alias_suffixes02.stp load generation
PASS: ./systemtap.base/alias_suffixes02.stp shutdown and output
PASS: ./systemtap.base/alias_suffixes03.stp startup
PASS: ./systemtap.base/alias_suffixes03.stp load generation
PASS: ./systemtap.base/alias_suffixes03.stp shutdown and output
PASS: ./systemtap.base/alias_suffixes04.stp startup
PASS: ./systemtap.base/alias_suffixes04.stp load generation
PASS: ./systemtap.base/alias_suffixes04.stp shutdown and output
PASS: ./systemtap.base/alias_suffixes05.stp startup
PASS: ./systemtap.base/alias_suffixes05.stp load generation
PASS: ./systemtap.base/alias_suffixes05.stp shutdown and output
Running ./systemtap.base/alias_tapset.exp ...
PASS: alias_tapset
Running ./systemtap.base/alternatives.exp ...
PASS: LOCAL1
PASS: STRUCT1
Running ./systemtap.base/argv.exp ...
PASS: argv naked
PASS: argv one
PASS: argv two
PASS: argv one other
PASS: argv two other
PASS: argv two mixed
PASS: argv three mixed
Running ./systemtap.base/arith.exp ...
PASS: arith
Running ./systemtap.base/arith_limits.exp ...
PASS: arith_limits
Running ./systemtap.base/array_size.exp ...
PASS: ./systemtap.base/array_size.stp startup
PASS: ./systemtap.base/array_size.stp load generation
PASS: ./systemtap.base/array_size.stp shutdown and output
Running ./systemtap.base/array_slicing.exp ...
PASS: $test_name foreach (... val[*, *]) startup
PASS: $test_name foreach (... val[*, *]) shutdown and output
PASS: $test_name foreach (... val[int, int]) startup
PASS: $test_name foreach (... val[int, int]) shutdown and output
PASS: $test_name foreach (... val[string, string]) startup
PASS: $test_name foreach (... val[string, string]) shutdown and output
PASS: $test_name foreach (... val[variable, *]) startup
PASS: $test_name foreach (... val[variable, *]) shutdown and output
PASS: $test_name foreach (... val[variable, string]) startup
PASS: $test_name foreach (... val[variable, string]) shutdown and output
PASS: $test_name foreach (... val[c,d]) {c++;d++;} startup
PASS: $test_name foreach (... val[c,d]) {c++;d++;} shutdown and output
PASS: $test_name foreach (... val[expression,*]) startup
PASS: $test_name foreach (... val[expression,*]) shutdown and output
PASS: $test_name foreach sorting startup
PASS: $test_name foreach sorting shutdown and output
PASS: $test_name delete val[*,*] startup
PASS: $test_name delete val[*,*] shutdown and output
PASS: $test_name delete val[*, string] startup
PASS: $test_name delete val[*, string] shutdown and output
PASS: $test_name delete val[int, *] startup
PASS: $test_name delete val[int, *] shutdown and output
PASS: $test_name delete val[epression, *] startup
PASS: $test_name delete val[epression, *] shutdown and output
PASS: $test_name delete pmaps startup
PASS: $test_name delete pmaps shutdown and output
PASS: $test_name membership [*,*] in val startup
PASS: $test_name membership [*,*] in val shutdown and output
PASS: $test_name membership [*, string] in val startup
PASS: $test_name membership [*, string] in val shutdown and output
PASS: $test_name membership [int, *] in val startup
PASS: $test_name membership [int, *] in val shutdown and output
PASS: $test_name membership [expression,*] in val startup
PASS: $test_name membership [expression,*] in val shutdown and output
PASS: $test_name membership pmaps startup
PASS: $test_name membership pmaps shutdown and output
PASS: $test_name membership pmaps (2) startup
PASS: $test_name membership pmaps (2) shutdown and output
Running ./systemtap.base/array_string.exp ...
PASS: ARRAY_STRING startup
PASS: ARRAY_STRING load generation
PASS: ARRAY_STRING shutdown and output
Running ./systemtap.base/at_var.exp ...
UNTESTED: at_var
Running ./systemtap.base/at_var_cu.exp ...
UNTESTED: at_var_cu
Running ./systemtap.base/at_var_func.exp ...
UNTESTED: at_var_func
Running ./systemtap.base/at_var_lvalue.exp ...
UNTESTED: at_var_lvalue
Running ./systemtap.base/at_var_mark.exp ...
UNTESTED: at_var_mark
Running ./systemtap.base/at_var_mark_func.exp ...
UNTESTED: at_var_mark_func
Running ./systemtap.base/at_var_pie.exp ...
UNTESTED: at_var_pie
Running ./systemtap.base/at_var_timer_profile.exp ...
UNTESTED: at_var_timer_profile
Running ./systemtap.base/at_var_tracepoint.exp ...
PASS: at_var_tracepoint startup
PASS: at_var_tracepoint load generation
PASS: at_var_tracepoint shutdown and output
Running ./systemtap.base/at_var_unresolved.exp ...
PASS: at_var_unresolved (1)
PASS: at_var_unresolved (cuname: 1, 0)
Running ./systemtap.base/at_var_unresolved_lvalue.exp ...
UNTESTED: at_var_unresolved_lvalue
Running ./systemtap.base/at_var_void_stmt.exp ...
FAIL: at_var_void_stmt (0, 2)
Running ./systemtap.base/atomic.exp ...
PASS: atomic1 expected error
PASS: atomic2 expected error
PASS: atomic3 expected error
PASS: atomic4 no expected error
PASS: atomic5 expected error
PASS: atomic6 expected error
PASS: atomic7 expected error
PASS: atomic8 no expected error
Running ./systemtap.base/backtrace.exp ...
KFAIL: backtrace (0 0) (PRMS: 10739)
KFAIL: backtrace-unwindsyms (0 0) (PRMS: 10739)
KPASS: self-unwind-ensure-exact (0) (PRMS 10739)
Running ./systemtap.base/bad-code.exp ...
PASS: bad-code.c compile
FAIL: bad-code
Running ./systemtap.base/badkprobe.exp ...
PASS: bad kprobe registration: kernel.statement(-1).absolute
PASS: bad kprobe registration: kprobe.statement(-1).absolute
PASS: bad optional kprobe registration: kernel.statement(-1).absolute
PASS: bad optional kprobe registration: kprobe.statement(-1).absolute
Running ./systemtap.base/be_loaded.exp ...
PASS: be_loaded
Running ./systemtap.base/be_order.exp ...
PASS: ./systemtap.base/be_order.stp startup
PASS: ./systemtap.base/be_order.stp load generation
PASS: ./systemtap.base/be_order.stp shutdown and output
Running ./systemtap.base/beginenderror.exp ...
PASS: beginenderror (5 3 0)
Running ./systemtap.base/bench.exp ...
PASS: bench (524)
Running ./systemtap.base/bitfield.exp ...
PASS: ./systemtap.base/bitfield.stp startup
PASS: ./systemtap.base/bitfield.stp load generation
PASS: ./systemtap.base/bitfield.stp shutdown and output
Running ./systemtap.base/buildid.exp ...
UNTESTED: buildid (uprobes)
Running ./systemtap.base/bz10078.exp ...
PASS: bz10078 compile
UNTESTED: bz10078 -p4
UNTESTED: bz10078 -p5
Running ./systemtap.base/bz1027459.exp ...
FAIL: bz1027459 (timeout)
FAIL: bz1027459 -p5 (0)
Running ./systemtap.base/bz1074541.exp ...
PASS: ./bz1074541
Running ./systemtap.base/bz1126645.exp ...
FAIL: bz1126645 -p5 (0)
Running ./systemtap.base/bz13338.exp ...
PASS: bz13338
Running ./systemtap.base/bz5274.exp ...
UNTESTED: ./bz5274 -p5
Running ./systemtap.base/bz6503.exp ...
FAIL: bz6503 0 0
Running ./systemtap.base/bz6850.exp ...
PASS: bz6850 compile
UNTESTED: bz6850 -p4
UNTESTED: bz6850 -p5
Running ./systemtap.base/cache.exp ...
PASS: BASIC1 wasn't cached
PASS: BASIC2 was cached
PASS: OPTION1 wasn't cached
PASS: OPTION2 was cached
PASS: BULK1 wasn't cached
PASS: BULK2 was cached
PASS: TIMING1 wasn't cached
PASS: TIMING2 was cached
PASS: RUNTIME1 wasn't cached
PASS: RUNTIME2 was cached
PASS: DISABLED1 wasn't cached
PASS: DISABLED2 wasn't cached
PASS: MODNAM1 wasn't cached
PASS: MODNAM2 wasn't cached
PASS: ERROR1 wasn't cached
PASS: ERROR2 wasn't cached
PASS: BASIC3 wasn't cached
PASS: BASIC4 was cached
Running ./systemtap.base/cache_clean.exp ...
PASS: cache_clean premature cleaning
PASS: cache_clean timed cleaning
Running ./systemtap.base/callee.exp ...
UNTESTED: callee
Running ./systemtap.base/caller.exp ...
FAIL: caller startup (eof)
Running ./systemtap.base/cast-scope.exp ...
PASS: cast-scope-m32 compile
UNTESTED: cast-scope-m32
PASS: cast-scope-m32 compile
UNTESTED: cast-scope-m32
PASS: cast-scope-m32-O compile
UNTESTED: cast-scope-m32-O
Running ./systemtap.base/cast-user.exp ...
PASS: cast-user compile
FAIL: cast-user
Running ./systemtap.base/cast.exp ...
PASS: ./systemtap.base/cast.stp
Running ./systemtap.base/cmd_parse.exp ...
PASS: cmd_parse1
PASS: cmd_parse2
PASS: cmd_parse3
PASS: cmd_parse4
PASS: cmd_parse5
PASS: cmd_parse6
PASS: cmd_parse7
PASS: cmd_parse8
PASS: cmd_parse9
PASS: cmd_parse10
PASS: cmd_parse11
PASS: cmd_parse12
PASS: cmd_parse13
PASS: cmd_parse14
PASS: cmd_parse15
FAIL: cmd_parse16: eof
Running ./systemtap.base/cmdline.exp ...
FAIL: cmdline
Running ./systemtap.base/color_parsing.exp ...
PASS: color_parsing (empty - stap: output matched)
PASS: color_parsing (empty - staprun: output matched)
PASS: color_parsing (short_key1 - stap: output matched)
PASS: color_parsing (short_key1 - staprun: output matched)
PASS: color_parsing (short_key2 - stap: output matched)
PASS: color_parsing (short_key2 - staprun: output matched)
PASS: color_parsing (short_key3 - stap: output matched)
PASS: color_parsing (short_key3 - staprun: output matched)
PASS: color_parsing (short_key4 - stap: output matched)
PASS: color_parsing (short_key4 - staprun: output matched)
PASS: color_parsing (short_key5 - stap: output matched)
PASS: color_parsing (short_key5 - staprun: output matched)
PASS: color_parsing (short_key6 - stap: output matched)
PASS: color_parsing (short_key6 - staprun: output matched)
PASS: color_parsing (short_key7 - stap: output matched)
PASS: color_parsing (short_key7 - staprun: output matched)
PASS: color_parsing (short_key8 - stap: output matched)
PASS: color_parsing (short_key8 - staprun: output matched)
PASS: color_parsing (short_key9 - stap: output matched)
PASS: color_parsing (short_key9 - staprun: output matched)
PASS: color_parsing (no_eq1 - stap: output matched)
PASS: color_parsing (no_eq1 - staprun: output matched)
PASS: color_parsing (no_eq2 - stap: output matched)
PASS: color_parsing (no_eq2 - staprun: output matched)
PASS: color_parsing (no_eq3 - stap: output matched)
PASS: color_parsing (no_eq3 - staprun: output matched)
PASS: color_parsing (no_eq4 - stap: output matched)
PASS: color_parsing (no_eq4 - staprun: output matched)
PASS: color_parsing (no_eq5 - stap: output matched)
PASS: color_parsing (no_eq5 - staprun: output matched)
PASS: color_parsing (no_eq6 - stap: output matched)
PASS: color_parsing (no_eq6 - staprun: output matched)
PASS: color_parsing (no_eq7 - stap: output matched)
PASS: color_parsing (no_eq7 - staprun: output matched)
PASS: color_parsing (no_eq8 - stap: output matched)
PASS: color_parsing (no_eq8 - staprun: output matched)
PASS: color_parsing (no_eq9 - stap: output matched)
PASS: color_parsing (no_eq9 - staprun: output matched)
PASS: color_parsing (no_eq10 - stap: output matched)
PASS: color_parsing (no_eq10 - staprun: output matched)
PASS: color_parsing (no_key1 - stap: output matched)
PASS: color_parsing (no_key1 - staprun: output matched)
PASS: color_parsing (no_key2 - stap: output matched)
PASS: color_parsing (no_key2 - staprun: output matched)
PASS: color_parsing (no_key3 - stap: output matched)
PASS: color_parsing (no_key3 - staprun: output matched)
PASS: color_parsing (no_key4 - stap: output matched)
PASS: color_parsing (no_key4 - staprun: output matched)
PASS: color_parsing (no_key5 - stap: output matched)
PASS: color_parsing (no_key5 - staprun: output matched)
PASS: color_parsing (no_key6 - stap: output matched)
PASS: color_parsing (no_key6 - staprun: output matched)
PASS: color_parsing (no_key7 - stap: output matched)
PASS: color_parsing (no_key7 - staprun: output matched)
PASS: color_parsing (no_key8 - stap: output matched)
PASS: color_parsing (no_key8 - staprun: output matched)
PASS: color_parsing (no_key9 - stap: output matched)
PASS: color_parsing (no_key9 - staprun: output matched)
PASS: color_parsing (no_key10 - stap: output matched)
PASS: color_parsing (no_key10 - staprun: output matched)
PASS: color_parsing (no_key11 - stap: output matched)
PASS: color_parsing (no_key11 - staprun: output matched)
PASS: color_parsing (no_key12 - stap: output matched)
PASS: color_parsing (no_key12 - staprun: output matched)
PASS: color_parsing (no_key13 - stap: output matched)
PASS: color_parsing (no_key13 - staprun: output matched)
PASS: color_parsing (no_val1 - stap: output matched)
PASS: color_parsing (no_val1 - staprun: output matched)
PASS: color_parsing (no_val2 - stap: output matched)
PASS: color_parsing (no_val2 - staprun: output matched)
PASS: color_parsing (no_val3 - stap: output matched)
PASS: color_parsing (no_val3 - staprun: output matched)
PASS: color_parsing (no_val4 - stap: output matched)
PASS: color_parsing (no_val4 - staprun: output matched)
PASS: color_parsing (no_val5 - stap: output matched)
PASS: color_parsing (no_val5 - staprun: output matched)
PASS: color_parsing (bad_val1 - stap: output matched)
PASS: color_parsing (bad_val1 - staprun: output matched)
PASS: color_parsing (bad_val2 - stap: output matched)
PASS: color_parsing (bad_val2 - staprun: output matched)
PASS: color_parsing (bad_val3 - stap: output matched)
PASS: color_parsing (bad_val3 - staprun: output matched)
PASS: color_parsing (bad_val4 - stap: output matched)
PASS: color_parsing (bad_val4 - staprun: output matched)
PASS: color_parsing (bad_val5 - stap: output matched)
PASS: color_parsing (bad_val5 - staprun: output matched)
PASS: color_parsing (valid1 - stap: output matched)
PASS: color_parsing (valid1 - staprun: output matched)
PASS: color_parsing (valid2 - stap: output matched)
PASS: color_parsing (valid2 - staprun: output matched)
PASS: color_parsing (valid3 - stap: output matched)
PASS: color_parsing (valid3 - staprun: output matched)
PASS: color_parsing (valid4 - stap: output matched)
PASS: color_parsing (valid4 - staprun: output matched)
PASS: color_parsing (valid5 - stap: output matched)
PASS: color_parsing (valid5 - staprun: output matched)
PASS: color_parsing
Running ./systemtap.base/const_value.exp ...
PASS: const_value.c compile
UNTESTED: const_value
PASS: const_value_func.c compile
UNTESTED: const_value_func (no-const-value)
Running ./systemtap.base/control_limits.exp ...
PASS: control_limits MAXNESTING (1)
PASS: control_limits MAXACTION (1)
PASS: control_limits MAXSTRINGLEN small (1)
PASS: control_limits MAXSTRINGLEN large (1)
Running ./systemtap.base/crash.exp ...
UNTESTED: crash - no staplog.so
Running ./systemtap.base/ctime.exp ...
PASS: ./systemtap.base/ctime.stp
Running ./systemtap.base/cu-decl.exp ...
PASS: cu-decl-m32 target compilation
UNTESTED: cu-decl-m32
PASS: cu-decl-m32 target compilation
UNTESTED: cu-decl-m32
PASS: cu-decl-m32-O target compilation
UNTESTED: cu-decl-m32-O
Running ./systemtap.base/cxxclass.exp ...
PASS: m32 cxxclass.c compile
UNTESTED: cxxclass-m32
PASS: m32 cxxclass.c compile
UNTESTED: cxxclass-m32
PASS: m32-O cxxclass.c compile
UNTESTED: cxxclass-m32-O
Running ./systemtap.base/debug_mem.exp ...
PASS: debug_mem (run)
PASS: debug_mem
Running ./systemtap.base/debugpath.exp ...
PASS: debugpath-bad
FAIL: debugpath-good (eof)
Running ./systemtap.base/deref.exp ...
PASS: ./systemtap.base/deref.stp startup
PASS: ./systemtap.base/deref.stp load generation
FAIL: ./systemtap.base/deref.stp shutdown (eof)
Running ./systemtap.base/deref2.exp ...
UNTESTED: deref2
Running ./systemtap.base/div0.exp ...
PASS: ./systemtap.base/div0.stp startup
PASS: ./systemtap.base/div0.stp load generation
PASS: ./systemtap.base/div0.stp shutdown and output
Running ./systemtap.base/dtrace.exp ...
PASS: dtrace python -G -64 -fPIC -o dtrace-XXX.o
PASS: dtrace python -G -o dtrace-XXX
PASS: dtrace python -h -o dtrace-XXX.h
PASS: dtrace python -h -o dtrace-XXX
PASS: dtrace python -G -o /tmp/XXX.o
PASS: dtrace python -G -o /tmp/XXX
PASS: dtrace python -h -o /tmp/XXX.h
PASS: dtrace python -h -o /tmp/XXX
PASS: dtrace python -G
PASS: dtrace python -h
PASS: dtrace python CFLAGS= CC=
PASS: dtrace python -C -h -o dtrace-XXX.h
PASS: dtrace python -C -Iincpath -h -o dtrace-XXX.h
PASS: dtrace python -C --no-pyparsing -Iincpath -h -o dtrace-XXX.h
UNTESTED: dtrace python parser check
PASS: dtrace python -Iincpath -G
PASS: dtrace python known uses
PASS: dtrace python -x IGNORED
PASS: dtrace python2 -G -64 -fPIC -o dtrace-XXX.o
PASS: dtrace python2 -G -o dtrace-XXX
PASS: dtrace python2 -h -o dtrace-XXX.h
PASS: dtrace python2 -h -o dtrace-XXX
PASS: dtrace python2 -G -o /tmp/XXX.o
PASS: dtrace python2 -G -o /tmp/XXX
PASS: dtrace python2 -h -o /tmp/XXX.h
PASS: dtrace python2 -h -o /tmp/XXX
PASS: dtrace python2 -G
PASS: dtrace python2 -h
PASS: dtrace python2 CFLAGS= CC=
PASS: dtrace python2 -C -h -o dtrace-XXX.h
PASS: dtrace python2 -C -Iincpath -h -o dtrace-XXX.h
PASS: dtrace python2 -C --no-pyparsing -Iincpath -h -o dtrace-XXX.h
UNTESTED: dtrace python2 parser check
PASS: dtrace python2 -Iincpath -G
PASS: dtrace python2 known uses
PASS: dtrace python2 -x IGNORED
UNSUPPORTED: dtrace python3
Running ./systemtap.base/dump_functions.exp ...
PASS: dump_functions (got output of stap --dump-functions)
PASS: dump_functions (got output of stap -v --dump-functions)
PASS: dump_functions (user_string in output)
PASS: dump_functions (_caller_match not in output)
PASS: dump_functions (user_string in -v output)
PASS: dump_functions (_caller_match in -v output)
PASS: dump_functions (mdelay has guru in output)
PASS: dump_functions (mdelay has guru in -v output)
PASS: dump_functions (uid has unpriv but not pure in output)
PASS: dump_functions (uid has unpriv and pure in -v output)
Running ./systemtap.base/dump_probe_aliases.exp ...
PASS: dump_probe_aliases (got output of stap --dump-probe-aliases)
PASS: dump_probe_aliases (got output of stap -v --dump-probe-aliases)
PASS: dump_probe_aliases (oneshot in output)
PASS: dump_probe_aliases (vfs.read in output)
PASS: dump_probe_aliases (__syscall.accept not in output)
PASS: dump_probe_aliases (oneshot in -v output)
PASS: dump_probe_aliases (vfs.read in -v output)
PASS: dump_probe_aliases (__syscall.accept in -v output)
Running ./systemtap.base/equal.exp ...
PASS: ./systemtap.base/equal.stp startup
PASS: ./systemtap.base/equal.stp load generation
PASS: ./systemtap.base/equal.stp shutdown and output
Running ./systemtap.base/error_fn.exp ...
PASS: ./systemtap.base/error_fn.stp startup
PASS: ./systemtap.base/error_fn.stp load generation
PASS: ./systemtap.base/error_fn.stp shutdown and output
Running ./systemtap.base/execve.exp ...
FAIL: ./systemtap.base/execve.stp -c /bin/true
Running ./systemtap.base/externalvar.exp ...
UNTESTED: externalvar-m32
UNTESTED: externalvar-m32
UNTESTED: externalvar-m32-O
Running ./systemtap.base/finloop2.exp ...
PASS: ./systemtap.base/finloop2.stp startup
PASS: ./systemtap.base/finloop2.stp load generation
PASS: ./systemtap.base/finloop2.stp shutdown and output
Running ./systemtap.base/flightrec1.exp ...
PASS: flightrec1 (flight recorder option)
PASS: flightrec1 (stapio in background)
PASS: flightrec1 (output file)
PASS: flightrec1 (switch output file)
Running ./systemtap.base/flightrec2.exp ...
PASS: flightrec2 (-S option)
PASS: flightrec2 (log file numbers limitation)
PASS: flightrec2 (log file size limitation)
Running ./systemtap.base/flightrec3.exp ...
PASS: flightrec3 (-S option with bulk mode)
PASS: flightrec3 (log file size limitation with bulk mode)
Running ./systemtap.base/flightrec4.exp ...
PASS: flightrec4 (flight recorder option)
PASS: flightrec4 (output file)
PASS: flightrec4 (old output file is removed)
PASS: flightrec4 (switch output file)
Running ./systemtap.base/flightrec5.exp ...
PASS: flightrec5 (flight recorder option)
PASS: flightrec5 (output file)
PASS: flightrec5 (old output file is removed)
PASS: flightrec5 (switch output file)
Running ./systemtap.base/foreach_aggrsort.exp ...
PASS: foreach_aggrsort
Running ./systemtap.base/foreach_value.exp ...
PASS: foreach_value
Running ./systemtap.base/func_alias.exp ...
UNTESTED: func_alias
Running ./systemtap.base/global_end.exp ...
PASS: global_end (12)
PASS: global_end_var (6)
PASS: global_end_var_used (1)
Running ./systemtap.base/global_init.exp ...
PASS: ./systemtap.base/global_init.stp startup
PASS: ./systemtap.base/global_init.stp load generation
PASS: ./systemtap.base/global_init.stp shutdown and output
Running ./systemtap.base/global_opt.exp ...
PASS: global_opt
Running ./systemtap.base/global_opt_invalid.exp ...
PASS: global_opt_invalid
Running ./systemtap.base/global_opt_unknown.exp ...
UNSUPPORTED: global_opt_unknown - kernel won't ignore unknown options
Running ./systemtap.base/global_stat.exp ...
PASS: global_stat
Running ./systemtap.base/global_var.exp ...
UNTESTED: global_var-m32
UNTESTED: global_var-m32
UNTESTED: global_var-m32-O
Running ./systemtap.base/global_var_kernel.exp ...
FAIL: global_var_kernel startup (eof)
Running ./systemtap.base/global_vars.exp ...
PASS: ./systemtap.base/global_vars.stp startup
PASS: ./systemtap.base/global_vars.stp load generation
PASS: ./systemtap.base/global_vars.stp shutdown and output
Running ./systemtap.base/gtod.exp ...
FAIL: gtod (short range) (0)
FAIL: gtod (10ms interval) (0)
FAIL: gtod (100ms interval) (0)
Running ./systemtap.base/hash_add_buildid.exp ...
UNTESTED: hash_add_buildid
Running ./systemtap.base/helpout.exp ...
PASS: helpout stap -V
PASS: helpout stap -h
PASS: helpout staprun -V
PASS: helpout staprun -h
PASS: helpout /home/ci20/mount/ci20/install/libexec/systemtap/stapio -V
PASS: helpout /home/ci20/mount/ci20/install/libexec/systemtap/stapio -h
Running ./systemtap.base/if.exp ...
PASS: ./systemtap.base/if.stp startup
PASS: ./systemtap.base/if.stp load generation
PASS: ./systemtap.base/if.stp shutdown and output
Running ./systemtap.base/implicitptr.exp ...
PASS: implicitptr.c compile m32
PASS: probe listing implicitptr-m32 (ijkl)
UNTESTED: implicitptr-m32
PASS: implicitptr.c compile m32
PASS: probe listing implicitptr-m32 (ijkl)
UNTESTED: implicitptr-m32
PASS: implicitptr.c compile m32-O
PASS: probe listing implicitptr-m32-O (ijkl)
UNTESTED: implicitptr-m32-O
Running ./systemtap.base/inc.exp ...
PASS: ./systemtap.base/inc.stp startup
PASS: ./systemtap.base/inc.stp load generation
PASS: ./systemtap.base/inc.stp shutdown and output
Running ./systemtap.base/inherit.exp ...
PASS: inherit-m32 compile
UNTESTED: inherit-m32
PASS: inherit-m32 compile
UNTESTED: inherit-m32
PASS: inherit-m32-O compile
UNTESTED: inherit-m32-O
Running ./systemtap.base/inlinedvars.exp ...
PASS: inlinedvars-m32 compile
UNTESTED: inlinedvars-m32
PASS: inlinedvars-m32 compile
UNTESTED: inlinedvars-m32
PASS: inlinedvars-m32-O compile
UNTESTED: inlinedvars-m32-O
Running ./systemtap.base/ipaddr.exp ...
PASS: ipaddr_IPv4_recvmsg find 'nc'
PASS: ipaddr_IPv4_recvmsg nc server start
PASS: ipaddr_IPv4_recvmsg startup
PASS: ipaddr_IPv4_recvmsg load generation
FAIL: ipaddr_IPv4_recvmsg shutdown (eof)
PASS: ipaddr_IPv4_recvmsg nc server stop
PASS: ipaddr_IPv4_receive nc server start
PASS: ipaddr_IPv4_receive startup
PASS: ipaddr_IPv4_receive load generation
PASS: ipaddr_IPv4_receive shutdown and output
PASS: ipaddr_IPv4_receive nc server stop
UNTESTED: ipaddr_IPv6_recvmsg starting IPv6 nc server
Running ./systemtap.base/itrace.exp ...
UNTESTED: itrace single step check : no kernel utrace support found
UNTESTED: itrace block step check : no kernel utrace support found
UNTESTED: itrace_single1 : no kernel utrace support found
UNTESTED: itrace_single2 : no kernel utrace support found
UNTESTED: itrace_block1 : no kernel utrace support found
UNTESTED: itrace_block2 : no kernel utrace support found
Running ./systemtap.base/kallsyms_expand_symbol.exp ...
PASS: ./systemtap.base/kallsyms_expand_symbol.stp -c {head /proc/kallsyms}
Running ./systemtap.base/kbuildenv.exp ...
PASS: kbuild PATH sanitization
Running ./systemtap.base/kfunct.exp ...
PASS: ./systemtap.base/kfunct.stp startup
PASS: ./systemtap.base/kfunct.stp load generation
PASS: ./systemtap.base/kfunct.stp shutdown and output
Running ./systemtap.base/kmodule.exp ...
PASS: kmodule (built and installed module)
PASS: ./systemtap.base/kmodule.stp startup
PASS: ./systemtap.base/kmodule.stp load generation
FAIL: ./systemtap.base/kmodule.stp shutdown (timeout)
FAIL: ./systemtap.base/kprobe_module.stp startup (timeout)
Running ./systemtap.base/kprobes.exp ...
FAIL: ./systemtap.base/kprobes.stp startup (timeout)
Running ./systemtap.base/kretprobe-vars.exp ...
FAIL: ./systemtap.base/kretprobe-vars.stp startup (timeout)
Running ./systemtap.base/labels.exp ...
UNTESTED: labels
Running ./systemtap.base/library.exp ...
UNTESTED: library
Running ./systemtap.base/limits.exp ...

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

* Re: What about MIPS support?
  2012-08-17 16:33 Hallsmark, Per
@ 2012-08-18  2:20 ` Josh Stone
  0 siblings, 0 replies; 12+ messages in thread
From: Josh Stone @ 2012-08-18  2:20 UTC (permalink / raw)
  To: systemtap, Per.Hallsmark; +Cc: Wade Farnsworth

On 08/17/2012 09:32 AM, Hallsmark, Per wrote:
> Dear systemtap gurus,
> 
> Are there any plans in near future for a MIPS port?

I don't know of any plans, but we'll welcome patches. :)

> I've also tried a bit with release 1.7 (latest release possible that 
> didn't require a lot of changes in our build environment, like 
> upgrading elfutils etc). Unfortunately our kernel didn't have
> support for kprobes so that had to be backported.

We'll of course prefer that any patches are on git master. Perhaps you
can configure --with-elfutils=/path/to/new/elfutils to build stap with
its own copy.  Anything else in your build environment holding you back?

> So I obviously now need to add more mips support in systemtap 
> (started with this in tapsets/mips etc)
> 
> Any guidance on what is needed todo for a new arch?

Right, there will need to be tapset/$arch for specific functions, and
now some of that is split into tapset/linux/$arch too.

Then runtime/loc2c-runtime.h also has a lot of arch-specific code that
you'll need to fill in for mips, in order to do any register or memory
access in your probes.

Those are the biggies I can think of, but smaller stuff may also be
sprinkled about.  For instance, if you want process.mark probes (SDT),
there's a tiny bit of arch #ifdefs in sdt.h, and then tapsets.cxx
sdt_uprobe_var_expanding_visitor::visit_target_symbol_arg() will need to
learn mips too.

Wade Farnsworth might be able to identify more points, as he's been
working to get ARM support in shape.  It would be nice to start a
porting guide on our wiki for these things.

> Anyone started already with mips?

Just you, afaik. ;)


Josh

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

* What about MIPS support?
@ 2012-08-17 16:33 Hallsmark, Per
  2012-08-18  2:20 ` Josh Stone
  0 siblings, 1 reply; 12+ messages in thread
From: Hallsmark, Per @ 2012-08-17 16:33 UTC (permalink / raw)
  To: systemtap

Dear systemtap gurus,

Are there any plans in near future for a MIPS port?

Even in the latest git repo I didn't find any support for this.
In the maillist archive I couldn't search up anything vital either
so there this question.

I've also tried a bit with release 1.7 (latest release possible
that didn't require a lot of changes in our build environment,
like upgrading elfutils etc). Unfortunately our kernel didn't have
support for kprobes so that had to be backported.

As we mostly do crosscompile, I've used same manner as
in http://www.omappedia.org/wiki/Systemtap for building the
stap kernel modules on a host and later running them in target
via staprun.

I can run simplier stuff like:


[phallsma@arn-ph-lap systemtap]$ cat hello_world.stp 
probe begin {
	log("hello world")
	exit()
}
[phallsma@arn-ph-lap systemtap]$ 

[phallsma@arn-ph-lap systemtap]$ make module-hello_world
Building module hello_world
/../stap -g -a mips -B CROSS_COMPILE=mips-wrs-linux-gnu- -p 4 -r /../linux-standard-build -m hello_world hello_world.stp
hello_world.ko
[phallsma@arn-ph-lap systemtap]$ 

And then in target:

root@localhost:/root> staprun hello_world.ko 
hello world
root@localhost:/root> 

However, when I know try something more fun it fails:

[phallsma@arn-ph-lap systemtap]$ cat pid.stp 
probe syscall.* {
	if (target()==pid())
		log(name." ".argstr)
}
[phallsma@arn-ph-lap systemtap]$

[phallsma@arn-ph-lap systemtap]$ make module-pid
Building module pid
/../stap -g -a mips -B CROSS_COMPILE=mips-wrs-linux-gnu- -p 4 -r /../linux-standard-build -m pid pid.stp
semantic error: unresolved arity-4 function: identifier '_arch_ptrace_argstr' at /../systemtap/systemtap-1.7-host/share/systemtap/tapset/aux_syscalls.stp:2234:9
        source: 	retval=_arch_ptrace_argstr(request, pid, addr, data)
                	       ^
WARNING: cannot find module /home/phallsma/.systemtap/cache/56/typequery_5669672d94d9763ecb1a5f26f11313ad_1198.ko debuginfo: no support library found for machine
Pass 2: analysis failed.  Try again with another '--vp 01' option.
make: *** [module-pid] Error 1
[phallsma@arn-ph-lap systemtap]$

So I obviously now need to add more mips support in systemtap (started with this in tapsets/mips etc)

Any guidance on what is needed todo for a new arch?

Anyone started already with mips?

BR,
Per


--
Per Hallsmark                      per.hallsmark@windriver.com
Engineering Specialist        Wind River AB
Mobile: +46733249340       Office: +46859461127
Torshamnsgatan 27            164 40 Kista

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

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

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-22 20:04 What about MIPS support? Victor Kamensky
2012-08-23  2:23 ` Maneesh Soni
2012-08-23 14:33   ` Ananth N Mavinakayanahalli
2012-08-23 22:11 ` Josh Stone
2012-10-15 21:21   ` Victor Kamensky
2012-10-23 23:43     ` Josh Stone
2015-08-05 12:42     ` William Cohen
     [not found]       ` <CAJdmCr+1s6JLW3DsGxbdqPcpnD1+wNo5VwAifm6UN-SWE+PKmw@mail.gmail.com>
2015-08-05 16:25         ` William Cohen
     [not found]           ` <CAJdmCrLN3w6J3XHTCx0uMDQDAc6LB+5qC3o7Rr+KABAriwNATg@mail.gmail.com>
2015-08-06  1:30             ` William Cohen
2015-08-06 13:04               ` William Cohen
  -- strict thread matches above, loose matches on Subject: below --
2012-08-17 16:33 Hallsmark, Per
2012-08-18  2:20 ` Josh Stone

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