From patchwork Mon Nov 28 22:35:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 84467 Delivered-To: patches@linaro.org Received: by 10.140.20.101 with SMTP id 92csp1348557qgi; Mon, 28 Nov 2016 14:35:33 -0800 (PST) X-Received: by 10.99.125.65 with SMTP id m1mr44560707pgn.159.1480372533213; Mon, 28 Nov 2016 14:35:33 -0800 (PST) Return-Path: Received: from mail-pg0-x22c.google.com (mail-pg0-x22c.google.com. [2607:f8b0:400e:c05::22c]) by mx.google.com with ESMTPS id d10si28228002plj.180.2016.11.28.14.35.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 28 Nov 2016 14:35:33 -0800 (PST) Received-SPF: pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c05::22c as permitted sender) client-ip=2607:f8b0:400e:c05::22c; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of john.stultz@linaro.org designates 2607:f8b0:400e:c05::22c as permitted sender) smtp.mailfrom=john.stultz@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-pg0-x22c.google.com with SMTP id p66so61511662pga.2 for ; Mon, 28 Nov 2016 14:35:33 -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:in-reply-to:references; bh=yjBy6hceFmPVvXF3nK9HbLUspZvwFwaAMz0xcqzjRWI=; b=bZu9+5kObFjfVGRqHhbuiSk3q+4EKwOcFZSGznPOJhdMZwN/UAyldiPACYMWHxV6BU 0UCwRiMvqyYpW419KfZarody8ffTkpKEsE6lIZej2DrE7zplgWwE+/RRakBCCa58S0e5 hNZdi2xIItL4powtho+OuVhGNiqdXTPFTGNMk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=yjBy6hceFmPVvXF3nK9HbLUspZvwFwaAMz0xcqzjRWI=; b=EJkYFWKgrUUzN21IfIqNUDIx/OQXUYf4Z2/deER/nOqSWvd+1vnlonitoVTNzZetAO xuAb4plFxZyeEY5BdyNbFRcnMv1E9mk9b/yR19GI6simbxpqZB/1MOnQ15lqlW1qr5F8 /eOIfyYQNzk8MvAVH+LuctZmcWT/dvgAu4DeREN/5xJ4qbYHPpfDp/3mtCqMgPfsG7yA U1W77yYFvgRklsT6CwJtmKFWJ5sfY6ggtQ7WTGFNw5xN5Sk+REm4nUhqpfJC0UDVFPQ1 gaizdUvB3gI0xCBrpHPd3J/8BHQ0ISBQjrTNOsRlE2cpJweOogV193ngJ/0NysrMfa5J 7rrg== X-Gm-Message-State: AKaTC01+E8uWSJl/ewAD/rQNPUudxt7b9plMdIwcbP3NzKzDWm/+uh/R+kjR1IF3jTK291JwIVU= X-Received: by 10.84.216.6 with SMTP id m6mr55142289pli.130.1480372532961; Mon, 28 Nov 2016 14:35:32 -0800 (PST) Return-Path: Received: from localhost.localdomain ([2601:1c2:1002:83f0:4e72:b9ff:fe99:466a]) by smtp.gmail.com with ESMTPSA id r74sm89537352pfl.79.2016.11.28.14.35.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 28 Nov 2016 14:35:32 -0800 (PST) From: John Stultz To: lkml Cc: Joel Fernandes , Steven Rostedt , Thomas Gleixner , Ingo Molnar , Richard Cochran , Prarit Bhargava , John Stultz Subject: [PATCH 6/7] trace: Add an option for boot clock as trace clock Date: Mon, 28 Nov 2016 14:35:23 -0800 Message-Id: <1480372524-15181-7-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1480372524-15181-1-git-send-email-john.stultz@linaro.org> References: <1480372524-15181-1-git-send-email-john.stultz@linaro.org> From: Joel Fernandes Unlike monotonic clock, boot clock as a trace clock will account for time spent in suspend useful for tracing suspend/resume. This uses earlier introduced infrastructure for using the fast boot clock. Cc: Steven Rostedt Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Richard Cochran Cc: Prarit Bhargava Reviewed-by: Thomas Gleixner Signed-off-by: Joel Fernandes Signed-off-by: John Stultz --- kernel/trace/trace.c | 1 + 1 file changed, 1 insertion(+) -- 2.7.4 Acked-by: Steven Rostedt diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 8696ce6..f7b64db 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -1125,6 +1125,7 @@ static struct { { trace_clock, "perf", 1 }, { ktime_get_mono_fast_ns, "mono", 1 }, { ktime_get_raw_fast_ns, "mono_raw", 1 }, + { ktime_get_boot_fast_ns, "boot", 1 }, ARCH_TRACE_CLOCKS };