Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp864256rwb; Tue, 4 Oct 2022 11:43:39 -0700 (PDT) X-Google-Smtp-Source: AMsMyM65LgggZ3ulYOFyHVbMHWx+lHIBBpYvYgNLPKNIXWQG9tZW+tmAiE1EsIZRozZk/znbWEzU X-Received: by 2002:a17:90b:3b47:b0:202:d9d4:23f7 with SMTP id ot7-20020a17090b3b4700b00202d9d423f7mr1071030pjb.56.1664909019328; Tue, 04 Oct 2022 11:43:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664909019; cv=none; d=google.com; s=arc-20160816; b=A42hOqW3Dv5n4yMnAqDK2vY9h9Iz6EoPhz2yXJMlz+neuk7kprv3dtnjvaTEvNHl0y a8p0YcLnoJ3UYj+I1iGWeodtZu2BGyPQrfeYq6qbjCr8Bp4j2YTh7lOQxw33bgCpfT8W k2WAMy8XXSpmGLkz3rCByMqMwL55bnA+HO9HPmhTJSwsRWwaGqtvH+oViA2E6JVET3Ll X2nyGQUpKM7xSYK2nG6huJASzz6sZBseipF6T/Mvdq714vrdBsPb9jrehksYdnSqVNdv 9rlx8EtuEMahVU2hCtaoWwYNAsETcqM8gyhlw+u40wmIemCGHfv7hDB/e7901DvIRoZM tpUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=zTLXNMpDg1+UniIzyXYCxtdL8YDiQl3tzokRAsSfSdQ=; b=xPKibl8D5aCrYdtm2H6w/a0D7TIYQBbDU2Pb9zhBo5ZEN4/PM9lVYLU6tg1x6oXRHS BbkrZKBFfTeKd06XQKxcze7FdFYn0VN/d9qfC/wuyN3rzP39WGgSVBJrPIpVljS/T2Uk TPNP3i2fylwK5epS0OtPTUWMQEvWYn1sEhiVSzZ187ugHp9lJQmYGJTwq5cosJqwxAoa RTkfJX5cO1YDUxqcppPvp3hOu2CUbePVjcCNOpMLDdSPPEpklLD9AB4+RFK5PbTLWFeR SkDxORIEYo1Gy0LwhJPCzGaawI5AfyQL3A2UU30olfUpZy9BR30Y4l5D3tACKG/0L4Uy 0tSg== 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; 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 z16-20020a170903019000b00176e16b0c58si9648723plg.21.2022.10.04.11.43.24; Tue, 04 Oct 2022 11:43:39 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229581AbiJDSfC (ORCPT + 99 others); Tue, 4 Oct 2022 14:35:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229609AbiJDSe7 (ORCPT ); Tue, 4 Oct 2022 14:34:59 -0400 Received: from mail-oi1-f174.google.com (mail-oi1-f174.google.com [209.85.167.174]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C307C1A04D; Tue, 4 Oct 2022 11:34:57 -0700 (PDT) Received: by mail-oi1-f174.google.com with SMTP id q10so15282835oib.5; Tue, 04 Oct 2022 11:34:57 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=zTLXNMpDg1+UniIzyXYCxtdL8YDiQl3tzokRAsSfSdQ=; b=3Q0JsYsPPoL4VrDxda7k6M9I+cQm1M6MbuNTG7FeO/XhxbOataZkDRihI/AtPow1v6 w4uU07OwxXvMFeu6yvDmaTdMKQfgU4UkOFEmtetXB3m41neLLtnkAIyMvmgRcJ32GYyJ yysgDPhWm/WwSwsNDF9aNPQDHNA+JgGJYMqI4h7TqGNwajcMtPQyst16FeOg96a7uL2u Lr4nsf+tiNqddR0wto1ld9Cs289x7hn3dfZR+dspQPChwSX6Ax/HxhlXHHezklDKTjtu uc6c2wF6oZSI6m1QlnDi6wntF7FSh0Qq/n+ZjWBm/D6MB2767nnVEVCYhR1wBF0BbpOd ry4g== X-Gm-Message-State: ACrzQf2IUnSXpgvMxMSuK7Xcto5HQRkyad4N7BqbIKnJxi/5SKTcvXvz GYuPen18+ZdljroNT61JWVByd2RNd3niaTGiPMOnECuh X-Received: by 2002:a05:6808:1a09:b0:350:107b:f89a with SMTP id bk9-20020a0568081a0900b00350107bf89amr532277oib.218.1664908497053; Tue, 04 Oct 2022 11:34:57 -0700 (PDT) MIME-Version: 1.0 References: <20220930120939.353315-1-leo.yan@linaro.org> In-Reply-To: From: Namhyung Kim Date: Tue, 4 Oct 2022 11:34:45 -0700 Message-ID: Subject: Re: [PATCH v4] perf test: Introduce script for data symbol testing To: Ravi Bangoria Cc: Leo Yan , Arnaldo Carvalho de Melo , Peter Zijlstra , Ingo Molnar , Mark Rutland , Alexander Shishkin , Jiri Olsa , linux-kernel , linux-perf-users Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no 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 Fri, Sep 30, 2022 at 10:13 PM Ravi Bangoria wrote: > > >> +# perf mem/c2c internally uses IBS PMU on AMD CPU which doesn't support > >> +# user/kernel filtering and per-process monitoring, spin program on > >> +# specific CPU and test in per-CPU mode. > >> +is_amd=$(egrep -c 'vendor_id.*AuthenticAMD' /proc/cpuinfo) > >> +if (($is_amd >= 1)); then > >> + perf mem record -o ${PERF_DATA} -- -C 0 -- taskset -c 0 $TEST_PROGRAM & > > > > I'm curious why it has "--" before "-C 0".. > > IIRC, any command line options placed after -- will be carry forwarded > as is to perf record. > > perf mem record [options] does not support -C option. Which means -C 0 > will be ignored if user run `perf mem record -C 0`. Ex: > > $ sudo ./perf --debug perf-event-open mem record -C 0 > [...] > sys_perf_event_open: pid -1 cpu 0 group_fd -1 flags 0 = 5 > sys_perf_event_open: pid -1 cpu 1 group_fd -1 flags 0 = 6 > sys_perf_event_open: pid -1 cpu 2 group_fd -1 flags 0 = 7 > sys_perf_event_open: pid -1 cpu 3 group_fd -1 flags 0 = 8 > > OTOH, if I place -C 0 after -- then perf opens event only on cpu0: > > $ sudo ./perf --debug perf-event-open mem record -- -C 0 > [...] > sys_perf_event_open: pid -1 cpu 0 group_fd -1 flags 0 = 7 > > Now, perf mem [options] supports -C options but I don't know why > it's not working for me: Thanks for checking this! It seems -C works only for perf mem report and eats it for record. I think we need to fix the option handling. Thanks, Namhyung > > $ sudo ./perf --debug perf-event-open mem -C 0 record > [...] > sys_perf_event_open: pid -1 cpu 0 group_fd -1 flags 0 = 5 > sys_perf_event_open: pid -1 cpu 1 group_fd -1 flags 0 = 6 > sys_perf_event_open: pid -1 cpu 2 group_fd -1 flags 0 = 7 > sys_perf_event_open: pid -1 cpu 3 group_fd -1 flags 0 = 8 > > Thanks, > Ravi