Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp16994920ybl; Wed, 1 Jan 2020 19:11:24 -0800 (PST) X-Google-Smtp-Source: APXvYqySivdKYSnC7OyQKCUIy2u/uVXjPUopkCybkNgOeuPrSWv5e+IjZ+VG6tlI2SXLKyXBck04 X-Received: by 2002:a9d:4706:: with SMTP id a6mr83469823otf.331.1577934684353; Wed, 01 Jan 2020 19:11:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577934684; cv=none; d=google.com; s=arc-20160816; b=XXY535kpEPihqDgt0jh+hUxNa2X/z0cHJ4Myn60/USicVDKvkqLGBW+mTguCcVxvQD slVPOstzK+0pkNyK+Xzm5ochD1lVIF7sF5TzwEsETRGW7ra5lL72+o9jhQ90l4sdAUPJ rfFh8xdECiLoRDoSC/6fgvOONwd8MrQ65GJY7ISvlDtUeoRXtlvy0N5tTpCOwOdEttiG M+4O4QltUa8HZMJVZYNuV6Fj+nfQyiyzg7JnWKnmI7IhNi9T+QlXAo5Hx3EUzGLp/yZA nKtAPxncpcYlneEAynlmmnegz3BZaxaENFR5Hyaeg160h5Nbgegr52imXiyIRpvuB8mo n2wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=i3ZeFLW0tZfqHlZISm5iQNQKhwN5szM40SC3+DB7Jec=; b=tXsxpFMNg8l6KB2Yx9a5tfHZYFzvZeDvSzYY5yi3bM69RHAEbA1H8z3y9NcPsMd0B+ 4Do9U7LmESXRknzor8IVDiFIIxL2oALfkOlanLT9LdyPOBRnuLaEgdgQTqO1Zw6pcde0 1kNadzh3MUoEG+FoT7DHutpFEf/nU0YNxABtxH8b6RP+zwT4r53v3VRQIh3iIOTk1r/+ GJr89Bnfg6xo7K+99Uai1G0IE59nmFTVis45s38MHClWxMPCv/N/uMF8f8XpRjrtdIT1 GglrtaqT4cHMgd+KCAOAxmPztEqODa4OlSSyr7/HQo4IiHMG9pwjRpKWeMaKbmPjMX7m Nwaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=Vi6uFeK8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v6si27483898ota.19.2020.01.01.19.11.12; Wed, 01 Jan 2020 19:11:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=Vi6uFeK8; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727604AbgABDKP (ORCPT + 99 others); Wed, 1 Jan 2020 22:10:15 -0500 Received: from mail-pl1-f194.google.com ([209.85.214.194]:39354 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727591AbgABDKP (ORCPT ); Wed, 1 Jan 2020 22:10:15 -0500 Received: by mail-pl1-f194.google.com with SMTP id g6so14346155plp.6 for ; Wed, 01 Jan 2020 19:10:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=i3ZeFLW0tZfqHlZISm5iQNQKhwN5szM40SC3+DB7Jec=; b=Vi6uFeK8FQWUpxh9kg+TRm+rbSbuHhbmk1YAT+cd52UcYzvsmrZ4GP4Q+iXx/+ldGu GbwH1UiGd0FdOoOGsVNn0BtoWIJRdm8OGWDbrjqbD7hAZ6d/dpy7pauLt2E6Qjc+NdLM tUuercAKxUjqHbyY+vqAijC3hOLEGrrwfuGQ8aW9dSNUw+j/Xx8RHX0T/YChcH9rX8XI qRoIXCaB1kdarijD5CqXfyhZfESddv2UA3Yk7legVOaMGMAJrNWhbmH0QW3kqx2Sc/XS xQLqrlvoCKY90UGMZPbHw/fBPqyGuwLse8b66izIFK4Izf5MkUE4onLL2qm6S2dq8U9j b+Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=i3ZeFLW0tZfqHlZISm5iQNQKhwN5szM40SC3+DB7Jec=; b=s8Fyo5p4aNp66ePC3W1Lym8XfvYFoVacIfyCi/H4fmNwLbW34wn8spFI+S81sAGypx HMjVFqm5itBe7foKAmVzDSQLWNpY9yeJxNC3Xgphb3/yxG3sZjf6yKlhzbjFOS5VH13Z oAZkgnfKwLsjJdp17kix7D/WnTuczAVibD5i2R8rE34O7kMUuDCVTIB/8HQ34CNWE8OU H72Vp8su4We0CSAh8WEOkajYTjWfeP1776rQtlS/wiz5jxvS8mntB0rb4SX2iQT6NtiS W69K1w9rL+ozq5kwJRBiKFOAT5k3lrpiuWC1fIXHK+pnfcIKDS/SiCTrHkJRC5d95iuv HDZA== X-Gm-Message-State: APjAAAXqNCYTYyAJqIKfIBSchmseXSxBSC/szWcH/0PCBWuqbKozBBwW J+LBF3cOE5imxUBEpSnlIbSo7w== X-Received: by 2002:a17:90a:1a0d:: with SMTP id 13mr17092503pjk.129.1577934614654; Wed, 01 Jan 2020 19:10:14 -0800 (PST) Received: from hsinchu02.internal.sifive.com (220-132-236-182.HINET-IP.hinet.net. [220.132.236.182]) by smtp.gmail.com with ESMTPSA id r2sm56108919pgv.16.2020.01.01.19.10.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jan 2020 19:10:14 -0800 (PST) From: Zong Li To: corbet@lwn.net, paul.walmsley@sifive.com, palmer@dabbelt.com, aou@eecs.berkeley.edu, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Cc: Zong Li Subject: [PATCH] riscv: gcov: enable gcov for RISC-V Date: Thu, 2 Jan 2020 11:09:54 +0800 Message-Id: <20200102030954.41225-1-zong.li@sifive.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch enables GCOV code coverage measurement on RISC-V. Lightly tested on QEMU and Hifive Unleashed board, seems to work as expected. Signed-off-by: Zong Li --- Documentation/features/debug/gcov-profile-all/arch-support.txt | 2 +- arch/riscv/Kconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Documentation/features/debug/gcov-profile-all/arch-support.txt b/Documentation/features/debug/gcov-profile-all/arch-support.txt index 059d58a549c7..6fb2b0671994 100644 --- a/Documentation/features/debug/gcov-profile-all/arch-support.txt +++ b/Documentation/features/debug/gcov-profile-all/arch-support.txt @@ -23,7 +23,7 @@ | openrisc: | TODO | | parisc: | TODO | | powerpc: | ok | - | riscv: | TODO | + | riscv: | ok | | s390: | ok | | sh: | ok | | sparc: | TODO | diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig index d8efbaa78d67..a31169b02ec0 100644 --- a/arch/riscv/Kconfig +++ b/arch/riscv/Kconfig @@ -64,6 +64,7 @@ config RISCV select SPARSEMEM_STATIC if 32BIT select ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT if MMU select HAVE_ARCH_MMAP_RND_BITS if MMU + select ARCH_HAS_GCOV_PROFILE_ALL config ARCH_MMAP_RND_BITS_MIN default 18 if 64BIT -- 2.24.1