[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F06AC0E.1000809@qca.qualcomm.com>
Date: Fri, 6 Jan 2012 10:08:46 +0200
From: Kalle Valo <kvalo@....qualcomm.com>
To: David Laight <David.Laight@...LAB.COM>
CC: <linville@...driver.com>, <sfr@...b.auug.org.au>,
<netdev@...r.kernel.org>, <linux-wireless@...r.kernel.org>,
<linux-kernel@...r.kernel.org>, <linux-next@...r.kernel.org>,
<ath6kl-devel@...lcomm.com>, <davem@...emloft.net>
Subject: Re: [PATCH v2 4/6] ath6kl: get rid of AR_DBG_LVL_CHECK()
On 01/05/2012 04:14 PM, David Laight wrote:
>
>> We don't need it as debug calls already have a log level and
>> compiler should be smart enough to optimise away the code when
>> ath6kl debug code is not enabled.
>
> Have you checked?
No, I just assumed so.
> I think you are assuming that because the called function collapses,
> the call will be removed allowing the loop to be removed. I suspect
> this is only true if the function is inlined. IIRC the normal linkage
> rules mean that only static functions are candidates for inlining.
I think you are right.
But while I investigated more I noticed that ath6kl_dump_registers()
will be an empty static inline whenever CONFIG_ATH6KL_DEBUG is disabled
and that will make sure that the whole function is not included. So
whenever ath6kl debug code is enabled there is a small performance hit,
but it's so small that IMHO we don't need to worry about it.
And for optimal performance CONFIG_ATH6KL_DEBUG should be disabled anyway.
What do you think?
Kalle
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists