Re: DTrace probes broken in HEAD on Solaris?
От | Zdenek Kotala |
---|---|
Тема | Re: DTrace probes broken in HEAD on Solaris? |
Дата | |
Msg-id | 49CA296D.20102@sun.com обсуждение исходный текст |
Ответ на | Re: DTrace probes broken in HEAD on Solaris? (Robert Lor <Robert.Lor@Sun.COM>) |
Список | pgsql-hackers |
Dne 24.03.09 22:31, Robert Lor napsal(a): > I think the is-enabled test will address the issues you encountered. I > see a few alternative to fixing this: > > 1) Only use if (foo_ENABLED()) test for probes with expensive function > call/computation in arguments. This will keep the code clean, and we can > document this in the "Definine New Probes" section in the online doc. > > 2) Add the if(foo_ENABLED()) test to all probes manually and make this a > requirement for all future probes. This makes the check explicit and > avoid confusion. > > 3) Post-process probes.h so if(foo_ENABLED()) test is added to every > probe. We're doing some post-processing now by pre-pending TRACE_ to the > macros with a sed script. Personally, I don't like doing complex > post-processing of output from another tool because the script can break > if for some reason DTrace's output is changed. > > I prefer option 1 the most and 3 the least. I prefer also option 1. In many cases if(foo_ENABLED) has same or bigger performance penalty like disabled probe itself. Zdenek
В списке pgsql-hackers по дате отправления: