Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp1024687rwn; Thu, 8 Sep 2022 12:09:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR5ClqYSjH5ZwzGG5Hj1yRbcemhf83l0PNmjSCjADci08vEtyTh8ZKqJWZRRMfGEED8ARjo/ X-Received: by 2002:a17:902:ebd2:b0:174:3e94:d01 with SMTP id p18-20020a170902ebd200b001743e940d01mr10754679plg.112.1662664187785; Thu, 08 Sep 2022 12:09:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662664187; cv=none; d=google.com; s=arc-20160816; b=jj3ghO7O2g3wtbipdQOVx1ESnUxetDqPtHDNFppQb3PP1Odjnghz4xokJD47fO0EXJ wKgAe9gNZQ5zLWEZ1jIgUZZ9VcZG27lJoHhPBqPU6TfDFiqkvxviA9aMIWjPGJFPmDJx Zsf1xbaX0LSgxmEXghmvpa1iK28OHgTw0RFL2uAlm5AQ5YABaLoVTO8Co+CETgQg8YpH IgQ4PsmeCbvCsdwRN0GpKOeralwEUG68aHhag/kbcgEIRDAF0XRUtl+uzqPR2b7DZOP8 Dvi5NKSJvTpfeZOmilethUZTp87OHdxWtSziEuOpk1YkGl4mrujmUV549AUSPDMFqgYH 19iw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=y347zp0pDDqBYBB20Gic2du3D/doPtMZS+B6VC24GZ0=; b=HTjCWJ9P0i/zAN/OOWqOIRxNaYk/lA6jU+o6IMShckvY2Smg4hiuBYDILE+OZeh9dc 9nEdXVzgEs88sPnYN99sxBedYzGjROi9IHMnin8fNUci3Dl8QNEo91mMuVZiqp47oaA8 fKUozy5MtsHRdn8SJOS/sGpTENICqVviQtvQdfxv4HVGRvuLPi4wY0oSf+SPsClVYa2j V7xtFm7kdVoDFWpgJSItLNd6SlOicoaCJqnZVvlIvHF8JsrDz2GzIbelR01zTVmEcNj2 UaVTfKp5CeK0ROGsfCZneV2hKH4hxMdd0Qu1RF+Q7rvKpppbBccLLJS2UXlfbZSPnl+z RM6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GVsF88Gs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mh6-20020a17090b4ac600b001fb0a131e40si954195pjb.10.2022.09.08.12.09.34; Thu, 08 Sep 2022 12:09:47 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GVsF88Gs; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231314AbiIHSx2 (ORCPT + 99 others); Thu, 8 Sep 2022 14:53:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232500AbiIHSxT (ORCPT ); Thu, 8 Sep 2022 14:53:19 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1492B103061; Thu, 8 Sep 2022 11:53:04 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 1C22C61DCB; Thu, 8 Sep 2022 18:53:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5375EC433C1; Thu, 8 Sep 2022 18:52:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1662663179; bh=OfEwE92FvUQTZ2OVXWPHaUk+Ohbu1SzoKoKbJOo2mgA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GVsF88Gsv6xnzlYC4hcwd7V9Ser2eLDknyGibf4FfThXQyfwn/omW+Ct0MCVl7wlL INroToWOpe6rCdNKmLJXLzyJY3o3IkX7LLx2uZGuF7v8TYkSn1adHphcepHiOLN1F8 Apr+y4uhmfH8HzSmPLiPZjFHn4xyP+KLYRyuy9FbVE5IbeW5dtnXObvjMjvEYj24px ztuHLIOIt1RW64mh8fm6op6GvyGXpOJ8GbdAEUqD23h2fV6EJ2N7KJQX7hSacvpHwn yiDlz/9z6TPFVVuTA+u8SFTb1rrXfBDEEkX+46GrdKAXZU65xDYN15YsRwmQ0OGGwW /9zpvb5oQ5N4Q== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id 333FD404A1; Thu, 8 Sep 2022 15:52:57 -0300 (-03) Date: Thu, 8 Sep 2022 15:52:57 -0300 From: Arnaldo Carvalho de Melo To: Ian Rogers Cc: Jiri Olsa , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Namhyung Kim , James Clark , Kees Cook , "Gustavo A. R. Silva" , Adrian Hunter , Riccardo Mancini , German Gomez , Colin Ian King , Song Liu , Dave Marchevsky , Athira Rajeev , Alexey Bayduraev , Leo Yan , linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org, Stephane Eranian Subject: Re: [PATCH v2 6/6] perf cpumap: Add range data encoding Message-ID: References: <20220614143353.1559597-1-irogers@google.com> <20220614143353.1559597-7-irogers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Url: http://acmel.wordpress.com X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Em Wed, Sep 07, 2022 at 03:41:19PM -0700, Ian Rogers escreveu: > On Thu, Aug 4, 2022 at 12:30 PM Ian Rogers wrote: > > > > On Sun, Jul 31, 2022 at 5:39 AM Jiri Olsa wrote: > > > > > > On Tue, Jun 14, 2022 at 07:33:53AM -0700, Ian Rogers wrote: > > > > > > SNIP > > > > > > > + event = cpu_map_data__alloc(&syn_data, sizeof(struct perf_event_header)); > > > > if (!event) > > > > return NULL; > > > > > > > > + syn_data.data = &event->data; > > > > event->header.type = PERF_RECORD_CPU_MAP; > > > > - event->header.size = size; > > > > - event->data.type = type; > > > > - > > > > - cpu_map_data__synthesize(&event->data, map, type, max); > > > > + event->header.size = syn_data.size; > > > > + cpu_map_data__synthesize(&syn_data); > > > > return event; > > > > } > > > > > > > > + > > > > int perf_event__synthesize_cpu_map(struct perf_tool *tool, > > > > const struct perf_cpu_map *map, > > > > perf_event__handler_t process, > > > > @@ -1891,24 +1894,20 @@ int perf_event__synthesize_event_update_name(struct perf_tool *tool, struct evse > > > > int perf_event__synthesize_event_update_cpus(struct perf_tool *tool, struct evsel *evsel, > > > > perf_event__handler_t process) > > > > { > > > > - size_t size = sizeof(struct perf_event_header) + sizeof(u64) + sizeof(u64); > > > > + struct synthesize_cpu_map_data syn_data = { .map = evsel->core.own_cpus }; > > > > struct perf_record_event_update *ev; > > > > - int max, err; > > > > - u16 type; > > > > - > > > > - if (!evsel->core.own_cpus) > > > > - return 0; > > > > > > all seems fine, just looks like we no longer do this check, > > > might not be needed anymore, as that changed in past > > > > This function is called in a test and in this file. The caller already > > does this test and so the check is redundant plus a little confusing: > > https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/tree/tools/perf/util/synthetic-events.c?h=perf/core#n2062 > > As you say, it wasn't needed any more and so I removed it. > > > > Thanks, > > Ian > > Would be nice to land this imo. Anything outstanding? So the last two patches were outstanding, 5/6 applied cleanly, 6/6 had some fuzzes, minimal stuff, applied, I'll push it out soon, please check. - Arnaldo