From patchwork Fri Nov 30 15:09:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 152547 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp3770181ljp; Fri, 30 Nov 2018 07:09:46 -0800 (PST) X-Google-Smtp-Source: AFSGD/VYEOQUdpfbyz3r1zWpFr/ggei9BytK62RVeMVtgX03OJ/TaZXGO4cOFGZt5yHOOxnHKj2C X-Received: by 2002:a62:68c5:: with SMTP id d188mr6164419pfc.194.1543590586027; Fri, 30 Nov 2018 07:09:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543590586; cv=none; d=google.com; s=arc-20160816; b=yXBVxs5BhixHpbol368oTSH3xGV003wvvRUTLEnUmpDq38ZMtkHgHemfSEO0vKCEdg 2wDUoq0tb9STUrmA5sJ3xVotOec6Dfo9k6zsB+M9p13Gmc1VgR1APZpUJqltD6VJoYxE YePIDC3+6ZPBMA7mr0q8sJpib2jyu9laly6WU4bBVk9Fyj9dWEvlb+tuCDukLmZhMqt0 BucJwvDEhUwN2VY2rW0Jw5YyseP6l7srQB/l3CMLLnU2QKSyCcfbnIuTO60JEv17qxNP jHQDtUqplk96LK5+BPjz780mYViZ9KzybquAHOASDrk5C8sAOXO+z7KiomjFBLmw+pJ0 dbsQ== 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=85KCfW3nCq0jcrH/zFnUuLUEVTX2XkKXX7xHs/xruHs=; b=wJy7f2tfLjksqD+iypYYPwY5FdWBygbbGDWJgzjdi6Y49wCgQOtDbhOa0SN3Zeztkq Y7ILgefoNmrYA5daJFwmQ9lPbSA/i4CfAqcB1rGQnSmvFovhmCSpoSWCZvYpzZR9XVdz J/a35x8EoBmZo4783mfkRD/yC4QlyluWK/92WNb++uO26XYjyEc8ZkIN6UkjOI1jy1By cs43aoKbj8W8cky5xnfpbLazJZvbkY4CzrpuUADBytrGa8rp24GjGYrvHbeprzCDNTj/ x0836jKm+iP3FGboTc9PD/fxBBvg/lMmsy6sqbZNOVUfpJgIdZVHoXoZAwSzhV/65v2D kvtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=WNS16U3T; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a3si6038804pld.252.2018.11.30.07.09.45; Fri, 30 Nov 2018 07:09:46 -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=@linaro.org header.s=google header.b=WNS16U3T; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727133AbeLACTU (ORCPT + 32 others); Fri, 30 Nov 2018 21:19:20 -0500 Received: from mail-lj1-f195.google.com ([209.85.208.195]:39790 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726609AbeLACTT (ORCPT ); Fri, 30 Nov 2018 21:19:19 -0500 Received: by mail-lj1-f195.google.com with SMTP id t9-v6so5270247ljh.6 for ; Fri, 30 Nov 2018 07:09:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=85KCfW3nCq0jcrH/zFnUuLUEVTX2XkKXX7xHs/xruHs=; b=WNS16U3TAIi5WGm5/3zTJ2oj/8f7Bw4KwTRN0E//6gsK3l1u34sRnv6d5ZG5z5zWQ7 PcZ0kyC6Szpe2UqHpD/LQk4EH5yKVxrozSKWpPRqkjoH8OkCZzyBcQSUUm/zNktPBV3V MTh5lTnssACP+mGsV8MK2EJAH5IBj+JFqmSg0= 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=85KCfW3nCq0jcrH/zFnUuLUEVTX2XkKXX7xHs/xruHs=; b=sYWyLdqTNbPUPYh3IC/n8eFjlzOCXYFm9FyjK1koqN/U51Is90FXUNDzGmjJ5jqhF7 6Tp5l25Fzeb++OMNSNdFxoEV3j58PHZx5OaF9E7LZ6j/glATOX7GxNFka6l78DJvrKkL LYXaM3EkXNMENkPLWXapRPQSvF4vZCuK7E/9B8IjkOcDjpshY0akEGeV+o9/ui/TujCI meqYWU0KBB7uIHP2tsxfTzCpF4ZETBGVeJ9zhskpCAzc2Z5lnhZK93S+Qk7qAOe6q/GK AHnrwcjAIOJtpuKzRxxPimbhg4jZmCWeCT9Kt+ewTLzqnCP5ejk6RvK6vW8sS6Ddgd3C x5Qw== X-Gm-Message-State: AA+aEWaj2XUUid9f9Qf94hcBymAeVDNf3/Rg2HdzBTBiJe8uGdF2C8CF JHoOBFBHTmvGKusSCrdEsQL+MA== X-Received: by 2002:a2e:9ad0:: with SMTP id p16-v6mr4448681ljj.102.1543590581488; Fri, 30 Nov 2018 07:09:41 -0800 (PST) Received: from localhost (c-732171d5.07-21-73746f28.bbcust.telenor.se. [213.113.33.115]) by smtp.gmail.com with ESMTPSA id m13-v6sm858237ljg.56.2018.11.30.07.09.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 30 Nov 2018 07:09:40 -0800 (PST) From: Anders Roxell To: rostedt@goodmis.org, mingo@redhat.com Cc: keescook@chromium.org, catalin.marinas@arm.com, will.deacon@arm.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Anders Roxell , Arnd Bergmann Subject: [PATCH 2/3] tracing: instruct KCOV not to track tracing files Date: Fri, 30 Nov 2018 16:09:35 +0100 Message-Id: <20181130150935.27493-1-anders.roxell@linaro.org> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When we have KCOV enabled and running ftrace startup tests we end up in a softlockup. Kcov and ftrace tracing each other makes it really slow: [ 275.141388] Testing tracer wakeup_dl: PASSED [ 304.738345] Testing tracer function_graph: [ 716.236822] watchdog: BUG: soft lockup - CPU#0 stuck for 21s! [ksoftirqd/0:9] Rework so that we don't let KCOV look at tracing files. Could probably be more selective here, but in in general letting KCOV and ftrace check each isn't the best idea. Co-developed-by: Arnd Bergmann Signed-off-by: Arnd Bergmann Signed-off-by: Anders Roxell --- kernel/trace/Makefile | 5 +++++ 1 file changed, 5 insertions(+) -- 2.19.2 Acked-by: Steven Rostedt (VMware) diff --git a/kernel/trace/Makefile b/kernel/trace/Makefile index f81dadbc7c4a..c7c73b976103 100644 --- a/kernel/trace/Makefile +++ b/kernel/trace/Makefile @@ -6,6 +6,11 @@ ifdef CONFIG_FUNCTION_TRACER ORIG_CFLAGS := $(KBUILD_CFLAGS) KBUILD_CFLAGS = $(subst $(CC_FLAGS_FTRACE),,$(ORIG_CFLAGS)) +# If instrumentation of this dir is enabled, the function tracer gets really +# slow. Probably could be more selective here, but note that files related +# to tracing.shouldn't be traced anyway. +KCOV_INSTRUMENT := n + ifdef CONFIG_FTRACE_SELFTEST # selftest needs instrumentation CFLAGS_trace_selftest_dynamic.o = $(CC_FLAGS_FTRACE)