Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
From: simon.marchi@polymtl.ca (Simon Marchi)
Subject: [lttng-dev] [PATCH] Update regmap instrumentation for Linux 3.19.4 and 4.0
Date: Thu, 16 Apr 2015 16:45:09 -0400	[thread overview]
Message-ID: <1429217109-8983-1-git-send-email-simon.marchi@polymtl.ca> (raw)

This is necessary after commit c6b570d97c0e77f570bb6b2ed30d372b2b1e9aae in the kernel.

Signed-off-by: Simon Marchi <simon.marchi at polymtl.ca>
---
 instrumentation/events/lttng-module/regmap.h | 123 +++++++++++++++++++++++++--
 1 file changed, 116 insertions(+), 7 deletions(-)

diff --git a/instrumentation/events/lttng-module/regmap.h b/instrumentation/events/lttng-module/regmap.h
index eef3c6c..7edc575 100644
--- a/instrumentation/events/lttng-module/regmap.h
+++ b/instrumentation/events/lttng-module/regmap.h
@@ -31,13 +31,29 @@ LTTNG_TRACEPOINT_EVENT_CLASS(regmap_reg,
 	)
 )
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,4))
+LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_reg, regmap_reg_write,
+
+	TP_PROTO(struct regmap *map, unsigned int reg,
+		 unsigned int val),
+
+	TP_ARGS(map, reg, val)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_reg, regmap_reg_read,
+
+	TP_PROTO(struct regmap *map, unsigned int reg,
+		 unsigned int val),
+
+	TP_ARGS(map, reg, val)
+)
+#else
 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_reg, regmap_reg_write,
 
 	TP_PROTO(struct device *dev, unsigned int reg,
 		 unsigned int val),
 
 	TP_ARGS(dev, reg, val)
-
 )
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_reg, regmap_reg_read,
@@ -46,20 +62,69 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_reg, regmap_reg_read,
 		 unsigned int val),
 
 	TP_ARGS(dev, reg, val)
-
 )
+#endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,4))
+LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_reg, regmap_reg_read_cache,
+
+	TP_PROTO(struct regmap *map, unsigned int reg,
+		 unsigned int val),
+
+	TP_ARGS(map, reg, val)
+)
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,3,0))
 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_reg, regmap_reg_read_cache,
 
 	TP_PROTO(struct device *dev, unsigned int reg,
 		 unsigned int val),
 
 	TP_ARGS(dev, reg, val)
-
 )
 #endif
 
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,4))
+LTTNG_TRACEPOINT_EVENT_CLASS(regmap_block,
+
+	TP_PROTO(struct device *dev, unsigned int reg, int count),
+
+	TP_ARGS(dev, reg, count),
+
+	TP_FIELDS(
+		ctf_string(name, dev_name(dev))
+		ctf_integer(unsigned int, reg, reg)
+		ctf_integer(int, count, count)
+	)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_block, regmap_hw_read_start,
+
+	TP_PROTO(struct regmap *map, unsigned int reg, int count),
+
+	TP_ARGS(map, reg, count)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_block, regmap_hw_read_done,
+
+	TP_PROTO(struct regmap *map, unsigned int reg, int count),
+
+	TP_ARGS(map, reg, count)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_block, regmap_hw_write_start,
+
+	TP_PROTO(struct regmap *map, unsigned int reg, int count),
+
+	TP_ARGS(map, reg, count)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_block, regmap_hw_write_done,
+
+	TP_PROTO(struct regmap *map, unsigned int reg, int count),
+
+	TP_ARGS(map, reg, count)
+)
+#else
 LTTNG_TRACEPOINT_EVENT_CLASS(regmap_block,
 
 	TP_PROTO(struct device *dev, unsigned int reg, int count),
@@ -100,7 +165,25 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_block, regmap_hw_write_done,
 
 	TP_ARGS(dev, reg, count)
 )
+#endif
+
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,4))
+LTTNG_TRACEPOINT_EVENT_MAP(regcache_sync,
 
+	regmap_regcache_sync,
+
+	TP_PROTO(struct regmap *map, const char *type,
+		 const char *status),
+
+	TP_ARGS(map, type, status),
+
+	TP_FIELDS(
+		ctf_string(name, regmap_name(map))
+		ctf_string(status, status)
+		ctf_string(type, type)
+	)
+)
+#else
 LTTNG_TRACEPOINT_EVENT_MAP(regcache_sync,
 
 	regmap_regcache_sync,
@@ -116,8 +199,36 @@ LTTNG_TRACEPOINT_EVENT_MAP(regcache_sync,
 		ctf_string(type, type)
 	)
 )
+#endif
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,19,4))
+LTTNG_TRACEPOINT_EVENT_CLASS(regmap_bool,
+
+	TP_PROTO(struct regmap *map, bool flag),
+
+	TP_ARGS(map, flag),
+
+	TP_FIELDS(
+		ctf_string(name, regmap_name(map))
+		ctf_integer(int, flag, flag)
+	)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_bool, regmap_cache_only,
+
+	TP_PROTO(struct regmap *map, bool flag),
+
+	TP_ARGS(map, flag)
+)
+
+LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_bool, regmap_cache_bypass,
+
+	TP_PROTO(struct regmap *map, bool flag),
+
+	TP_ARGS(map, flag)
+
+)
+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0))
 LTTNG_TRACEPOINT_EVENT_CLASS(regmap_bool,
 
 	TP_PROTO(struct device *dev, bool flag),
@@ -135,7 +246,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_bool, regmap_cache_only,
 	TP_PROTO(struct device *dev, bool flag),
 
 	TP_ARGS(dev, flag)
-
 )
 
 LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_bool, regmap_cache_bypass,
@@ -143,7 +253,6 @@ LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_bool, regmap_cache_bypass,
 	TP_PROTO(struct device *dev, bool flag),
 
 	TP_ARGS(dev, flag)
-
 )
 #endif
 
-- 
2.3.5




                 reply	other threads:[~2015-04-16 20:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1429217109-8983-1-git-send-email-simon.marchi@polymtl.ca \
    --to=simon.marchi@polymtl.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox