[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/3] qsp: QEMU's Synchronization Profiler
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH 1/3] qsp: QEMU's Synchronization Profiler |
Date: |
Wed, 15 Aug 2018 15:04:56 +0800 |
User-agent: |
Mutt/1.10.0 (2018-05-17) |
On Wed, 08/15 00:53, Emilio G. Cota wrote:
> > > +#define QSP_GEN_VOID(type_, qsp_t_, func_, impl_) \
> > > + void func_(type_ *obj, const char *file, unsigned line) \
> > > + { \
> > > + struct qsp_entry *e = qsp_entry_get(obj, file, line, qsp_t_); \
> > > + int64_t t; \
> > > + \
> >
> > No qsp_init()?
> >
> > > + t = get_clock(); \
> > > + impl_(obj, file, line); \
> > > + atomic_set(&e->ns, e->ns + get_clock() - t); \
> > > + atomic_set(&e->n_acqs, e->n_acqs + 1); \
> > > + }
> > > +
> > > +#define QSP_GEN_RET1(type_, qsp_t_, func_, impl_) \
> > > + int func_(type_ *obj, const char *file, unsigned line) \
> > > + { \
> > > + struct qsp_entry *e = qsp_entry_get(obj, file, line, qsp_t_); \
> > > + int64_t t; \
> > > + int err; \
> > > + \
> >
> > Same here.
>
> qsp_init is called by qsp_get_entry.
Oh yes, I missed it. Then you can remove the one in qsp_cond_wait() as well for
consistency. (That's where I noticed this).
Fam
- Re: [Qemu-devel] [PATCH 2/3] monitor: show sync profiling info with 'info sync', (continued)
Re: [Qemu-devel] [PATCH 0/3] synchronization profiler, no-reply, 2018/08/15