X-Git-Url: http://git.liburcu.org/?a=blobdiff_plain;f=instrumentation%2Fevents%2Flttng-module%2Fregmap.h;h=8af4d5aed533c376f0d420a156beb0101c28a2f6;hb=3b4aafcbbef722c5d04f2fe06a47c47d4d23eda0;hp=87df6a6dc161dd708b1028bb837f03236fafdc9a;hpb=3bc29f0a41b3c803245b845db2e1909042e72e9c;p=lttng-modules.git diff --git a/instrumentation/events/lttng-module/regmap.h b/instrumentation/events/lttng-module/regmap.h index 87df6a6d..8af4d5ae 100644 --- a/instrumentation/events/lttng-module/regmap.h +++ b/instrumentation/events/lttng-module/regmap.h @@ -1,10 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ #undef TRACE_SYSTEM #define TRACE_SYSTEM regmap #if !defined(LTTNG_TRACE_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ) #define LTTNG_TRACE_REGMAP_H -#include "../../../probes/lttng-tracepoint-event.h" +#include #include #include @@ -19,170 +20,126 @@ struct regmap; */ LTTNG_TRACEPOINT_EVENT_CLASS(regmap_reg, - TP_PROTO(struct device *dev, unsigned int reg, + TP_PROTO(struct regmap *map, unsigned int reg, unsigned int val), - TP_ARGS(dev, reg, val), + TP_ARGS(map, reg, val), - TP_STRUCT__entry( - __string( name, dev_name(dev) ) - __field( unsigned int, reg ) - __field( unsigned int, val ) - ), - - TP_fast_assign( - tp_strcpy(name, dev_name(dev)) - tp_assign(reg, reg) - tp_assign(val, val) - ), - - TP_printk("%s reg=%x val=%x", __get_str(name), - (unsigned int)__entry->reg, - (unsigned int)__entry->val) + TP_FIELDS( + ctf_string(name, regmap_name(map)) + ctf_integer(unsigned int, reg, reg) + ctf_integer(unsigned int, val, val) + ) ) - LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_reg, regmap_reg_write, - TP_PROTO(struct device *dev, unsigned int reg, + TP_PROTO(struct regmap *map, unsigned int reg, unsigned int val), - TP_ARGS(dev, reg, val) - + TP_ARGS(map, reg, val) ) LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_reg, regmap_reg_read, - TP_PROTO(struct device *dev, unsigned int reg, + TP_PROTO(struct regmap *map, unsigned int reg, unsigned int val), - TP_ARGS(dev, reg, val) - + TP_ARGS(map, reg, val) ) -#if (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, + TP_PROTO(struct regmap *map, unsigned int reg, unsigned int val), - TP_ARGS(dev, reg, val) - + TP_ARGS(map, reg, val) ) -#endif LTTNG_TRACEPOINT_EVENT_CLASS(regmap_block, - TP_PROTO(struct device *dev, unsigned int reg, int count), - - TP_ARGS(dev, reg, count), + TP_PROTO(struct regmap *map, unsigned int reg, int count), - TP_STRUCT__entry( - __string( name, dev_name(dev) ) - __field( unsigned int, reg ) - __field( int, count ) - ), + TP_ARGS(map, reg, count), - TP_fast_assign( - tp_strcpy(name, dev_name(dev)) - tp_assign(reg, reg) - tp_assign(count, count) - ), - - TP_printk("%s reg=%x count=%d", __get_str(name), - (unsigned int)__entry->reg, - (int)__entry->count) + TP_FIELDS( + ctf_string(name, regmap_name(map)) + ctf_integer(unsigned int, reg, reg) + ctf_integer(int, count, count) + ) ) LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_block, regmap_hw_read_start, - TP_PROTO(struct device *dev, unsigned int reg, int count), + TP_PROTO(struct regmap *map, unsigned int reg, int count), - TP_ARGS(dev, reg, count) + TP_ARGS(map, reg, count) ) LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_block, regmap_hw_read_done, - TP_PROTO(struct device *dev, unsigned int reg, int count), + TP_PROTO(struct regmap *map, unsigned int reg, int count), - TP_ARGS(dev, reg, count) + TP_ARGS(map, reg, count) ) LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_block, regmap_hw_write_start, - TP_PROTO(struct device *dev, unsigned int reg, int count), + TP_PROTO(struct regmap *map, unsigned int reg, int count), - TP_ARGS(dev, reg, count) + TP_ARGS(map, reg, count) ) LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_block, regmap_hw_write_done, - TP_PROTO(struct device *dev, unsigned int reg, int count), + TP_PROTO(struct regmap *map, unsigned int reg, int count), - TP_ARGS(dev, reg, count) + TP_ARGS(map, reg, count) ) -LTTNG_TRACEPOINT_EVENT(regcache_sync, - - TP_PROTO(struct device *dev, const char *type, - const char *status), +LTTNG_TRACEPOINT_EVENT_MAP(regcache_sync, - TP_ARGS(dev, type, status), + regmap_regcache_sync, - TP_STRUCT__entry( - __string( name, dev_name(dev) ) - __string( status, status ) - __string( type, type ) - ), + TP_PROTO(struct regmap *map, const char *type, + const char *status), - TP_fast_assign( - tp_strcpy(name, dev_name(dev)) - tp_strcpy(status, status) - tp_strcpy(type, type) - ), + TP_ARGS(map, type, status), - TP_printk("%s type=%s status=%s", __get_str(name), - __get_str(type), __get_str(status)) + TP_FIELDS( + ctf_string(name, regmap_name(map)) + ctf_string(status, status) + ctf_string(type, type) + ) ) -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,4,0)) LTTNG_TRACEPOINT_EVENT_CLASS(regmap_bool, - TP_PROTO(struct device *dev, bool flag), + TP_PROTO(struct regmap *map, bool flag), - TP_ARGS(dev, flag), + TP_ARGS(map, flag), - TP_STRUCT__entry( - __string( name, dev_name(dev) ) - __field( int, flag ) - ), - - TP_fast_assign( - tp_strcpy(name, dev_name(dev)) - tp_assign(flag, flag) - ), - - TP_printk("%s flag=%d", __get_str(name), - (int)__entry->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 device *dev, bool flag), - - TP_ARGS(dev, flag) + TP_PROTO(struct regmap *map, bool flag), + TP_ARGS(map, flag) ) LTTNG_TRACEPOINT_EVENT_INSTANCE(regmap_bool, regmap_cache_bypass, - TP_PROTO(struct device *dev, bool flag), + TP_PROTO(struct regmap *map, bool flag), - TP_ARGS(dev, flag) + TP_ARGS(map, flag) ) -#endif #endif /* LTTNG_TRACE_REGMAP_H */ /* This part must be outside protection */ -#include "../../../probes/define_trace.h" +#include