From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932776AbcEKNrP (ORCPT ); Wed, 11 May 2016 09:47:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57689 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932562AbcEKNrM (ORCPT ); Wed, 11 May 2016 09:47:12 -0400 From: Jeff Moyer To: Steven Rostedt Cc: Shaohua Li , , , , Subject: Re: [PATCH 3/3] blk-throttle: don't parse cgroup path if trace isn't enabled References: <2c3ee532132f8925dd0be1178e8dee0bba6b448c.1462838969.git.shli@fb.com> <20160510193345.6243a503@gandalf.local.home> X-PGP-KeyID: 1F78E1B4 X-PGP-CertKey: F6FE 280D 8293 F72C 65FD 5A58 1FF8 A7CA 1F78 E1B4 X-PCLoadLetter: What the f**k does that mean? Date: Wed, 11 May 2016 09:47:09 -0400 In-Reply-To: <20160510193345.6243a503@gandalf.local.home> (Steven Rostedt's message of "Tue, 10 May 2016 19:33:45 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 11 May 2016 13:47:11 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Steven Rostedt writes: >> Do we want to return !!(bt->act_mask & BLK_TC_NOTIFY)? > > The return type is bool. I would think that gcc would be smart enough > to make the conversion. > > To check, I compiled the following function: > > bool testbool(int x) > { > return x & 1<<3; > } > > and the result was: > > > 0000000000000000 : > 0: 55 push %rbp > 1: 48 89 e5 mov %rsp,%rbp > 4: 89 7d fc mov %edi,-0x4(%rbp) > 7: 8b 45 fc mov -0x4(%rbp),%eax > a: 83 e0 08 and $0x8,%eax > d: 85 c0 test %eax,%eax > f: 0f 95 c0 setne %al > 12: 5d pop %rbp > 13: c3 retq > > I get the same by adding !!(x & 1<<3) > > Looks like it does the conversion. Cool, thanks! -Jeff