mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: eranian@gmail.com
Cc: linux-kernel@vger.kernel.org,
	perfmon2-devel <perfmon2-devel@lists.sourceforge.net>
Subject: Re: perfmon3 interface overview
Date: Sun, 5 Oct 2008 16:44:33 +1100	[thread overview]
Message-ID: <20081005054433.GB469@yookeroo.seuss> (raw)
In-Reply-To: <7c86c4470810040020u126dfc1eg7d6db13078239e7e@mail.gmail.com>

On Sat, Oct 04, 2008 at 09:20:00AM +0200, stephane eranian wrote:
> David,
> 
> On Sat, Oct 4, 2008 at 8:05 AM, David Gibson
> <david@gibson.dropbear.id.au> wrote:
> >>
> >> If we wanted to go even further, we could combine start/stop, attach/detach
> >> into  a single syscall:
> >
> > Well, you could.  But the attach/detach take a parameter which
> > start/stop don't, making it a less obvious merge to make.
> >
> Unless you make the 3rd argument optional and hide this in a
> user library. This is how this is handled for pfm_create_session()
> for instance. The library would define this as follows:
> 
>    int pfm_control_session(int fd, int flags, ...);
> 
> Based upon flags, it would use va_arg() to get to the 3rd argument and
> pass it to the syscall which implements the version below. A dummy value
> would be passed with the flags is not equal to PFM_CTFL_ATTACH.

Yeah, that's what I'm saying.  You could do it, but it feels like
you're forcing it, at least to me.  As you say it starts to look a bit
like ioctl() again.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

  reply	other threads:[~2008-10-05  5:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <7c86c4470809231432j4231cfa4g7dd158a7fe9c9277@mail.gmail.com>
2008-09-25 21:48 ` stephane eranian
2008-10-03  6:17   ` David Gibson
     [not found]     ` <7c86c4470810030354x6984372akfe18761da7504a0c@mail.gmail.com>
2008-10-03 10:58       ` stephane eranian
2008-10-03 11:12         ` stephane eranian
2008-10-04  6:05           ` David Gibson
2008-10-04  7:20             ` stephane eranian
2008-10-05  5:44               ` David Gibson [this message]
2008-10-05  5:53         ` David Gibson
2008-10-05 21:23           ` stephane eranian
2008-10-07  3:56             ` David Gibson
2008-10-07  9:46               ` stephane eranian
2008-10-08  0:53                 ` David Gibson
2008-10-08 10:09                   ` stephane eranian
2008-10-07  9:24             ` [perfmon2] " Arnd Bergmann
2008-10-03 14:44 ` stephane eranian

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=20081005054433.GB469@yookeroo.seuss \
    --to=david@gibson.dropbear.id.au \
    --cc=eranian@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perfmon2-devel@lists.sourceforge.net \
    /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

all inboxes | Powered by JetHome®