From: Dave Jones <davej@redhat.com>
To: Vince Weaver <vincent.weaver@maine.edu>
Cc: Tommi Rantala <tt.rantala@gmail.com>, trinity@vger.kernel.org
Subject: Re: [patch] perf_event_open enable sysfs exported events
Date: Thu, 13 Jun 2013 16:53:32 -0400 [thread overview]
Message-ID: <20130613205332.GA5440@redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.10.1306131555210.24106@vincent-weaver-1.um.maine.edu>
On Thu, Jun 13, 2013 at 03:58:37PM -0400, Vince Weaver wrote:
> On Thu, 13 Jun 2013, Tommi Rantala wrote:
>
> > [221186.493638] traps: trinity-child30[375] trap divide error
> > ip:40dbae sp:7fff3c1d7ae0 error:0 in trinity[400000+28000]
>
> diff --git a/syscalls/perf_event_open.c b/syscalls/perf_event_open.c
> index 32c11cf..11f49e8 100644
> --- a/syscalls/perf_event_open.c
> +++ b/syscalls/perf_event_open.c
> @@ -406,6 +406,14 @@ static long long random_sysfs_config(__u32 *type, __u64 *config1) {
> int i,j;
> long long c=0,c1=0;
>
> + if (num_pmus==0) {
> + /* For some reason we didn't get initialized */
> + /* Fake it so we don't divide by zero */
> + *type=rand32();
> + *config1=rand64();
> + return rand64();
> + }
Probably safer ?
+ *type = rand32() | 1;
+ *config1 = rand64() | 1;
+ return rand64() | 1;
Dave
next prev parent reply other threads:[~2013-06-13 20:53 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-11 4:33 [patch] perf_event_open enable sysfs exported events Vince Weaver
2013-06-11 21:05 ` Dave Jones
2013-06-11 21:24 ` Vince Weaver
2013-06-11 21:32 ` Dave Jones
2013-06-11 22:21 ` Vince Weaver
2013-06-11 22:25 ` Dave Jones
2013-06-13 19:38 ` Tommi Rantala
2013-06-13 19:58 ` Vince Weaver
2013-06-13 20:53 ` Dave Jones [this message]
2013-06-13 21:07 ` Vince Weaver
2013-06-13 21:05 ` Dave Jones
2013-06-19 15:27 ` Dave Jones
2013-06-19 16:34 ` Vince Weaver
2013-06-19 16:38 ` Dave Jones
2013-06-19 19:29 ` Vince Weaver
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=20130613205332.GA5440@redhat.com \
--to=davej@redhat.com \
--cc=trinity@vger.kernel.org \
--cc=tt.rantala@gmail.com \
--cc=vincent.weaver@maine.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.