From: Dave Sperry <dave_sperry@ieee.nospam.dot.org>
To: perryche@us.ibm.com
Cc: systemtap@sourceware.org
Subject: Re: Instrumenting context switches
Date: Fri, 01 Dec 2006 00:25:00 -0000 [thread overview]
Message-ID: <1164924085.8146.10.camel@fc6-rt> (raw)
In-Reply-To: <OFB78608CD.65116F14-ON85257236.0073959D-85257236.00738AAF@mck.us.ray.com>
Perry,
I had no problem running your systemtap scripts on my AMD-686 SMP box
running the same kernel as you list below.
I did a stap perry.stp -vvvv -g &>perryFoo.txt and it worked just fine.
You can see the log at:
http://toomanyprojects.org:2000/outbound/perry/perryFoo.txt
The version of systemtap I used is:
SystemTap translator/driver (version 0.5.11 built 2006-11-20)
(Using Red Hat elfutils 0.124 libraries.)
Copyright (C) 2005-2006 Red Hat, Inc. and others
This is free software; see the source for copying conditions.
Dave
> Perry Cheng
> <perryche@us.ibm.
> com> To
> Sent by: Martin Hunt <hunt@redhat.com>,
> systemtap-owner@s systemtap@sourceware.org
> ourceware.org cc
>
> Subject
> 11/30/2006 03:29 Re: Instrumenting context switches
> PM
>
> The following even simpler program also dies and rules out gettimeofday or
> accessing a global variable as possible causes. The crash happens on both
> an intel-686 and AMD-686 both running a modified version of 2.6.16. I
> don't know the details of the modifications but they are generally used to
> support real-time features and include the hrt and rt-prio patches. The
> src is at ftp://linuxpatch.ncsa.uiuc.edu/rt-linux/rhel4u2/R1-iFix1.
>
> If I replace __switch_to with context_switch or finish_task_switch, the
> failure still occurs. However, if I switch to set_task_comm, then things
> seem ok.
>
> probe kernel.function("__switch_to")
> {
> foobar()
> }
>
> function foobar()
> %{
> _stp_printf("foobar\n");
> %}
>
> Perry
>
>
> systemtap-owner@sourceware.org wrote on 11/30/2006 10:31:10 AM:
>
> > On Wed, 2006-11-29 at 18:25 -0500, Perry Cheng wrote:
> >
> > > probe kernel.function("__switch_to")
> > > {
> > > doSwitchTo(gettimeofday_us(), $prev_p, $next_p);
> > > }
> > >
> > > function doSwitchTo(timeus:long, prev:long, next:long)
> > > %{
> > > _stp_printf("SWITCHCOUNT = %ld\n", switchCount);
> > > <------------------------------ BAD LINE
> > > switchCount++;
> > > }%
> >
> > Obviously the code fragment above is not exactly what you are using to
> > reproduce the bug. (You can't use keywords as parameter names,
> > uninitialized switchCount, "}%", etc). I tried the following and did
> > not see any problems. Can you give more details (arch, OS, etc) on how
> > to reproduce?
> >
> > %{
> > long switchCount = 1000000;
> > %}
> >
> > function doSwitchTo (t:long, p:long, n:long) %{
> > _stp_printf("SWITCHCOUNT = %ld\n", switchCount);
> > switchCount++;
> > %}
> >
> > probe kernel.function("__switch_to")
> > {
> > doSwitchTo(gettimeofday_us(), $prev_p, $next_p);
> > }
> >
> >
> >
>
>
next parent reply other threads:[~2006-11-30 22:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <OFB78608CD.65116F14-ON85257236.0073959D-85257236.00738AAF@mck.us.ray.com>
2006-12-01 0:25 ` Dave Sperry [this message]
2006-12-01 3:12 ` Perry Cheng
[not found] <OFBBDFEA36.CA571100-ON85257237.00006111-85257237.0000676B@mck.us.ray.com>
2006-12-01 3:14 ` Dave Sperry
2006-11-30 18:10 Stone, Joshua I
-- strict thread matches above, loose matches on Subject: below --
2006-11-30 15:31 Stone, Joshua I
2006-11-30 1:35 Perry Cheng
2006-11-30 1:41 ` Frank Ch. Eigler
2006-11-30 18:22 ` Martin Hunt
2006-11-30 22:01 ` Perry Cheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1164924085.8146.10.camel@fc6-rt \
--to=dave_sperry@ieee.nospam.dot.org \
--cc=perryche@us.ibm.com \
--cc=systemtap@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).