Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6499882yba; Wed, 1 May 2019 13:38:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqxaz/jILN7osjB4mteAroOtAK89hj4r+uBLd1tWjyW8xA6JKxMQWHUy7jFyeRHy9vQzKF0e X-Received: by 2002:a63:a441:: with SMTP id c1mr7208pgp.307.1556743089815; Wed, 01 May 2019 13:38:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556743089; cv=none; d=google.com; s=arc-20160816; b=SGYAFJlsS6ob0QibhZO29k+/KdOvo6meOAKsH+G0bi/uqBuAJ6MrXErkU1gMlh2UCw wU5vy8aMbIpUlkIdy8iCpHutU71iSxqxlU/l5XuvyYNOPG0YWqc3DyJGeT7GCJIq6vds Ex+ZsJ9FPclMu96u16uieBHw8L9PExTH8ls3AvPrGKwbuMEpldtyrS1/Sg3ybpvvUcHR R6ty8IRKeuhVveeMwSlv7Yoa7GUlG148YlXJ8k/qKtHANX4rsqwCKes7C0SiV1mGFWUI MI/UOmdjyl/eI9qKdMV9rLzNvTr1EWL9d/giDjYh8ZCy2r9EowRk9rmq8CC5HO3g5Zkk c4fQ== 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=9hoKklcqwu8/e5MlWrwF49C36jdjucRoYxjO67aKqwM=; b=tgdFKR3w0RsOQiHSvk2Emi3IjZFBc/Bausx/Yi9IPBiAi21FkTl+9uJRdLuJZZ0PDe 9fC2+2pgfw5/vVxKbGTMx2jD9LTaUstxpHD/sTuDtwQBUiLqM3zZstCyr7t34x4P30bf lkv3SRf+RhGz05LiDELD9809rE4OVLXOSjVCsVKobo1YNTSa7X6w6pCVjKyubzx0Ow0b wVFVAU9Ix8oO3hjeaQGnvrmdes32Eo/n4MuJxPuKu8oUyt/gfByqJ+dBvFeqtVfkFPGL CCa/+mY+3DnlQSd2t/aDHCuctrfVgGzTgNm4onX/53JUxwmLkipxcKoO4pbrc53e+fUk 4fyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=nc7sfMAb; 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 j11si27947805pgp.433.2019.05.01.13.37.54; Wed, 01 May 2019 13:38:09 -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=nc7sfMAb; 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 S1726203AbfEAUg6 (ORCPT + 99 others); Wed, 1 May 2019 16:36:58 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:39686 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726115AbfEAUg6 (ORCPT ); Wed, 1 May 2019 16:36:58 -0400 Received: by mail-io1-f68.google.com with SMTP id c3so129975iok.6 for ; Wed, 01 May 2019 13:36:58 -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=9hoKklcqwu8/e5MlWrwF49C36jdjucRoYxjO67aKqwM=; b=nc7sfMAbtwSdpUnNCNPkMOO+dAinjyrQPCn6qQ8tH44HtPBMueTwmlbhPupxyV8V7B XgDWYfBUcL27pML2BsQj1PmFtxgF0MLZMI5q/wUx4mnEatk6qjncije4IPZ6hUtNIY9i 2yshDjDVuuBOIZdCfiuvcS0WWhRoQIFlB++voJDvXw/Al9wtH83WQSk7JnFss60QDRB8 iadHr+KhIblcAjKHJ6wu04uZEQGe8TAFT88EtQzI4cBetWT7gYRHFj4R42aVcH9woScV kUUh7sZGU54d8sCCM8co3lNWS+tyxer36v/9egcIcS3dAt8apGg0RryPawAJT1fyn3F0 W+aw== 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=9hoKklcqwu8/e5MlWrwF49C36jdjucRoYxjO67aKqwM=; b=IoM6TSkL8AvkUUb33qJdJG67hLKOjmyux15b5AOXlPzxkHne7sjzMKdavhgcKIK8ea yzILMN+Tc6iVlDjsl9hTVFaQSYbHnY+0UNSSSX6pjpDOPDZtti/s43BGYKTzPqKTdCGi 2WKNDVlbYprLf6f1YmmQas/MwPI7rqB+VlUlXq9H01lkeR0EAqp0vZGpJt+s/5vehsOw r2Rb0kpJQf9fUUwl3p/EeazAzBy7QqaC0RJ6A6tHfSoWIsbVct/IsfLZcnDcSnx/VZIo 84NOlb4PH08eZ8jJP/J651VGA+E6XIwpjxJt2DU+IpNn6aT2R49P6TSvuaXsBvz/dk8X 5c0w== X-Gm-Message-State: APjAAAVXSx2YwSd7AZ2zMFeiMc2WO/ZCwiA06YIk+3b/Nn0pmNgBtycM dWEG5n+DF3rXu6WOQcIjQA== X-Received: by 2002:a6b:9056:: with SMTP id s83mr832798iod.34.1556743017673; Wed, 01 May 2019 13:36:57 -0700 (PDT) Received: from localhost.localdomain ([92.117.183.162]) by smtp.gmail.com with ESMTPSA id u16sm9323998iol.66.2019.05.01.13.36.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 01 May 2019 13:36:57 -0700 (PDT) From: Viktor Rosendahl To: Steven Rostedt , Ingo Molnar , linux-kernel@vger.kernel.org Cc: Joel Fernandes , Viktor Rosendahl Subject: [PATCH v2 0/4] Some new features for the preempt/irqsoff tracers Date: Wed, 1 May 2019 22:36:46 +0200 Message-Id: <20190501203650.29548-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 v2: - I have tried to improve some of the commit messages by adding additional explanations. - [PATCH 2/4]: We use burst size checking instead of the confusing modulo game. The example given in the Kconfig file is corrected and extended. I was not able to find a way to use the module parameters as trigger, so I have left the sysfs trigger file as is. 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 always work in overwrite mode. [PATCH 1/4] This implement fs notification for preempt/irqsoff. 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 doesn't apply cleanly on its own: [PATCH 4/4] This adds the option CONFIG_TRACE_CONSOLE_LATENCY to decide whether we want to trace prints to the console or not. best regards, Viktor Rosendahl Viktor Rosendahl (4): ftrace: Implement fs notification for preempt/irqsoff tracers 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 include/linux/irqflags.h | 13 + kernel/printk/printk.c | 5 +- kernel/trace/Kconfig | 27 +- kernel/trace/preemptirq_delay_test.c | 145 +++- kernel/trace/trace.c | 31 +- kernel/trace/trace.h | 5 + kernel/trace/trace_irqsoff.c | 35 + tools/Makefile | 14 +- tools/trace/Makefile | 20 + tools/trace/latency-collector.c | 1190 ++++++++++++++++++++++++++ 10 files changed, 1453 insertions(+), 32 deletions(-) create mode 100644 tools/trace/Makefile create mode 100644 tools/trace/latency-collector.c -- 2.17.1