From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D80AC3E8C5 for ; Fri, 27 Nov 2020 20:41:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CB1D421D7F for ; Fri, 27 Nov 2020 20:41:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="b5UlVBkb" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732597AbgK0UkU (ORCPT ); Fri, 27 Nov 2020 15:40:20 -0500 Received: from mail.kernel.org ([198.145.29.99]:43806 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729363AbgK0UjP (ORCPT ); Fri, 27 Nov 2020 15:39:15 -0500 Received: from quaco.ghostprotocols.net (unknown [179.97.37.151]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AFED821D7F; Fri, 27 Nov 2020 20:39:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606509554; bh=9umCh7sd7cWMjj78c48xEUF3JxYar/FTlkO7bug0Vag=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=b5UlVBkbnJeIVVntMGGGVFwa7iS04Jbkp+VYmQ2H4S4FrvMeXFEuojwdCeKxUzX5V Nk/m3+LmY5Caxa9LOg9kTvOSXrGLEKm/5exFbhqBb+9n6M/2C5YqW9mtNedVPf4NsJ RtIvOSA8NICp7SSF4EVD+SpnQQpm8gvEPQ4ZUvcs= Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id A64A34079D; Fri, 27 Nov 2020 17:39:12 -0300 (-03) Date: Fri, 27 Nov 2020 17:39:12 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Andrii Nakryiko , Jiri Olsa , dwarves@vger.kernel.org, bpf , Alexei Starovoitov , Andrii Nakryiko , Yonghong Song , Hao Luo Subject: Re: [PATCH 2/2] btf_encoder: Detect kernel module ftrace addresses Message-ID: <20201127203912.GQ70905@kernel.org> References: <20201124161919.2152187-1-jolsa@kernel.org> <20201124161919.2152187-3-jolsa@kernel.org> <20201127174037.GB2767982@krava> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201127174037.GB2767982@krava> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Em Fri, Nov 27, 2020 at 06:40:37PM +0100, Jiri Olsa escreveu: > On Thu, Nov 26, 2020 at 08:18:58PM -0800, Andrii Nakryiko wrote: > > On Tue, Nov 24, 2020 at 8:22 AM Jiri Olsa wrote: > > > > > > Add support to detect kernel module dtrace addresses and use > > > it as filter for functions. > > > > typo: dtrace -> ftrace? > > heh, honest typo I swear ;-) f comes after d ;-) > SNIP > > > + /* get __mcount_loc */ > > > + sec = elf_section_by_name(btfe->elf, &btfe->ehdr, &shdr_mcount, > > > + "__mcount_loc", NULL); > > > + if (!sec) { > > > + if (btf_elf__verbose) { > > > + printf("%s: '%s' doesn't have __mcount_loc section\n", __func__, > > > + btfe->filename); > > > + } > > nit: unnecessary {} for single-statement if > ah ok, I put it because kernel guys scream with multiline > conditions without {} You can keep it like that, or get free from 80 column constraints and make it: if (btf_elf__verbose) printf("%s: '%s' doesn't have __mcount_loc section\n", __func__, btfe->filename); - Arnaldo