Re: Generic Monitoring Framework Proposal

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Generic Monitoring Framework Proposal
Дата
Msg-id 20060620123612.GA24606@svana.org
обсуждение исходный текст
Ответ на Re: Generic Monitoring Framework Proposal  (Chris Browne <cbbrowne@acm.org>)
Список pgsql-hackers
On Mon, Jun 19, 2006 at 05:14:15PM -0400, Chris Browne wrote:
> Robert.Lor@Sun.COM (Robert Lor) writes:
> > For DTrace, probes can be enabled using a D script. When the probes
> > are not enabled, there is absolutely no performance hit whatsoever.
>
> That seems inconceivable.
>
> In order to have a way of deciding whether or not the probes are
> enabled, there has *got* to be at least one instruction executed, and
> that can't be costless.

I think the trick is that the probe are enabled by overwriting bits of
code. So by default you might put a No-Op instruction and if you want
to trace you replace that with an illegal instruction or the special
one-byte INT3 instruction x86 system have for this purpose.

With a 17-stage pipelined processor I imagine the cost of a no-op would
indeed be almost unmeasurable (increase code size I suppose).

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Andrew Dunstan"
Дата:
Сообщение: Re: shall we have a TRACE_MEMORY mode
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: shall we have a TRACE_MEMORY mode