From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lj1-x22b.google.com (mail-lj1-x22b.google.com [IPv6:2a00:1450:4864:20::22b]) by sourceware.org (Postfix) with ESMTPS id B65203853D26 for ; Fri, 30 Jun 2023 08:52:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B65203853D26 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-lj1-x22b.google.com with SMTP id 38308e7fff4ca-2b69f216c73so24717461fa.3 for ; Fri, 30 Jun 2023 01:52:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1688115120; x=1690707120; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=x4zPiTcsunBdRse/39s83BLxMjgBLqKbBNTd2lv7ass=; b=fi8vf7DAx8LfwXq/Hh/tv6tNwgFhPteRL3dUFUKOdJum00OXIos8rUQQVTvJMImOpZ 4LG59XruQvox490rnFtULrc4ZProapHyB3jIfIWIUfF2/99Osjg68zWgbudIbiTHMjzk u7uFPU2nEQMuA6IvgaArCdrJQ4nhl7UxZ4NyExIaydFhtfwtgvfpfv6Z5mx8N/YqhP7R AItQ70b+T8Ew6qkprvSV9scgluS70H3yg5YbOfOkEDrI9VYivLoi9YoL494W5ApZZBEX TdPeh/yIZISQsqjL2uiSqesOGLtj2aF+YXDyYJkFeiApCxxCJ7a3q9QjJon5Pg/SeE5r X0iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688115120; x=1690707120; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x4zPiTcsunBdRse/39s83BLxMjgBLqKbBNTd2lv7ass=; b=QYeQ7aycf1jnd5NwKWox/zsYCNUWSkUqiZ84O/MsGf75lNJ81KQpEzmGzipAVzYICQ hHM16q8qcIuJ97MmebIAatD0B3mrn9bp+Q/bT2T9tIxCSCNjf0nswpHGbW8zbZ0apsQB HVI0PbV2r32cvH6rWKFeEPBPPJVezgu+1KVqGFI+OH4eExj6PnaR8JOzRGSoJFMLIFeE 1il5XEJD0rzYEZoBEAVBZEJbVDjHOs7ixvQvVvkS64laJqFasxBWXV9bPH74l5oTl+I/ c55MwSqMIs2tY1EHb2zWeAhFcneAL7ZtH9rZyAmZCRdl55hSk3j9r+vX9TEuXHDTIWVE Cc9Q== X-Gm-Message-State: ABy/qLb6yGhq2kT/XgemyT7DaIGiJhBR0vmBQgT5vF0lRN0Ymp1luKGJ TZ7GshZR3I55zIxuvEaGl4WH3991f3zTxlixAXI= X-Google-Smtp-Source: APBJJlGSVquDweINuifxVETjv9lk56vtHB0L5yQDPkQMcDRxSgURq32YIhpi8dIpnlKqVILs6dL6EpcmMTaf/+TqKWQ= X-Received: by 2002:a2e:97cc:0:b0:2b5:7fd2:ec36 with SMTP id m12-20020a2e97cc000000b002b57fd2ec36mr1736952ljj.21.1688115119937; Fri, 30 Jun 2023 01:51:59 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Richard Biener Date: Fri, 30 Jun 2023 10:51:47 +0200 Message-ID: Subject: Re: [PATCH] Collect both user and kernel events for autofdo tests and autoprofiledbootstrap To: Eugene Rozenfeld Cc: "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,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 server2.sourceware.org List-Id: On Fri, Jun 30, 2023 at 7:28=E2=80=AFAM Eugene Rozenfeld via Gcc-patches wrote: > > When we collect just user events for autofdo with lbr we get some events = where branch > sources are kernel addresses and branch targets are user addresses. Witho= ut kernel MMAP > events create_gcov can't make sense of kernel addresses. Currently create= _gcov fails if > it can't map at least 95% of events. We sometimes get below this threshol= d with just > user events. The change is to collect both user events and kernel events. Does this require elevated privileges? Can we instead "fix" create_gcov he= re? > Tested on x86_64-pc-linux-gnu. > > ChangeLog: > > * Makefile.in: Collect both kernel and user events for autofdo > * Makefile.tpl: Collect both kernel and user events for autofdo > > gcc/testsuite/ChangeLog: > > * lib/target-supports.exp: Collect both kernel and user events fo= r autofdo > --- > Makefile.in | 2 +- > Makefile.tpl | 2 +- > gcc/testsuite/lib/target-supports.exp | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/Makefile.in b/Makefile.in > index f19a9db621e..04307ca561b 100644 > --- a/Makefile.in > +++ b/Makefile.in > @@ -404,7 +404,7 @@ MAKEINFO =3D @MAKEINFO@ > EXPECT =3D @EXPECT@ > RUNTEST =3D @RUNTEST@ > > -AUTO_PROFILE =3D gcc-auto-profile -c 10000000 > +AUTO_PROFILE =3D gcc-auto-profile --all -c 10000000 > > # This just becomes part of the MAKEINFO definition passed down to > # sub-makes. It lets flags be given on the command line while still > diff --git a/Makefile.tpl b/Makefile.tpl > index 3a5b7ed3c92..d0fe7e2fb77 100644 > --- a/Makefile.tpl > +++ b/Makefile.tpl > @@ -407,7 +407,7 @@ MAKEINFO =3D @MAKEINFO@ > EXPECT =3D @EXPECT@ > RUNTEST =3D @RUNTEST@ > > -AUTO_PROFILE =3D gcc-auto-profile -c 10000000 > +AUTO_PROFILE =3D gcc-auto-profile --all -c 10000000 > > # This just becomes part of the MAKEINFO definition passed down to > # sub-makes. It lets flags be given on the command line while still > diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/ta= rget-supports.exp > index 4d04df2a709..b16853d76df 100644 > --- a/gcc/testsuite/lib/target-supports.exp > +++ b/gcc/testsuite/lib/target-supports.exp > @@ -704,7 +704,7 @@ proc check_effective_target_keeps_null_pointer_checks= { } { > # this allows parallelism of 16 and higher of parallel gcc-auto-profile > proc profopt-perf-wrapper { } { > global srcdir > - return "$srcdir/../config/i386/gcc-auto-profile -m8 " > + return "$srcdir/../config/i386/gcc-auto-profile --all -m8 " > } > > # Return true if profiling is supported on the target. > -- > 2.25.1 >