From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH 3 of 3] xen: sched_credit: add some tracing Date: Wed, 5 Dec 2012 11:51:12 +0000 Message-ID: <50BF3530.8080603@eu.citrix.com> References: <50BE4AC2.9010507@eu.citrix.com> <1354708472.21632.21.camel@Abyss> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1354708472.21632.21.camel@Abyss> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Dario Faggioli Cc: xen-devel , "Keir (Xen.org)" List-Id: xen-devel@lists.xenproject.org On 05/12/12 11:54, Dario Faggioli wrote: > On Tue, 2012-12-04 at 19:10 +0000, George Dunlap wrote: >> On 03/12/12 16:35, Dario Faggioli wrote: >>> + /* Avoid TRACE_* to avoid a lot of useless !tb_init_done checks */ >>> + for_each_cpu(cpu, &mask) >>> + { >>> + struct { >>> + unsigned cpu:8; >>> + } d; >>> + d.cpu = cpu; >>> + trace_var(TRC_CSCHED_TICKLE, 0, >>> + sizeof(d), >>> + (unsigned char*)&d); >> Why not just TRC_1D()? >> > As I tried to explain in the comment, I just wanted to avoid checking > for !tb_init_done more than once, as this happens within a loop and, at > least potentially, there may be more CPUs to tickle (and thus more calls > to TRACE_1D). I take this comment of yours as you not thinking that is > something worthwhile, right? If so, I can definitely turn this into a > "standard" TRACE_1D() call. Oh right -- yeah, no sense in having a duplicate check on tb_init_done; but the struct is still pointless; just passing sizeof(cpu) and &cpu should be prettier (even if the complier will probably optimize it to the same thing). -George