From: "dsmith at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug runtime/20820] another "soft lockup" BUG on RHEL7 ppc64
Date: Wed, 30 Nov 2016 19:10:00 -0000 [thread overview]
Message-ID: <bug-20820-6586-9sUhsQJBLj@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-20820-6586@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=20820
--- Comment #10 from David Smith <dsmith at redhat dot com> ---
I played around with this one a bit more, trying to fix the "division by zero"
error. To fix this, I switched to using the monotonic clock function
cpu_clock_us() instead of using gettimeofday_us() on the linux runtime. I then
started getting MAXNESTING errors with the dyninst runtime, so I switched the
time() function to a macro.
Here's the patch:
====
diff --git a/testsuite/systemtap.base/optim_stats1.stp
b/testsuite/systemtap.base/optim_stats1.stp
index 4348ec2..884f753 100644
--- a/testsuite/systemtap.base/optim_stats1.stp
+++ b/testsuite/systemtap.base/optim_stats1.stp
@@ -4,17 +4,24 @@
@define feed(agg, tagg)
%(
- t = time()
+ t = @time
foreach(k in randvals)
@agg <<< k
- @tagg += time() - t
+ @tagg += @time - t
%)
global x, tx = 0, y, ty = 0
global a, ta = 0, b, tb = 0
global randvals[@RANDCNT]
-function time() { return gettimeofday_us() }
+@define time
+%(
+ %( runtime == "dyninst" %?
+ gettimeofday_us()
+ %:
+ cpu_clock_us(cpu())
+ %)
+%)
probe begin
{
diff --git a/testsuite/systemtap.base/optim_stats2.stp
b/testsuite/systemtap.base/optim_stats2.stp
index 4e28bdd..4ca82a9 100644
--- a/testsuite/systemtap.base/optim_stats2.stp
+++ b/testsuite/systemtap.base/optim_stats2.stp
@@ -4,17 +4,24 @@
@define feed(agg, tagg)
%(
- t = time()
+ t = @time
foreach(k in randvals)
@agg <<< k
- @tagg += time() - t
+ @tagg += @time - t
%)
global x, tx = 0, y, ty = 0
global a, ta = 0, b, tb = 0
global randvals[@RANDCNT]
-function time() { return gettimeofday_us() }
+@define time
+%(
+ %( runtime == "dyninst" %?
+ gettimeofday_us()
+ %:
+ cpu_clock_us(cpu())
+ %)
+%)
probe begin
{
====
With these changes, I get no "division by zero" errors or MAXNESTING errors,
but I do start to see a FAIL.
====
Running /root/src/testsuite/systemtap.base/optim_stats.exp ...
PASS: TEST1 (0, 0)
PASS: TEST2 (10, 45)
PASS: TEST1 dyninst (0, 2)
PASS: TEST2 dyninst (10, 38)
FAIL: TEST3 (0, -4)
PASS: TEST4 (10, 16)
PASS: TEST3 dyninst (0, 8)
PASS: TEST4 dyninst (10, 26)
====
Thoughts?
--
You are receiving this mail because:
You are the assignee for the bug.
next prev parent reply other threads:[~2016-11-30 19:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-14 18:57 [Bug runtime/20820] New: " dsmith at redhat dot com
2016-11-16 21:26 ` [Bug runtime/20820] " dsmith at redhat dot com
2016-11-18 17:22 ` dsmith at redhat dot com
2016-11-18 19:01 ` dsmith at redhat dot com
2016-11-18 20:15 ` mcermak at redhat dot com
2016-11-24 16:06 ` mcermak at redhat dot com
2016-11-24 17:30 ` fche at redhat dot com
2016-11-28 16:55 ` dsmith at redhat dot com
2016-11-28 17:48 ` mcermak at redhat dot com
2016-11-29 13:47 ` mcermak at redhat dot com
2016-11-29 13:48 ` mcermak at redhat dot com
2016-11-30 19:10 ` dsmith at redhat dot com [this message]
2016-12-01 13:04 ` mcermak at redhat dot com
2016-12-01 16:11 ` dsmith at redhat dot com
2016-12-01 16:44 ` dsmith at redhat dot com
2016-12-01 19:29 ` jistone at redhat dot com
2016-12-01 20:38 ` dsmith at redhat dot com
2016-12-01 20:52 ` jistone at redhat dot com
2016-12-02 15:01 ` mcermak at redhat dot com
2016-12-02 17:30 ` dsmith at redhat dot com
2017-02-08 17:05 ` dsmith at redhat dot com
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=bug-20820-6586-9sUhsQJBLj@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--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).