Re: [PATCH 2/2] trace: improve performance while category is disabled
- From
- Gennady Kupava <gennady.kupava@gmail.com>
- Date
- Nov 27, 2017, 10:12 UTC
- Message-ID
- <CAPu-DQpKRvU05pgfFpdguAfMKJnHpshsajivTCtNa56GtToUtg@mail.gmail.com>
- In-Reply-To
- <xmqq8tesflne.fsf@gitster.mtv.corp.google.com>
> Spotted yet another. This function in a header file, that is
included by many source files, must be made "static inline" (which I already did as without the fix I couldn't get 'pu' to compile).
Thanks, missed that, seems my compiler inlined all calls and I didn't notice the problem.
On 27 November 2017 at 03:25, Junio C Hamano <gitster@pobox.com> wrote:
Show 18 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
>> Just in case others notice style and whitespace issues, I've applied
>> the following to fix them, so there is no need to reroll only to fix
>> these.
>> ...
>> -inline int trace_pass_fl(struct trace_key *key) {
>> +inline int trace_pass_fl(struct trace_key *key)
>> +{
>> return key->fd || !key->initialized;
>> }
>
> Spotted yet another. This function in a header file, that is
> included by many source files, must be made "static inline" (which I
> already did as without the fix I couldn't get 'pu' to compile).
>
>
>