Hello,
Peter Gulutzan a écrit, Le 22.06.2009 22:15:
> Hi Marc,
>
> Marc Alff wrote:
>> Hi Guilhem
>>
>> Guilhem Bichot wrote:
>>
>>> Salut Marc,
>>>
>>> 1) EVENTS_WAITS_CURRENT.SPINS is always NULL; what is the plan for this
>>> column?
>>> Is there somewhere a description of what each table in the Performance
>>> Schema contains (I read Peter's blog)?
>>>
>> I will defer to Peter for that.
>>
>>
>
> Quote:
>
> "
>
> [ EVENTS_WAITS_CURRENT."SPINS" COLUMN ]
>
> SPINS INTEGER
>
> This is the number of "spins" for a mutex, or else it's not.
>
> Peter has to mention this because there might be a whole group
> of columns whose values depend on what family the wait belongs
> to (for example is it a mutex), and even on peculiarities of
> the storage engine (for example a spin counter is often not
> going to be available). So sometimes there is going to
> be a bit of possibly-useful extra information, but usually
> it's "not available" or "not applicable" and therefore NULL.
>
> 5.0 SHOW MUTEX STATUS had Spin_waits and Spin_rounds for a while.
> But now you only see them when the moon is full.
> http://dev.mysql.com/doc/refman/5.0/en/show-mutex-status.html
> Someday somebody (perhaps not Sergei Golubchik) will say that
> we must keep SHOW MUTEX STATUS / SHOW ENGINE INNODB MUTEX STATUS
> until there's some other way to know about spins. Usefulness is
> a less important consideration.
>
> Peter considered: in that case, what folks really want is an
> "EXTRA" column and we'd leave it up to the person who
> adds the instrument, to decide what it means. But
> we'll decide: no. If you have extra information, you
> should petition to add new columns.
>
> Two spins for the same mutex acquisition are not counted
> as separate events. They won't get different EVENT_ID numbers.
>
> "
Thanks Peter.
So, the column is NULL now, may be filled later.
Right now, if I understood correctly, the Performance Schema Interface
does not allow a developer to make his synchronization object report to
Performance Schema "I spun X times", so that X possibly ends up in the
SPINS column.
Why do we expose the column to the user already now, then? Shouldn't it
be added only later when we offer developers the API to fill it?
Won't we get questions from users like 'why is this column always NULL'?
What is the benefit of featuring it now?
--
Mr. Guilhem Bichot <guilhem@stripped>
Sun Microsystems / MySQL, Lead Software Engineer
Bordeaux, France
www.sun.com / www.mysql.com