All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Stancek <jstancek@redhat.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH 2/2] perf_event_open02: make test more reliable on -rt kernels
Date: Wed, 16 Oct 2019 08:42:40 -0400 (EDT)	[thread overview]
Message-ID: <1321370412.6455436.1571229760838.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <20191016114424.GB27278@rei.lan>


----- Original Message -----
> Hi!
> > Signed-off-by: Jan Stancek <jstancek@redhat.com>
> > ---
> >  .../kernel/syscalls/perf_event_open/perf_event_open02.c   | 15
> >  +++++++++++++++
> >  1 file changed, 15 insertions(+)
> > 
> > diff --git a/testcases/kernel/syscalls/perf_event_open/perf_event_open02.c
> > b/testcases/kernel/syscalls/perf_event_open/perf_event_open02.c
> > index 1cfe29bb3d8a..6fc6f4afa119 100644
> > --- a/testcases/kernel/syscalls/perf_event_open/perf_event_open02.c
> > +++ b/testcases/kernel/syscalls/perf_event_open/perf_event_open02.c
> > @@ -52,6 +52,7 @@ Usage is: ./performance_counter02  [-v]
> >  The -v flag makes it print out the values of each counter.
> >  */
> >  
> > +#define _GNU_SOURCE
> >  #include <stdio.h>
> >  #include <stddef.h>
> >  #include <stdlib.h>
> > @@ -222,6 +223,20 @@ static void setup(void)
> >  	int i;
> >  	struct perf_event_attr tsk_event, hw_event;
> >  
> > +#ifdef HAVE_SCHED_GETCPU
> > +	cpu_set_t mask;
> 
> Don't we have to allocate the mask dynamically so that we do not fail on
> systems with more than CPU_SETSIZE (1024) CPUs?
> 
> We already have fallback macros for older libc in include/lapi/cpuset.h
> so that we can use CPU_ALLOC() unconditionally.

Haven't thought of that. I'll look into adding that for v2.

  reply	other threads:[~2019-10-16 12:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-16 11:24 [LTP] [PATCH 1/2] perf_event_open02: stop groups with hw counters first Jan Stancek
2019-10-16 11:24 ` [LTP] [PATCH 2/2] perf_event_open02: make test more reliable on -rt kernels Jan Stancek
2019-10-16 11:44   ` Cyril Hrubis
2019-10-16 12:42     ` Jan Stancek [this message]
2019-10-16 14:05       ` [LTP] [PATCH v2] " Jan Stancek
2019-10-16 14:14         ` Cyril Hrubis
2019-10-18  8:12           ` Jan Stancek
2019-10-16 11:38 ` [LTP] [PATCH 1/2] perf_event_open02: stop groups with hw counters first Cyril Hrubis

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=1321370412.6455436.1571229760838.JavaMail.zimbra@redhat.com \
    --to=jstancek@redhat.com \
    --cc=ltp@lists.linux.it \
    /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.