Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5790608ybp; Tue, 15 Oct 2019 05:12:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqzPr5PtPRE6CwbsuoTMkX5QTWrBYiYBwLo2cQqINRXwD+lGDniLn6FLoNuagAvCLJQ11Rim X-Received: by 2002:a17:906:2ada:: with SMTP id m26mr33558745eje.87.1571141562036; Tue, 15 Oct 2019 05:12:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571141562; cv=none; d=google.com; s=arc-20160816; b=Jxs2+aOcvpbXfbCWRFVo9dl6RDA+D2wacOQ0cTsuMkjPZJilJU9qhZMscIt5+pYyr7 iz5uCdLs5RBArG6xPgqE7dBUAopsH3lL6cwmrsolB4DykblgbNq+c+q/cv/TEqaL006/ QAJTHsojIaegyMu3J3yx09dpggjn4bTM+UKXktmx0TU/+I/HhuUMP4WDWVlqAR/cAWnU BusTPehN7Nl/eyMTQh0sEKa5oFvtCD4RQExhCHk0qVoKEzWSg8PTBZ0LHW4CJZDsZfqR 2dVXEUf1AKFh4VqzeHyqfUCZKC44N4ZuIwCkH0mip5gh/yCcyJYwu15+pCF3npKVvV4n D+UQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=LQfssd5nXxyv61l5qUfqbKthqcXNcPFHlDg2/hu8FbQ=; b=veIGfiYfoB7Rp2MU1mfdL6sEs0quVWibJCXnzBhyiaa8BJd7/X6iCymrMCZ81u4CO6 4E0DhNOmj53zbAtYP3XFT+a9iv8oUaLcZP51do7UiuKs/yTqr9AQg3G6ogI0gzKfpJi9 zEEGZ907RH0xo3lf9jxaeQvPK8uM1lox6SZw0yB5h0nJsx+SINeo5ilgrSDp3ijCwu1P AmX9KgndnrmNu8tXG4BjxfM/Z/IetCePBvoLhXXhx1Y4LBEzgZVpS4qi8biAPJfpKQMX +FD4CNtZc7ZweDyCT6ugI99wL4BMsWdOtZhf2uzPPOWMqNM11AbpfjC0Q/UZ/38hHOb3 lBRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Jtp5tFzi; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j21si13277894edr.376.2019.10.15.05.12.18; Tue, 15 Oct 2019 05:12:42 -0700 (PDT) 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=@gmail.com header.s=20161025 header.b=Jtp5tFzi; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726368AbfJOLTQ (ORCPT + 99 others); Tue, 15 Oct 2019 07:19:16 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:35734 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725812AbfJOLTP (ORCPT ); Tue, 15 Oct 2019 07:19:15 -0400 Received: by mail-wr1-f66.google.com with SMTP id v8so23375711wrt.2 for ; Tue, 15 Oct 2019 04:19:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=LQfssd5nXxyv61l5qUfqbKthqcXNcPFHlDg2/hu8FbQ=; b=Jtp5tFziLnGYeCdbPmXeXUfQo7V9bjCqEwty+MkVWg2BRTEq44H74Ypif8Ocz63a8e w3eFfXHHnc1fdFXiOXIJuu27vMigSIuNyV4h+UnHxa+VeFAZW0p5chJqUx93JewVbibq ED9+86m4ofovwU6OKHuCauQeYQaA3+cCfKvhcp5dxwWutlgk1Wy/mYqwkalsnoLlMeQw Ew7GuNGdK9M6BPNDHUbrrF5M6RBFdYPwgVsH8yRlISJFwXQJPswSXLOrB0vhyve7nWtL xhWOeMLqj/nnzf6X4ihhWNWxjVG6DvyvKUCT6/shDvnFP/n9EwfstvgPfRVR0jtmCzkJ 9DOA== 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; bh=LQfssd5nXxyv61l5qUfqbKthqcXNcPFHlDg2/hu8FbQ=; b=K6TMbhemiWcz1WSue9KwiSjwKqr8Dn96Wbxv6FUHUTypBfX4MStFtgIFtJjlUx2NkB UeRKU0o1TZff0sBai3M0UbsusFj6QSX4JKIoo/FfQ6OAB17VlPRGjORUvmNDttxFDHgf UvHgodYhYiTxUdYJEytsNCKj5XoPi5AXk9hFgLQflhwcIVavuOADauQfUlvO8JWqMNb4 EBhp6dZ1SaX7vJo1U3tjZgNfVIPHxtwR0lajQIp9uORPGDpwRw85HpKSfvUu3AFE4wje RbUK/wH8B9hDCOinemvvlzZsSTR3MF+6Rfv2SSaz1zlJMTzPWPu+1O6Xo4BNNmnlkHTz pmGA== X-Gm-Message-State: APjAAAUtZlJVdyMvkM72/Q97Q0iVagQ5wKyjZv5svFnG9bWrytNDEv+y IVMpTb9yrKtJsS9B6Bc/dg== X-Received: by 2002:a5d:5591:: with SMTP id i17mr16921794wrv.352.1571138353912; Tue, 15 Oct 2019 04:19:13 -0700 (PDT) Received: from buster-jangle.bmw-carit.intra ([212.118.206.70]) by smtp.gmail.com with ESMTPSA id l9sm18487303wme.45.2019.10.15.04.19.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Oct 2019 04:19:13 -0700 (PDT) From: "Viktor Rosendahl (BMW)" To: Steven Rostedt , Ingo Molnar , linux-kernel@vger.kernel.org Cc: Joel Fernandes , "Viktor Rosendahl (BMW)" Subject: [PATCH v9 0/4] Some new features for the preempt/irqsoff tracers Date: Tue, 15 Oct 2019 13:19:06 +0200 Message-Id: <20191015111910.4496-1-viktor.rosendahl@gmail.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello all, Changes in v9: - [PATCH 1/4]: * Rebased the patch for v5.4-rc3+ * Dropped support for the hwlat tracer. It seems to me, both from testing and looking at the code, that hwlat doesn't actually update /sys/kernel/debug/tracing/tracing_max_latency. I think it would be a bit weird to send fsnotify for changes to a file that are not visible to userspace. Also, the hwlat use case is not very interesting from my perspective because hwlat works in non-overwrite mode by default. For me, the effort needed to make it work properly would be more than what it's worth. * Because of the changes mentioned above, I removed the Reviewed-by tag. - [PATCH 2/4]: * No change. - [PATCH 3/4]: * Removed the mention of hwlat from the commit and help messages. - [PACTH 4/4]: * Changed the trace-option to a kernel parameter. This would hopefully make it easier to remove it if it becomes obsolete. This series is meant to address two issues with the latency tracing. The first three patches provide a method to trace latencies that always occurs very close to each other and to differentiate between them, in spite of the fact that the latency tracers work in overwrite mode. [PATCH 1/4] This implement fs notification for tracing_max_latency. It makes it possible for userspace to detect when a new latency has been detected. [PATCH 2/4] This extends the preemptirq_delay_test module so that it can be used to generate a burst of closely occurring latencies. [PATCH 3/4] This adds a user space program to the tools directory that utilizes the fs notification feature and a randomized algorithm to print out any of the latencies in a burst with approximately equal probability. The last patch is not directly connected but earlier it didn't apply cleanly on its own. However, now it does, so in principle it could be applied separately from the others. [PATCH 4/4] This adds the option console-latency to the trace options. This makes it possible to enable tracing of console latencies. best regards, Viktor Viktor Rosendahl (BMW) (4): ftrace: Implement fs notification for tracing_max_latency preemptirq_delay_test: Add the burst feature and a sysfs trigger Add the latency-collector to tools ftrace: Add an option for tracing console latencies .../admin-guide/kernel-parameters.txt | 4 + include/linux/irqflags.h | 22 + kernel/printk/printk.c | 6 +- kernel/trace/Kconfig | 6 +- kernel/trace/preemptirq_delay_test.c | 144 +- kernel/trace/trace.c | 75 +- kernel/trace/trace.h | 18 + kernel/trace/trace_irqsoff.c | 32 + tools/Makefile | 14 +- tools/trace/Makefile | 20 + tools/trace/latency-collector.c | 1212 +++++++++++++++++ 11 files changed, 1521 insertions(+), 32 deletions(-) create mode 100644 tools/trace/Makefile create mode 100644 tools/trace/latency-collector.c -- 2.17.1