diff options
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/btrfs.h | 2 | ||||
-rw-r--r-- | include/trace/events/dlm.h | 12 | ||||
-rw-r--r-- | include/trace/events/erofs.h | 4 | ||||
-rw-r--r-- | include/trace/events/ext4.h | 7 | ||||
-rw-r--r-- | include/trace/events/f2fs.h | 2 | ||||
-rw-r--r-- | include/trace/events/fib.h | 5 | ||||
-rw-r--r-- | include/trace/events/fib6.h | 5 | ||||
-rw-r--r-- | include/trace/events/handshake.h | 159 | ||||
-rw-r--r-- | include/trace/events/io_uring.h | 15 | ||||
-rw-r--r-- | include/trace/events/irq.h | 47 | ||||
-rw-r--r-- | include/trace/events/mmap.h | 4 | ||||
-rw-r--r-- | include/trace/events/qrtr.h | 33 | ||||
-rw-r--r-- | include/trace/events/rcu.h | 6 | ||||
-rw-r--r-- | include/trace/events/sock.h | 4 | ||||
-rw-r--r-- | include/trace/events/tcp.h | 2 | ||||
-rw-r--r-- | include/trace/events/thermal.h | 199 | ||||
-rw-r--r-- | include/trace/events/thermal_power_allocator.h | 88 | ||||
-rw-r--r-- | include/trace/events/timer.h | 3 | ||||
-rw-r--r-- | include/trace/events/ufs.h | 22 | ||||
-rw-r--r-- | include/trace/stages/stage5_get_offsets.h | 21 |
20 files changed, 277 insertions, 363 deletions
diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h index 75d7d22c3a27..8ea9cea9bfeb 100644 --- a/include/trace/events/btrfs.h +++ b/include/trace/events/btrfs.h @@ -2422,7 +2422,7 @@ DECLARE_EVENT_CLASS(btrfs_raid56_bio, ), TP_fast_assign_btrfs(rbio->bioc->fs_info, - __entry->full_stripe = rbio->bioc->raid_map[0]; + __entry->full_stripe = rbio->bioc->full_stripe_logical; __entry->physical = bio->bi_iter.bi_sector << SECTOR_SHIFT; __entry->len = bio->bi_iter.bi_size; __entry->opf = bio_op(bio); diff --git a/include/trace/events/dlm.h b/include/trace/events/dlm.h index 37eb79e29b28..2b09574e1243 100644 --- a/include/trace/events/dlm.h +++ b/include/trace/events/dlm.h @@ -47,16 +47,8 @@ { DLM_SBF_ALTMODE, "ALTMODE" }) #define show_lkb_flags(flags) __print_flags(flags, "|", \ - { DLM_IFL_MSTCPY, "MSTCPY" }, \ - { DLM_IFL_RESEND, "RESEND" }, \ - { DLM_IFL_DEAD, "DEAD" }, \ - { DLM_IFL_OVERLAP_UNLOCK, "OVERLAP_UNLOCK" }, \ - { DLM_IFL_OVERLAP_CANCEL, "OVERLAP_CANCEL" }, \ - { DLM_IFL_ENDOFLIFE, "ENDOFLIFE" }, \ - { DLM_IFL_DEADLOCK_CANCEL, "DEADLOCK_CANCEL" }, \ - { DLM_IFL_STUB_MS, "STUB_MS" }, \ - { DLM_IFL_USER, "USER" }, \ - { DLM_IFL_ORPHAN, "ORPHAN" }) + { BIT(DLM_DFL_USER_BIT), "USER" }, \ + { BIT(DLM_DFL_ORPHAN_BIT), "ORPHAN" }) #define show_header_cmd(cmd) __print_symbolic(cmd, \ { DLM_MSG, "MSG"}, \ diff --git a/include/trace/events/erofs.h b/include/trace/events/erofs.h index cf4a0d28b178..71dbe8bfa7db 100644 --- a/include/trace/events/erofs.h +++ b/include/trace/events/erofs.h @@ -71,8 +71,8 @@ TRACE_EVENT(erofs_fill_inode, TP_fast_assign( __entry->dev = inode->i_sb->s_dev; __entry->nid = EROFS_I(inode)->nid; - __entry->blkaddr = erofs_blknr(erofs_iloc(inode)); - __entry->ofs = erofs_blkoff(erofs_iloc(inode)); + __entry->blkaddr = erofs_blknr(inode->i_sb, erofs_iloc(inode)); + __entry->ofs = erofs_blkoff(inode->i_sb, erofs_iloc(inode)); ), TP_printk("dev = (%d,%d), nid = %llu, blkaddr %u ofs %u", diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h index 77b426ae0064..ebccf6a6aa1b 100644 --- a/include/trace/events/ext4.h +++ b/include/trace/events/ext4.h @@ -584,13 +584,6 @@ DECLARE_EVENT_CLASS(ext4__page_op, (unsigned long) __entry->index) ); -DEFINE_EVENT(ext4__page_op, ext4_writepage, - - TP_PROTO(struct page *page), - - TP_ARGS(page) -); - DEFINE_EVENT(ext4__page_op, ext4_readpage, TP_PROTO(struct page *page), diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index 1322d34a5dfc..99cbc5949e3c 100644 --- a/include/trace/events/f2fs.h +++ b/include/trace/events/f2fs.h @@ -512,7 +512,7 @@ TRACE_EVENT(f2fs_truncate_partial_nodes, TP_STRUCT__entry( __field(dev_t, dev) __field(ino_t, ino) - __field(nid_t, nid[3]) + __array(nid_t, nid, 3) __field(int, depth) __field(int, err) ), diff --git a/include/trace/events/fib.h b/include/trace/events/fib.h index c2300c407f58..76297ecd4935 100644 --- a/include/trace/events/fib.h +++ b/include/trace/events/fib.h @@ -36,7 +36,6 @@ TRACE_EVENT(fib_table_lookup, ), TP_fast_assign( - struct in6_addr in6_zero = {}; struct net_device *dev; struct in6_addr *in6; __be32 *p32; @@ -74,7 +73,7 @@ TRACE_EVENT(fib_table_lookup, *p32 = nhc->nhc_gw.ipv4; in6 = (struct in6_addr *)__entry->gw6; - *in6 = in6_zero; + *in6 = in6addr_any; } else if (nhc->nhc_gw_family == AF_INET6) { p32 = (__be32 *) __entry->gw4; *p32 = 0; @@ -87,7 +86,7 @@ TRACE_EVENT(fib_table_lookup, *p32 = 0; in6 = (struct in6_addr *)__entry->gw6; - *in6 = in6_zero; + *in6 = in6addr_any; } ), diff --git a/include/trace/events/fib6.h b/include/trace/events/fib6.h index 6e821eb79450..4d3e607b3cde 100644 --- a/include/trace/events/fib6.h +++ b/include/trace/events/fib6.h @@ -68,11 +68,8 @@ TRACE_EVENT(fib6_table_lookup, strcpy(__entry->name, "-"); } if (res->f6i == net->ipv6.fib6_null_entry) { - struct in6_addr in6_zero = {}; - in6 = (struct in6_addr *)__entry->gw; - *in6 = in6_zero; - + *in6 = in6addr_any; } else if (res->nh) { in6 = (struct in6_addr *)__entry->gw; *in6 = res->nh->fib_nh_gw6; diff --git a/include/trace/events/handshake.h b/include/trace/events/handshake.h new file mode 100644 index 000000000000..8dadcab5f12a --- /dev/null +++ b/include/trace/events/handshake.h @@ -0,0 +1,159 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM handshake + +#if !defined(_TRACE_HANDSHAKE_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_HANDSHAKE_H + +#include <linux/net.h> +#include <linux/tracepoint.h> + +DECLARE_EVENT_CLASS(handshake_event_class, + TP_PROTO( + const struct net *net, + const struct handshake_req *req, + const struct sock *sk + ), + TP_ARGS(net, req, sk), + TP_STRUCT__entry( + __field(const void *, req) + __field(const void *, sk) + __field(unsigned int, netns_ino) + ), + TP_fast_assign( + __entry->req = req; + __entry->sk = sk; + __entry->netns_ino = net->ns.inum; + ), + TP_printk("req=%p sk=%p", + __entry->req, __entry->sk + ) +); +#define DEFINE_HANDSHAKE_EVENT(name) \ + DEFINE_EVENT(handshake_event_class, name, \ + TP_PROTO( \ + const struct net *net, \ + const struct handshake_req *req, \ + const struct sock *sk \ + ), \ + TP_ARGS(net, req, sk)) + +DECLARE_EVENT_CLASS(handshake_fd_class, + TP_PROTO( + const struct net *net, + const struct handshake_req *req, + const struct sock *sk, + int fd + ), + TP_ARGS(net, req, sk, fd), + TP_STRUCT__entry( + __field(const void *, req) + __field(const void *, sk) + __field(int, fd) + __field(unsigned int, netns_ino) + ), + TP_fast_assign( + __entry->req = req; + __entry->sk = req->hr_sk; + __entry->fd = fd; + __entry->netns_ino = net->ns.inum; + ), + TP_printk("req=%p sk=%p fd=%d", + __entry->req, __entry->sk, __entry->fd + ) +); +#define DEFINE_HANDSHAKE_FD_EVENT(name) \ + DEFINE_EVENT(handshake_fd_class, name, \ + TP_PROTO( \ + const struct net *net, \ + const struct handshake_req *req, \ + const struct sock *sk, \ + int fd \ + ), \ + TP_ARGS(net, req, sk, fd)) + +DECLARE_EVENT_CLASS(handshake_error_class, + TP_PROTO( + const struct net *net, + const struct handshake_req *req, + const struct sock *sk, + int err + ), + TP_ARGS(net, req, sk, err), + TP_STRUCT__entry( + __field(const void *, req) + __field(const void *, sk) + __field(int, err) + __field(unsigned int, netns_ino) + ), + TP_fast_assign( + __entry->req = req; + __entry->sk = sk; + __entry->err = err; + __entry->netns_ino = net->ns.inum; + ), + TP_printk("req=%p sk=%p err=%d", + __entry->req, __entry->sk, __entry->err + ) +); +#define DEFINE_HANDSHAKE_ERROR(name) \ + DEFINE_EVENT(handshake_error_class, name, \ + TP_PROTO( \ + const struct net *net, \ + const struct handshake_req *req, \ + const struct sock *sk, \ + int err \ + ), \ + TP_ARGS(net, req, sk, err)) + + +/* + * Request lifetime events + */ + +DEFINE_HANDSHAKE_EVENT(handshake_submit); +DEFINE_HANDSHAKE_ERROR(handshake_submit_err); +DEFINE_HANDSHAKE_EVENT(handshake_cancel); +DEFINE_HANDSHAKE_EVENT(handshake_cancel_none); +DEFINE_HANDSHAKE_EVENT(handshake_cancel_busy); +DEFINE_HANDSHAKE_EVENT(handshake_destruct); + + +TRACE_EVENT(handshake_complete, + TP_PROTO( + const struct net *net, + const struct handshake_req *req, + const struct sock *sk, + int status + ), + TP_ARGS(net, req, sk, status), + TP_STRUCT__entry( + __field(const void *, req) + __field(const void *, sk) + __field(int, status) + __field(unsigned int, netns_ino) + ), + TP_fast_assign( + __entry->req = req; + __entry->sk = sk; + __entry->status = status; + __entry->netns_ino = net->ns.inum; + ), + TP_printk("req=%p sk=%p status=%d", + __entry->req, __entry->sk, __entry->status + ) +); + +/* + * Netlink events + */ + +DEFINE_HANDSHAKE_ERROR(handshake_notify_err); +DEFINE_HANDSHAKE_FD_EVENT(handshake_cmd_accept); +DEFINE_HANDSHAKE_ERROR(handshake_cmd_accept_err); +DEFINE_HANDSHAKE_FD_EVENT(handshake_cmd_done); +DEFINE_HANDSHAKE_ERROR(handshake_cmd_done_err); + +#endif /* _TRACE_HANDSHAKE_H */ + +#include <trace/define_trace.h> diff --git a/include/trace/events/io_uring.h b/include/trace/events/io_uring.h index 936fd41bf147..69454f1f98b0 100644 --- a/include/trace/events/io_uring.h +++ b/include/trace/events/io_uring.h @@ -360,19 +360,18 @@ TRACE_EVENT(io_uring_complete, ); /** - * io_uring_submit_sqe - called before submitting one SQE + * io_uring_submit_req - called before submitting a request * * @req: pointer to a submitted request - * @force_nonblock: whether a context blocking or not * * Allows to track SQE submitting, to understand what was the source of it, SQ * thread or io_uring_enter call. */ -TRACE_EVENT(io_uring_submit_sqe, +TRACE_EVENT(io_uring_submit_req, - TP_PROTO(struct io_kiocb *req, bool force_nonblock), + TP_PROTO(struct io_kiocb *req), - TP_ARGS(req, force_nonblock), + TP_ARGS(req), TP_STRUCT__entry ( __field( void *, ctx ) @@ -380,7 +379,6 @@ TRACE_EVENT(io_uring_submit_sqe, __field( unsigned long long, user_data ) __field( u8, opcode ) __field( u32, flags ) - __field( bool, force_nonblock ) __field( bool, sq_thread ) __string( op_str, io_uring_get_opcode(req->opcode) ) @@ -392,16 +390,15 @@ TRACE_EVENT(io_uring_submit_sqe, __entry->user_data = req->cqe.user_data; __entry->opcode = req->opcode; __entry->flags = req->flags; - __entry->force_nonblock = force_nonblock; __entry->sq_thread = req->ctx->flags & IORING_SETUP_SQPOLL; __assign_str(op_str, io_uring_get_opcode(req->opcode)); ), TP_printk("ring %p, req %p, user_data 0x%llx, opcode %s, flags 0x%x, " - "non block %d, sq_thread %d", __entry->ctx, __entry->req, + "sq_thread %d", __entry->ctx, __entry->req, __entry->user_data, __get_str(op_str), - __entry->flags, __entry->force_nonblock, __entry->sq_thread) + __entry->flags, __entry->sq_thread) ); /* diff --git a/include/trace/events/irq.h b/include/trace/events/irq.h index eeceafaaea4c..a07b4607b663 100644 --- a/include/trace/events/irq.h +++ b/include/trace/events/irq.h @@ -160,6 +160,53 @@ DEFINE_EVENT(softirq, softirq_raise, TP_ARGS(vec_nr) ); +DECLARE_EVENT_CLASS(tasklet, + + TP_PROTO(struct tasklet_struct *t, void *func), + + TP_ARGS(t, func), + + TP_STRUCT__entry( + __field( void *, tasklet) + __field( void *, func) + ), + + TP_fast_assign( + __entry->tasklet = t; + __entry->func = func; + ), + + TP_printk("tasklet=%ps function=%ps", __entry->tasklet, __entry->func) +); + +/** + * tasklet_entry - called immediately before the tasklet is run + * @t: tasklet pointer + * @func: tasklet callback or function being run + * + * Used to find individual tasklet execution time + */ +DEFINE_EVENT(tasklet, tasklet_entry, + + TP_PROTO(struct tasklet_struct *t, void *func), + + TP_ARGS(t, func) +); + +/** + * tasklet_exit - called immediately after the tasklet is run + * @t: tasklet pointer + * @func: tasklet callback or function being run + * + * Used to find individual tasklet execution time + */ +DEFINE_EVENT(tasklet, tasklet_exit, + + TP_PROTO(struct tasklet_struct *t, void *func), + + TP_ARGS(t, func) +); + #endif /* _TRACE_IRQ_H */ /* This part must be outside protection */ diff --git a/include/trace/events/mmap.h b/include/trace/events/mmap.h index 216de5f03621..f8d61485de16 100644 --- a/include/trace/events/mmap.h +++ b/include/trace/events/mmap.h @@ -35,7 +35,7 @@ TRACE_EVENT(vm_unmapped_area, __entry->align_offset = info->align_offset; ), - TP_printk("addr=0x%lx err=%ld total_vm=0x%lx flags=0x%lx len=0x%lx lo=0x%lx hi=0x%lx mask=0x%lx ofs=0x%lx\n", + TP_printk("addr=0x%lx err=%ld total_vm=0x%lx flags=0x%lx len=0x%lx lo=0x%lx hi=0x%lx mask=0x%lx ofs=0x%lx", IS_ERR_VALUE(__entry->addr) ? 0 : __entry->addr, IS_ERR_VALUE(__entry->addr) ? __entry->addr : 0, __entry->total_vm, __entry->flags, __entry->length, @@ -110,7 +110,7 @@ TRACE_EVENT(exit_mmap, __entry->mt = &mm->mm_mt; ), - TP_printk("mt_mod %p, DESTROY\n", + TP_printk("mt_mod %p, DESTROY", __entry->mt ) ); diff --git a/include/trace/events/qrtr.h b/include/trace/events/qrtr.h index b1de14c3bb93..441132c67133 100644 --- a/include/trace/events/qrtr.h +++ b/include/trace/events/qrtr.h @@ -10,15 +10,16 @@ TRACE_EVENT(qrtr_ns_service_announce_new, - TP_PROTO(__le32 service, __le32 instance, __le32 node, __le32 port), + TP_PROTO(unsigned int service, unsigned int instance, + unsigned int node, unsigned int port), TP_ARGS(service, instance, node, port), TP_STRUCT__entry( - __field(__le32, service) - __field(__le32, instance) - __field(__le32, node) - __field(__le32, port) + __field(unsigned int, service) + __field(unsigned int, instance) + __field(unsigned int, node) + __field(unsigned int, port) ), TP_fast_assign( @@ -36,15 +37,16 @@ TRACE_EVENT(qrtr_ns_service_announce_new, TRACE_EVENT(qrtr_ns_service_announce_del, - TP_PROTO(__le32 service, __le32 instance, __le32 node, __le32 port), + TP_PROTO(unsigned int service, unsigned int instance, + unsigned int node, unsigned int port), TP_ARGS(service, instance, node, port), TP_STRUCT__entry( - __field(__le32, service) - __field(__le32, instance) - __field(__le32, node) - __field(__le32, port) + __field(unsigned int, service) + __field(unsigned int, instance) + __field(unsigned int, node) + __field(unsigned int, port) ), TP_fast_assign( @@ -62,15 +64,16 @@ TRACE_EVENT(qrtr_ns_service_announce_del, TRACE_EVENT(qrtr_ns_server_add, - TP_PROTO(__le32 service, __le32 instance, __le32 node, __le32 port), + TP_PROTO(unsigned int service, unsigned int instance, + unsigned int node, unsigned int port), TP_ARGS(service, instance, node, port), TP_STRUCT__entry( - __field(__le32, service) - __field(__le32, instance) - __field(__le32, node) - __field(__le32, port) + __field(unsigned int, service) + __field(unsigned int, instance) + __field(unsigned int, node) + __field(unsigned int, port) ), TP_fast_assign( diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h index 90b2fb0292cb..2ef9c719772a 100644 --- a/include/trace/events/rcu.h +++ b/include/trace/events/rcu.h @@ -768,7 +768,7 @@ TRACE_EVENT_RCU(rcu_torture_read, TP_ARGS(rcutorturename, rhp, secs, c_old, c), TP_STRUCT__entry( - __field(char, rcutorturename[RCUTORTURENAME_LEN]) + __array(char, rcutorturename, RCUTORTURENAME_LEN) __field(struct rcu_head *, rhp) __field(unsigned long, secs) __field(unsigned long, c_old) @@ -776,9 +776,7 @@ TRACE_EVENT_RCU(rcu_torture_read, ), TP_fast_assign( - strncpy(__entry->rcutorturename, rcutorturename, - RCUTORTURENAME_LEN); - __entry->rcutorturename[RCUTORTURENAME_LEN - 1] = 0; + strscpy(__entry->rcutorturename, rcutorturename, RCUTORTURENAME_LEN); __entry->rhp = rhp; __entry->secs = secs; __entry->c_old = c_old; diff --git a/include/trace/events/sock.h b/include/trace/events/sock.h index 03d19fc562f8..fd206a6ab5b8 100644 --- a/include/trace/events/sock.h +++ b/include/trace/events/sock.h @@ -158,7 +158,7 @@ TRACE_EVENT(inet_sock_set_state, ), TP_fast_assign( - struct inet_sock *inet = inet_sk(sk); + const struct inet_sock *inet = inet_sk(sk); struct in6_addr *pin6; __be32 *p32; @@ -222,7 +222,7 @@ TRACE_EVENT(inet_sk_error_report, ), TP_fast_assign( - struct inet_sock *inet = inet_sk(sk); + const struct inet_sock *inet = inet_sk(sk); struct in6_addr *pin6; __be32 *p32; diff --git a/include/trace/events/tcp.h b/include/trace/events/tcp.h index 901b440238d5..bf06db8d2046 100644 --- a/include/trace/events/tcp.h +++ b/include/trace/events/tcp.h @@ -67,7 +67,7 @@ DECLARE_EVENT_CLASS(tcp_event_sk_skb, ), TP_fast_assign( - struct inet_sock *inet = inet_sk(sk); + const struct inet_sock *inet = inet_sk(sk); __be32 *p32; __entry->skbaddr = skb; diff --git a/include/trace/events/thermal.h b/include/trace/events/thermal.h deleted file mode 100644 index e58bf3072f32..000000000000 --- a/include/trace/events/thermal.h +++ /dev/null @@ -1,199 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM thermal - -#if !defined(_TRACE_THERMAL_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_THERMAL_H - -#include <linux/devfreq.h> -#include <linux/thermal.h> -#include <linux/tracepoint.h> - -TRACE_DEFINE_ENUM(THERMAL_TRIP_CRITICAL); -TRACE_DEFINE_ENUM(THERMAL_TRIP_HOT); -TRACE_DEFINE_ENUM(THERMAL_TRIP_PASSIVE); -TRACE_DEFINE_ENUM(THERMAL_TRIP_ACTIVE); - -#define show_tzt_type(type) \ - __print_symbolic(type, \ - { THERMAL_TRIP_CRITICAL, "CRITICAL"}, \ - { THERMAL_TRIP_HOT, "HOT"}, \ - { THERMAL_TRIP_PASSIVE, "PASSIVE"}, \ - { THERMAL_TRIP_ACTIVE, "ACTIVE"}) - -TRACE_EVENT(thermal_temperature, - - TP_PROTO(struct thermal_zone_device *tz), - - TP_ARGS(tz), - - TP_STRUCT__entry( - __string(thermal_zone, tz->type) - __field(int, id) - __field(int, temp_prev) - __field(int, temp) - ), - - TP_fast_assign( - __assign_str(thermal_zone, tz->type); - __entry->id = tz->id; - __entry->temp_prev = tz->last_temperature; - __entry->temp = tz->temperature; - ), - - TP_printk("thermal_zone=%s id=%d temp_prev=%d temp=%d", - __get_str(thermal_zone), __entry->id, __entry->temp_prev, - __entry->temp) -); - -TRACE_EVENT(cdev_update, - - TP_PROTO(struct thermal_cooling_device *cdev, unsigned long target), - - TP_ARGS(cdev, target), - - TP_STRUCT__entry( - __string(type, cdev->type) - __field(unsigned long, target) - ), - - TP_fast_assign( - __assign_str(type, cdev->type); - __entry->target = target; - ), - - TP_printk("type=%s target=%lu", __get_str(type), __entry->target) -); - -TRACE_EVENT(thermal_zone_trip, - - TP_PROTO(struct thermal_zone_device *tz, int trip, - enum thermal_trip_type trip_type), - - TP_ARGS(tz, trip, trip_type), - - TP_STRUCT__entry( - __string(thermal_zone, tz->type) - __field(int, id) - __field(int, trip) - __field(enum thermal_trip_type, trip_type) - ), - - TP_fast_assign( - __assign_str(thermal_zone, tz->type); - __entry->id = tz->id; - __entry->trip = trip; - __entry->trip_type = trip_type; - ), - - TP_printk("thermal_zone=%s id=%d trip=%d trip_type=%s", - __get_str(thermal_zone), __entry->id, __entry->trip, - show_tzt_type(__entry->trip_type)) -); - -#ifdef CONFIG_CPU_THERMAL -TRACE_EVENT(thermal_power_cpu_get_power_simple, - TP_PROTO(int cpu, u32 power), - - TP_ARGS(cpu, power), - - TP_STRUCT__entry( - __field(int, cpu) - __field(u32, power) - ), - - TP_fast_assign( - __entry->cpu = cpu; - __entry->power = power; - ), - - TP_printk("cpu=%d power=%u", __entry->cpu, __entry->power) -); - -TRACE_EVENT(thermal_power_cpu_limit, - TP_PROTO(const struct cpumask *cpus, unsigned int freq, - unsigned long cdev_state, u32 power), - - TP_ARGS(cpus, freq, cdev_state, power), - - TP_STRUCT__entry( - __bitmask(cpumask, num_possible_cpus()) - __field(unsigned int, freq ) - __field(unsigned long, cdev_state) - __field(u32, power ) - ), - - TP_fast_assign( - __assign_bitmask(cpumask, cpumask_bits(cpus), - num_possible_cpus()); - __entry->freq = freq; - __entry->cdev_state = cdev_state; - __entry->power = power; - ), - - TP_printk("cpus=%s freq=%u cdev_state=%lu power=%u", - __get_bitmask(cpumask), __entry->freq, __entry->cdev_state, - __entry->power) -); -#endif /* CONFIG_CPU_THERMAL */ - -#ifdef CONFIG_DEVFREQ_THERMAL -TRACE_EVENT(thermal_power_devfreq_get_power, - TP_PROTO(struct thermal_cooling_device *cdev, - struct devfreq_dev_status *status, unsigned long freq, - u32 power), - - TP_ARGS(cdev, status, freq, power), - - TP_STRUCT__entry( - __string(type, cdev->type ) - __field(unsigned long, freq ) - __field(u32, busy_time) - __field(u32, total_time) - __field(u32, power) - ), - - TP_fast_assign( - __assign_str(type, cdev->type); - __entry->freq = freq; - __entry->busy_time = status->busy_time; - __entry->total_time = status->total_time; - __entry->power = power; - ), - - TP_printk("type=%s freq=%lu load=%u power=%u", - __get_str(type), __entry->freq, - __entry->total_time == 0 ? 0 : - (100 * __entry->busy_time) / __entry->total_time, - __entry->power) -); - -TRACE_EVENT(thermal_power_devfreq_limit, - TP_PROTO(struct thermal_cooling_device *cdev, unsigned long freq, - unsigned long cdev_state, u32 power), - - TP_ARGS(cdev, freq, cdev_state, power), - - TP_STRUCT__entry( - __string(type, cdev->type) - __field(unsigned int, freq ) - __field(unsigned long, cdev_state) - __field(u32, power ) - ), - - TP_fast_assign( - __assign_str(type, cdev->type); - __entry->freq = freq; - __entry->cdev_state = cdev_state; - __entry->power = power; - ), - - TP_printk("type=%s freq=%u cdev_state=%lu power=%u", - __get_str(type), __entry->freq, __entry->cdev_state, - __entry->power) -); -#endif /* CONFIG_DEVFREQ_THERMAL */ -#endif /* _TRACE_THERMAL_H */ - -/* This part must be outside protection */ -#include <trace/define_trace.h> diff --git a/include/trace/events/thermal_power_allocator.h b/include/trace/events/thermal_power_allocator.h deleted file mode 100644 index 1c8fb95544f9..000000000000 --- a/include/trace/events/thermal_power_allocator.h +++ /dev/null @@ -1,88 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 */ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM thermal_power_allocator - -#if !defined(_TRACE_THERMAL_POWER_ALLOCATOR_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_THERMAL_POWER_ALLOCATOR_H - -#include <linux/tracepoint.h> - -TRACE_EVENT(thermal_power_allocator, - TP_PROTO(struct thermal_zone_device *tz, u32 *req_power, - u32 total_req_power, u32 *granted_power, - u32 total_granted_power, size_t num_actors, - u32 power_range, u32 max_allocatable_power, - int current_temp, s32 delta_temp), - TP_ARGS(tz, req_power, total_req_power, granted_power, - total_granted_power, num_actors, power_range, - max_allocatable_power, current_temp, delta_temp), - TP_STRUCT__entry( - __field(int, tz_id ) - __dynamic_array(u32, req_power, num_actors ) - __field(u32, total_req_power ) - __dynamic_array(u32, granted_power, num_actors) - __field(u32, total_granted_power ) - __field(size_t, num_actors ) - __field(u32, power_range ) - __field(u32, max_allocatable_power ) - __field(int, current_temp ) - __field(s32, delta_temp ) - ), - TP_fast_assign( - __entry->tz_id = tz->id; - memcpy(__get_dynamic_array(req_power), req_power, - num_actors * sizeof(*req_power)); - __entry->total_req_power = total_req_power; - memcpy(__get_dynamic_array(granted_power), granted_power, - num_actors * sizeof(*granted_power)); - __entry->total_granted_power = total_granted_power; - __entry->num_actors = num_actors; - __entry->power_range = power_range; - __entry->max_allocatable_power = max_allocatable_power; - __entry->current_temp = current_temp; - __entry->delta_temp = delta_temp; - ), - - TP_printk("thermal_zone_id=%d req_power={%s} total_req_power=%u granted_power={%s} total_granted_power=%u power_range=%u max_allocatable_power=%u current_temperature=%d delta_temperature=%d", - __entry->tz_id, - __print_array(__get_dynamic_array(req_power), - __entry->num_actors, 4), - __entry->total_req_power, - __print_array(__get_dynamic_array(granted_power), - __entry->num_actors, 4), - __entry->total_granted_power, __entry->power_range, - __entry->max_allocatable_power, __entry->current_temp, - __entry->delta_temp) -); - -TRACE_EVENT(thermal_power_allocator_pid, - TP_PROTO(struct thermal_zone_device *tz, s32 err, s32 err_integral, - s64 p, s64 i, s64 d, s32 output), - TP_ARGS(tz, err, err_integral, p, i, d, output), - TP_STRUCT__entry( - __field(int, tz_id ) - __field(s32, err ) - __field(s32, err_integral) - __field(s64, p ) - __field(s64, i ) - __field(s64, d ) - __field(s32, output ) - ), - TP_fast_assign( - __entry->tz_id = tz->id; - __entry->err = err; - __entry->err_integral = err_integral; - __entry->p = p; - __entry->i = i; - __entry->d = d; - __entry->output = output; - ), - - TP_printk("thermal_zone_id=%d err=%d err_integral=%d p=%lld i=%lld d=%lld output=%d", - __entry->tz_id, __entry->err, __entry->err_integral, - __entry->p, __entry->i, __entry->d, __entry->output) -); -#endif /* _TRACE_THERMAL_POWER_ALLOCATOR_H */ - -/* This part must be outside protection */ -#include <trace/define_trace.h> diff --git a/include/trace/events/timer.h b/include/trace/events/timer.h index 2e713a7d9aa3..3e8619c72f77 100644 --- a/include/trace/events/timer.h +++ b/include/trace/events/timer.h @@ -371,7 +371,8 @@ TRACE_EVENT(itimer_expire, tick_dep_name(PERF_EVENTS) \ tick_dep_name(SCHED) \ tick_dep_name(CLOCK_UNSTABLE) \ - tick_dep_name_end(RCU) + tick_dep_name(RCU) \ + tick_dep_name_end(RCU_EXP) #undef tick_dep_name #undef tick_dep_mask_name diff --git a/include/trace/events/ufs.h b/include/trace/events/ufs.h index 599739ee7b20..992517ac3292 100644 --- a/include/trace/events/ufs.h +++ b/include/trace/events/ufs.h @@ -268,20 +268,21 @@ DEFINE_EVENT(ufshcd_template, ufshcd_wl_runtime_resume, TRACE_EVENT(ufshcd_command, TP_PROTO(const char *dev_name, enum ufs_trace_str_t str_t, - unsigned int tag, u32 doorbell, int transfer_len, u32 intr, - u64 lba, u8 opcode, u8 group_id), + unsigned int tag, u32 doorbell, u32 hwq_id, int transfer_len, + u32 intr, u64 lba, u8 opcode, u8 group_id), - TP_ARGS(dev_name, str_t, tag, doorbell, transfer_len, - intr, lba, opcode, group_id), + TP_ARGS(dev_name, str_t, tag, doorbell, hwq_id, transfer_len, + intr, lba, opcode, group_id), TP_STRUCT__entry( __string(dev_name, dev_name) __field(enum ufs_trace_str_t, str_t) __field(unsigned int, tag) __field(u32, doorbell) - __field(int, transfer_len) + __field(u32, hwq_id) __field(u32, intr) __field(u64, lba) + __field(int, transfer_len) __field(u8, opcode) __field(u8, group_id) ), @@ -291,19 +292,20 @@ TRACE_EVENT(ufshcd_command, __entry->str_t = str_t; __entry->tag = tag; __entry->doorbell = doorbell; - __entry->transfer_len = transfer_len; + __entry->hwq_id = hwq_id; __entry->intr = intr; __entry->lba = lba; + __entry->transfer_len = transfer_len; __entry->opcode = opcode; __entry->group_id = group_id; ), TP_printk( - "%s: %s: tag: %u, DB: 0x%x, size: %d, IS: %u, LBA: %llu, opcode: 0x%x (%s), group_id: 0x%x", + "%s: %s: tag: %u, DB: 0x%x, size: %d, IS: %u, LBA: %llu, opcode: 0x%x (%s), group_id: 0x%x, hwq_id: %d", show_ufs_cmd_trace_str(__entry->str_t), __get_str(dev_name), - __entry->tag, __entry->doorbell, __entry->transfer_len, - __entry->intr, __entry->lba, (u32)__entry->opcode, - str_opcode(__entry->opcode), (u32)__entry->group_id + __entry->tag, __entry->doorbell, __entry->transfer_len, __entry->intr, + __entry->lba, (u32)__entry->opcode, str_opcode(__entry->opcode), + (u32)__entry->group_id, __entry->hwq_id ) ); diff --git a/include/trace/stages/stage5_get_offsets.h b/include/trace/stages/stage5_get_offsets.h index ac5c24d3beeb..e30a13be46ba 100644 --- a/include/trace/stages/stage5_get_offsets.h +++ b/include/trace/stages/stage5_get_offsets.h @@ -9,17 +9,30 @@ #undef __entry #define __entry entry +/* + * Fields should never declare an array: i.e. __field(int, arr[5]) + * If they do, it will cause issues in parsing and possibly corrupt the + * events. To prevent that from happening, test the sizeof() a fictitious + * type called "struct _test_no_array_##item" which will fail if "item" + * contains array elements (like "arr[5]"). + * + * If you hit this, use __array(int, arr, 5) instead. + */ #undef __field -#define __field(type, item) +#define __field(type, item) \ + { (void)sizeof(struct _test_no_array_##item *); } #undef __field_ext -#define __field_ext(type, item, filter_type) +#define __field_ext(type, item, filter_type) \ + { (void)sizeof(struct _test_no_array_##item *); } #undef __field_struct -#define __field_struct(type, item) +#define __field_struct(type, item) \ + { (void)sizeof(struct _test_no_array_##item *); } #undef __field_struct_ext -#define __field_struct_ext(type, item, filter_type) +#define __field_struct_ext(type, item, filter_type) \ + { (void)sizeof(struct _test_no_array_##item *); } #undef __array #define __array(type, item, len) |