qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
	qemu-devel@nongnu.org, "Markus Armbruster" <armbru@redhat.com>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	"Lluís Vilanova" <vilanova@ac.upc.edu>,
	"Richard Henderson" <rth@twiddle.net>
Subject: Re: [Qemu-devel] Our use of #include is undisciplined, and what to do about it
Date: Thu, 17 Mar 2016 19:43:03 +0000	[thread overview]
Message-ID: <20160317194303.GP5966@work-vm> (raw)
In-Reply-To: <56EB03D0.6010209@redhat.com>

* Paolo Bonzini (pbonzini@redhat.com) wrote:
> On 17/03/2016 17:29, Dr. David Alan Gilbert wrote:
> > OK, so I see TraceEvent has a TraceEventID field; so yes that works easily;
> > it turns out to be a little more expensive though since what was a:
> > 
> >    trace_events_dstate[id]
> > 
> > is now
> >    trace_events_dstate[te->id]
> 
> That however makes you waste a lot of cache on trace_events_dstate
> (commit 585ec72, "trace: track enabled events in a separate array",
> 2016-02-03).
> 
> Perhaps we get the linker to do compute the id, for example by using a
> separate data section and then use te-&te_first to compute the id...
> Richard, do you have ideas on how to do this in a reasonably portable
> manner?

It's possible we don't need the unique-id on the fast-path;  for example
if we had an id that was only unique within each trace-events file,
and it's own trace_events_dstate[] that used that ID, then that would still
be a nice statically known id.  You'd still need to be able to get the
global ID for the simple-event and anything else that needed it.

> > But hang on, what's the 'sstate' in TraceEvent; do we actually need two
> > state fields if we're passing a TraceEvent pointer around?
> 
> sstate means the event is unavailable, it's basically just a way to
> provide better error messages.

Dave

> 
> Paolo
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK

  reply	other threads:[~2016-03-17 19:43 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-15  9:29 [Qemu-devel] Our use of #include is undisciplined, and what to do about it Markus Armbruster
2016-03-15  9:40 ` Paolo Bonzini
2016-03-15 12:19   ` Markus Armbruster
2016-03-15 14:51     ` Paolo Bonzini
2016-03-15 10:03 ` Peter Maydell
2016-03-15 12:28   ` Markus Armbruster
2016-03-15 12:56     ` Peter Maydell
2016-03-15 13:39 ` Stefan Hajnoczi
2016-03-15 13:51   ` Daniel P. Berrange
2016-03-15 13:56   ` Dr. David Alan Gilbert
2016-03-16 18:23     ` Stefan Hajnoczi
2016-03-16 18:27       ` Dr. David Alan Gilbert
2016-03-17 11:25         ` Stefan Hajnoczi
2016-03-17 16:29           ` Dr. David Alan Gilbert
2016-03-17 19:21             ` Paolo Bonzini
2016-03-17 19:43               ` Dr. David Alan Gilbert [this message]
2016-03-17 19:58               ` Paolo Bonzini
2016-03-17 20:14               ` Richard Henderson
2016-03-17 20:27                 ` Peter Maydell
2016-03-17 20:29                   ` Richard Henderson
2016-03-17 21:02                     ` Paolo Bonzini
2016-03-17 20:59                 ` Paolo Bonzini
2016-03-17 19:40 ` Richard Henderson
2019-05-27 13:12 ` Markus Armbruster

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=20160317194303.GP5966@work-vm \
    --to=dgilbert@redhat.com \
    --cc=armbru@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=stefanha@redhat.com \
    --cc=vilanova@ac.upc.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 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 NNTP newsgroup(s).