Received: by 2002:ac0:e350:0:0:0:0:0 with SMTP id g16csp2577088imn; Tue, 2 Aug 2022 08:10:58 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sgm1GFCeBeer/HSX8H5R71hkpfLnLXN054I0Gf6JGZmMBUS2ZICmgxbTGprgQtOqIZTZJO X-Received: by 2002:a63:43c2:0:b0:41a:9dea:5dac with SMTP id q185-20020a6343c2000000b0041a9dea5dacmr17012782pga.585.1659453058670; Tue, 02 Aug 2022 08:10:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659453058; cv=none; d=google.com; s=arc-20160816; b=YTajfZHs0y9J1w5RKCzTvdZGBqR29Ds924xlRlTEfF4kvCDITZvTDeM8jIdqsMxsSh fgLDPiGuB9YXlRVyZrwJ8znJh9iiPFwapMrF/0sL+N2n7NkON6GBG2etN9NElS9+xgJq 3s4EW1PU8OCEJAAzTBkfwRbB2thby2l5K4oCgpAOD5f7edJq5ZkKrWwk1EDm3Hva77Sh ViRz5VIgOO5j7s79sFtPxQ+n39MIJ31UV/WfKUuAtQHVKMjaJglT81pl1/vTqnbxEQmd mVg4XyiJK/tzE4A15aazmaGE3lRfjZGg4vC3RiNI6yboPP8O6uTtOdm/w7+nZ3tr6s3f 1xWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=9IzoHrmopcjFEESKu5sI9/X7Toj+jNaCkzCz0M0Cdf4=; b=Qa3sX5XBll4JzRjfQRDQI4AFBUQgaiFjvydXjSQWuX28QavaLTpXG6ARu9t91eM4rJ AS0DtoXMmqAg/44tIIbaOLxPlgeNsErwEDEbhfYKz+PT3ZMszZEJYZ3bGmOZvUynVyUu 3w7ctd2kVrX5cXagzjNhekn2OMF50lOULVvK5GrjXtsu0YzgM3ufK4iQJ6Wyb0soyaRu tv57c9Yk/l8YZOXj6sdb1zm8GNEJUjBIQ6DcuUlWqPj989CVEYLCmEVeRwp8e3/5iii2 vJAxkAlufTMPtDcxUbBjYmqulszQOI3/eQa+VGZIaIxaUhp1y1Wnzp0DsEoTRlUthBOg Yp7Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r12-20020a632b0c000000b0040cf84add25si15752848pgr.878.2022.08.02.08.10.44; Tue, 02 Aug 2022 08:10:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237340AbiHBO45 (ORCPT + 99 others); Tue, 2 Aug 2022 10:56:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234222AbiHBO4z (ORCPT ); Tue, 2 Aug 2022 10:56:55 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B0141CB16 for ; Tue, 2 Aug 2022 07:56:54 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id 86371CE1FE3 for ; Tue, 2 Aug 2022 14:56:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ECF90C433C1; Tue, 2 Aug 2022 14:56:47 +0000 (UTC) Date: Tue, 2 Aug 2022 10:56:46 -0400 From: Steven Rostedt To: kernel test robot Cc: "Masami Hiramatsu (Google)" , llvm@lists.linux.dev, kbuild-all@lists.01.org, Tom Zanussi , Ingo Molnar , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] tracing: Add .percent suffix option to histogram values Message-ID: <20220802105646.50819088@gandalf.local.home> In-Reply-To: <202208021438.2r5RXlo9-lkp@intel.com> References: <165932284978.2881436.13536997915615710506.stgit@devnote2> <202208021438.2r5RXlo9-lkp@intel.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_HI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2 Aug 2022 14:49:36 +0800 kernel test robot wrote: > All errors (new ones prefixed by >>): > > >> ld.lld: error: undefined symbol: __udivdi3 This is due to this: > @@ -5190,18 +5202,34 @@ static void hist_trigger_print_key(struct seq_file *m, > seq_puts(m, "}"); > } > > +/* Get the 100 times of the percentage of @val in @total */ > +static inline unsigned int __get_percentage(u64 val, u64 total) > +{ > + if (val < (U64_MAX / 10000)) > + return (unsigned int)(val * 10000 / total); > + else > + return val / (total / 10000); > +} > + You can't use '/' on u64 values. You have to use div64*(). Otherwise 32 bit architectures may use floating point operations or glibc helpers. See the other divisions in trace_events_hist.c that do so too. -- Steve > >>> referenced by trace_events_hist.c:5211 (kernel/trace/trace_events_hist.c:5211) > >>> trace/trace_events_hist.o:(hist_show) in archive kernel/built-in.a > >>> referenced by trace_events_hist.c:0 (kernel/trace/trace_events_hist.c:0) > >>> trace/trace_events_hist.o:(hist_show) in archive kernel/built-in.a > >>> referenced by trace_events_hist.c:5211 (kernel/trace/trace_events_hist.c:5211) > >>> trace/trace_events_hist.o:(hist_show) in archive kernel/built-in.a > >>> referenced 1 more times