diff options
Diffstat (limited to 'include/trace')
-rw-r--r-- | include/trace/events/bcache.h | 52 | ||||
-rw-r--r-- | include/trace/events/block.h | 33 | ||||
-rw-r--r-- | include/trace/events/btrfs.h | 137 | ||||
-rw-r--r-- | include/trace/events/hswadsp.h | 384 | ||||
-rw-r--r-- | include/trace/events/intel-sst.h | 148 | ||||
-rw-r--r-- | include/trace/events/migrate.h | 2 | ||||
-rw-r--r-- | include/trace/events/net.h | 12 | ||||
-rw-r--r-- | include/trace/events/power.h | 11 | ||||
-rw-r--r-- | include/trace/events/sunrpc.h | 4 | ||||
-rw-r--r-- | include/trace/events/v4l2.h | 1 | ||||
-rw-r--r-- | include/trace/events/writeback.h | 7 | ||||
-rw-r--r-- | include/trace/ftrace.h | 45 |
12 files changed, 765 insertions, 71 deletions
diff --git a/include/trace/events/bcache.h b/include/trace/events/bcache.h index 7110897c3dfa..c9c3c044b32f 100644 --- a/include/trace/events/bcache.h +++ b/include/trace/events/bcache.h @@ -399,26 +399,43 @@ TRACE_EVENT(bcache_keyscan, /* Allocator */ -TRACE_EVENT(bcache_alloc_invalidate, - TP_PROTO(struct cache *ca), - TP_ARGS(ca), +TRACE_EVENT(bcache_invalidate, + TP_PROTO(struct cache *ca, size_t bucket), + TP_ARGS(ca, bucket), TP_STRUCT__entry( - __field(unsigned, free ) - __field(unsigned, free_inc ) - __field(unsigned, free_inc_size ) - __field(unsigned, unused ) + __field(unsigned, sectors ) + __field(dev_t, dev ) + __field(__u64, offset ) ), TP_fast_assign( - __entry->free = fifo_used(&ca->free[RESERVE_NONE]); - __entry->free_inc = fifo_used(&ca->free_inc); - __entry->free_inc_size = ca->free_inc.size; - __entry->unused = fifo_used(&ca->unused); + __entry->dev = ca->bdev->bd_dev; + __entry->offset = bucket << ca->set->bucket_bits; + __entry->sectors = GC_SECTORS_USED(&ca->buckets[bucket]); ), - TP_printk("free %u free_inc %u/%u unused %u", __entry->free, - __entry->free_inc, __entry->free_inc_size, __entry->unused) + TP_printk("invalidated %u sectors at %d,%d sector=%llu", + __entry->sectors, MAJOR(__entry->dev), + MINOR(__entry->dev), __entry->offset) +); + +TRACE_EVENT(bcache_alloc, + TP_PROTO(struct cache *ca, size_t bucket), + TP_ARGS(ca, bucket), + + TP_STRUCT__entry( + __field(dev_t, dev ) + __field(__u64, offset ) + ), + + TP_fast_assign( + __entry->dev = ca->bdev->bd_dev; + __entry->offset = bucket << ca->set->bucket_bits; + ), + + TP_printk("allocated %d,%d sector=%llu", MAJOR(__entry->dev), + MINOR(__entry->dev), __entry->offset) ); TRACE_EVENT(bcache_alloc_fail, @@ -426,21 +443,22 @@ TRACE_EVENT(bcache_alloc_fail, TP_ARGS(ca, reserve), TP_STRUCT__entry( + __field(dev_t, dev ) __field(unsigned, free ) __field(unsigned, free_inc ) - __field(unsigned, unused ) __field(unsigned, blocked ) ), TP_fast_assign( + __entry->dev = ca->bdev->bd_dev; __entry->free = fifo_used(&ca->free[reserve]); __entry->free_inc = fifo_used(&ca->free_inc); - __entry->unused = fifo_used(&ca->unused); __entry->blocked = atomic_read(&ca->set->prio_blocked); ), - TP_printk("free %u free_inc %u unused %u blocked %u", __entry->free, - __entry->free_inc, __entry->unused, __entry->blocked) + TP_printk("alloc fail %d,%d free %u free_inc %u blocked %u", + MAJOR(__entry->dev), MINOR(__entry->dev), __entry->free, + __entry->free_inc, __entry->blocked) ); /* Background writeback */ diff --git a/include/trace/events/block.h b/include/trace/events/block.h index e76ae19a8d6f..e8a5eca1dbe5 100644 --- a/include/trace/events/block.h +++ b/include/trace/events/block.h @@ -132,6 +132,7 @@ DEFINE_EVENT(block_rq_with_error, block_rq_requeue, * block_rq_complete - block IO operation completed by device driver * @q: queue containing the block operation request * @rq: block operations request + * @nr_bytes: number of completed bytes * * The block_rq_complete tracepoint event indicates that some portion * of operation request has been completed by the device driver. If @@ -139,11 +140,37 @@ DEFINE_EVENT(block_rq_with_error, block_rq_requeue, * do for the request. If @rq->bio is non-NULL then there is * additional work required to complete the request. */ -DEFINE_EVENT(block_rq_with_error, block_rq_complete, +TRACE_EVENT(block_rq_complete, - TP_PROTO(struct request_queue *q, struct request *rq), + TP_PROTO(struct request_queue *q, struct request *rq, + unsigned int nr_bytes), - TP_ARGS(q, rq) + TP_ARGS(q, rq, nr_bytes), + + TP_STRUCT__entry( + __field( dev_t, dev ) + __field( sector_t, sector ) + __field( unsigned int, nr_sector ) + __field( int, errors ) + __array( char, rwbs, RWBS_LEN ) + __dynamic_array( char, cmd, blk_cmd_buf_len(rq) ) + ), + + TP_fast_assign( + __entry->dev = rq->rq_disk ? disk_devt(rq->rq_disk) : 0; + __entry->sector = blk_rq_pos(rq); + __entry->nr_sector = nr_bytes >> 9; + __entry->errors = rq->errors; + + blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, nr_bytes); + blk_dump_cmd(__get_str(cmd), rq); + ), + + TP_printk("%d,%d %s (%s) %llu + %u [%d]", + MAJOR(__entry->dev), MINOR(__entry->dev), + __entry->rwbs, __get_str(cmd), + (unsigned long long)__entry->sector, + __entry->nr_sector, __entry->errors) ); DECLARE_EVENT_CLASS(block_rq, diff --git a/include/trace/events/btrfs.h b/include/trace/events/btrfs.h index 3176cdc32937..4ee4e30d26d9 100644 --- a/include/trace/events/btrfs.h +++ b/include/trace/events/btrfs.h @@ -21,6 +21,8 @@ struct btrfs_block_group_cache; struct btrfs_free_cluster; struct map_lookup; struct extent_buffer; +struct btrfs_work; +struct __btrfs_workqueue; #define show_ref_type(type) \ __print_symbolic(type, \ @@ -982,6 +984,141 @@ TRACE_EVENT(free_extent_state, (void *)__entry->ip) ); +DECLARE_EVENT_CLASS(btrfs__work, + + TP_PROTO(struct btrfs_work *work), + + TP_ARGS(work), + + TP_STRUCT__entry( + __field( void *, work ) + __field( void *, wq ) + __field( void *, func ) + __field( void *, ordered_func ) + __field( void *, ordered_free ) + ), + + TP_fast_assign( + __entry->work = work; + __entry->wq = work->wq; + __entry->func = work->func; + __entry->ordered_func = work->ordered_func; + __entry->ordered_free = work->ordered_free; + ), + + TP_printk("work=%p, wq=%p, func=%p, ordered_func=%p, ordered_free=%p", + __entry->work, __entry->wq, __entry->func, + __entry->ordered_func, __entry->ordered_free) +); + +/* For situiations that the work is freed */ +DECLARE_EVENT_CLASS(btrfs__work__done, + + TP_PROTO(struct btrfs_work *work), + + TP_ARGS(work), + + TP_STRUCT__entry( + __field( void *, work ) + ), + + TP_fast_assign( + __entry->work = work; + ), + + TP_printk("work->%p", __entry->work) +); + +DEFINE_EVENT(btrfs__work, btrfs_work_queued, + + TP_PROTO(struct btrfs_work *work), + + TP_ARGS(work) +); + +DEFINE_EVENT(btrfs__work, btrfs_work_sched, + + TP_PROTO(struct btrfs_work *work), + + TP_ARGS(work) +); + +DEFINE_EVENT(btrfs__work, btrfs_normal_work_done, + + TP_PROTO(struct btrfs_work *work), + + TP_ARGS(work) +); + +DEFINE_EVENT(btrfs__work__done, btrfs_all_work_done, + + TP_PROTO(struct btrfs_work *work), + + TP_ARGS(work) +); + +DEFINE_EVENT(btrfs__work, btrfs_ordered_sched, + + TP_PROTO(struct btrfs_work *work), + + TP_ARGS(work) +); + +DECLARE_EVENT_CLASS(btrfs__workqueue, + + TP_PROTO(struct __btrfs_workqueue *wq, const char *name, int high), + + TP_ARGS(wq, name, high), + + TP_STRUCT__entry( + __field( void *, wq ) + __string( name, name ) + __field( int , high ) + ), + + TP_fast_assign( + __entry->wq = wq; + __assign_str(name, name); + __entry->high = high; + ), + + TP_printk("name=%s%s, wq=%p", __get_str(name), + __print_flags(__entry->high, "", + {(WQ_HIGHPRI), "-high"}), + __entry->wq) +); + +DEFINE_EVENT(btrfs__workqueue, btrfs_workqueue_alloc, + + TP_PROTO(struct __btrfs_workqueue *wq, const char *name, int high), + + TP_ARGS(wq, name, high) +); + +DECLARE_EVENT_CLASS(btrfs__workqueue_done, + + TP_PROTO(struct __btrfs_workqueue *wq), + + TP_ARGS(wq), + + TP_STRUCT__entry( + __field( void *, wq ) + ), + + TP_fast_assign( + __entry->wq = wq; + ), + + TP_printk("wq=%p", __entry->wq) +); + +DEFINE_EVENT(btrfs__workqueue_done, btrfs_workqueue_destroy, + + TP_PROTO(struct __btrfs_workqueue *wq), + + TP_ARGS(wq) +); + #endif /* _TRACE_BTRFS_H */ /* This part must be outside protection */ diff --git a/include/trace/events/hswadsp.h b/include/trace/events/hswadsp.h new file mode 100644 index 000000000000..0f78bbb02002 --- /dev/null +++ b/include/trace/events/hswadsp.h @@ -0,0 +1,384 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM hswadsp + +#if !defined(_TRACE_HSWADSP_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_HSWADSP_H + +#include <linux/types.h> +#include <linux/ktime.h> +#include <linux/tracepoint.h> + +struct sst_hsw; +struct sst_hsw_stream; +struct sst_hsw_ipc_stream_free_req; +struct sst_hsw_ipc_volume_req; +struct sst_hsw_ipc_stream_alloc_req; +struct sst_hsw_audio_data_format_ipc; +struct sst_hsw_ipc_stream_info_reply; +struct sst_hsw_ipc_device_config_req; + +DECLARE_EVENT_CLASS(sst_irq, + + TP_PROTO(uint32_t status, uint32_t mask), + + TP_ARGS(status, mask), + + TP_STRUCT__entry( + __field( unsigned int, status ) + __field( unsigned int, mask ) + ), + + TP_fast_assign( + __entry->status = status; + __entry->mask = mask; + ), + + TP_printk("status 0x%8.8x mask 0x%8.8x", + (unsigned int)__entry->status, (unsigned int)__entry->mask) +); + +DEFINE_EVENT(sst_irq, sst_irq_busy, + + TP_PROTO(unsigned int status, unsigned int mask), + + TP_ARGS(status, mask) + +); + +DEFINE_EVENT(sst_irq, sst_irq_done, + + TP_PROTO(unsigned int status, unsigned int mask), + + TP_ARGS(status, mask) + +); + +DECLARE_EVENT_CLASS(ipc, + + TP_PROTO(const char *name, int val), + + TP_ARGS(name, val), + + TP_STRUCT__entry( + __string( name, name ) + __field( unsigned int, val ) + ), + + TP_fast_assign( + __assign_str(name, name); + __entry->val = val; + ), + + TP_printk("%s 0x%8.8x", __get_str(name), (unsigned int)__entry->val) + +); + +DEFINE_EVENT(ipc, ipc_request, + + TP_PROTO(const char *name, int val), + + TP_ARGS(name, val) + +); + +DEFINE_EVENT(ipc, ipc_reply, + + TP_PROTO(const char *name, int val), + + TP_ARGS(name, val) + +); + +DEFINE_EVENT(ipc, ipc_pending_reply, + + TP_PROTO(const char *name, int val), + + TP_ARGS(name, val) + +); + +DEFINE_EVENT(ipc, ipc_notification, + + TP_PROTO(const char *name, int val), + + TP_ARGS(name, val) + +); + +DEFINE_EVENT(ipc, ipc_error, + + TP_PROTO(const char *name, int val), + + TP_ARGS(name, val) + +); + +DECLARE_EVENT_CLASS(stream_position, + + TP_PROTO(unsigned int id, unsigned int pos), + + TP_ARGS(id, pos), + + TP_STRUCT__entry( + __field( unsigned int, id ) + __field( unsigned int, pos ) + ), + + TP_fast_assign( + __entry->id = id; + __entry->pos = pos; + ), + + TP_printk("id %d position 0x%x", + (unsigned int)__entry->id, (unsigned int)__entry->pos) +); + +DEFINE_EVENT(stream_position, stream_read_position, + + TP_PROTO(unsigned int id, unsigned int pos), + + TP_ARGS(id, pos) + +); + +DEFINE_EVENT(stream_position, stream_write_position, + + TP_PROTO(unsigned int id, unsigned int pos), + + TP_ARGS(id, pos) + +); + +TRACE_EVENT(hsw_stream_buffer, + + TP_PROTO(struct sst_hsw_stream *stream), + + TP_ARGS(stream), + + TP_STRUCT__entry( + __field( int, id ) + __field( int, pt_addr ) + __field( int, num_pages ) + __field( int, ring_size ) + __field( int, ring_offset ) + __field( int, first_pfn ) + ), + + TP_fast_assign( + __entry->id = stream->host_id; + __entry->pt_addr = stream->request.ringinfo.ring_pt_address; + __entry->num_pages = stream->request.ringinfo.num_pages; + __entry->ring_size = stream->request.ringinfo.ring_size; + __entry->ring_offset = stream->request.ringinfo.ring_offset; + __entry->first_pfn = stream->request.ringinfo.ring_first_pfn; + ), + + TP_printk("stream %d ring addr 0x%x pages %d size 0x%x offset 0x%x PFN 0x%x", + (int) __entry->id, (int)__entry->pt_addr, + (int)__entry->num_pages, (int)__entry->ring_size, + (int)__entry->ring_offset, (int)__entry->first_pfn) +); + +TRACE_EVENT(hsw_stream_alloc_reply, + + TP_PROTO(struct sst_hsw_stream *stream), + + TP_ARGS(stream), + + TP_STRUCT__entry( + __field( int, id ) + __field( int, stream_id ) + __field( int, mixer_id ) + __field( int, peak0 ) + __field( int, peak1 ) + __field( int, vol0 ) + __field( int, vol1 ) + ), + + TP_fast_assign( + __entry->id = stream->host_id; + __entry->stream_id = stream->reply.stream_hw_id; + __entry->mixer_id = stream->reply.mixer_hw_id; + __entry->peak0 = stream->reply.peak_meter_register_address[0]; + __entry->peak1 = stream->reply.peak_meter_register_address[1]; + __entry->vol0 = stream->reply.volume_register_address[0]; + __entry->vol1 = stream->reply.volume_register_address[1]; + ), + + TP_printk("stream %d hw id %d mixer %d peak 0x%x:0x%x vol 0x%x,0x%x", + (int) __entry->id, (int) __entry->stream_id, (int)__entry->mixer_id, + (int)__entry->peak0, (int)__entry->peak1, + (int)__entry->vol0, (int)__entry->vol1) +); + +TRACE_EVENT(hsw_mixer_info_reply, + + TP_PROTO(struct sst_hsw_ipc_stream_info_reply *reply), + + TP_ARGS(reply), + + TP_STRUCT__entry( + __field( int, mixer_id ) + __field( int, peak0 ) + __field( int, peak1 ) + __field( int, vol0 ) + __field( int, vol1 ) + ), + + TP_fast_assign( + __entry->mixer_id = reply->mixer_hw_id; + __entry->peak0 = reply->peak_meter_register_address[0]; + __entry->peak1 = reply->peak_meter_register_address[1]; + __entry->vol0 = reply->volume_register_address[0]; + __entry->vol1 = reply->volume_register_address[1]; + ), + + TP_printk("mixer id %d peak 0x%x:0x%x vol 0x%x,0x%x", + (int)__entry->mixer_id, + (int)__entry->peak0, (int)__entry->peak1, + (int)__entry->vol0, (int)__entry->vol1) +); + +TRACE_EVENT(hsw_stream_data_format, + + TP_PROTO(struct sst_hsw_stream *stream, + struct sst_hsw_audio_data_format_ipc *req), + + TP_ARGS(stream, req), + + TP_STRUCT__entry( + __field( uint32_t, id ) + __field( uint32_t, frequency ) + __field( uint32_t, bitdepth ) + __field( uint32_t, map ) + __field( uint32_t, config ) + __field( uint32_t, style ) + __field( uint8_t, ch_num ) + __field( uint8_t, valid_bit ) + ), + + TP_fast_assign( + __entry->id = stream->host_id; + __entry->frequency = req->frequency; + __entry->bitdepth = req->bitdepth; + __entry->map = req->map; + __entry->config = req->config; + __entry->style = req->style; + __entry->ch_num = req->ch_num; + __entry->valid_bit = req->valid_bit; + ), + + TP_printk("stream %d freq %d depth %d map 0x%x config 0x%x style 0x%x ch %d bits %d", + (int) __entry->id, (uint32_t)__entry->frequency, + (uint32_t)__entry->bitdepth, (uint32_t)__entry->map, + (uint32_t)__entry->config, (uint32_t)__entry->style, + (uint8_t)__entry->ch_num, (uint8_t)__entry->valid_bit) +); + +TRACE_EVENT(hsw_stream_alloc_request, + + TP_PROTO(struct sst_hsw_stream *stream, + struct sst_hsw_ipc_stream_alloc_req *req), + + TP_ARGS(stream, req), + + TP_STRUCT__entry( + __field( uint32_t, id ) + __field( uint8_t, path_id ) + __field( uint8_t, stream_type ) + __field( uint8_t, format_id ) + ), + + TP_fast_assign( + __entry->id = stream->host_id; + __entry->path_id = req->path_id; + __entry->stream_type = req->stream_type; + __entry->format_id = req->format_id; + ), + + TP_printk("stream %d path %d type %d format %d", + (int) __entry->id, (uint8_t)__entry->path_id, + (uint8_t)__entry->stream_type, (uint8_t)__entry->format_id) +); + +TRACE_EVENT(hsw_stream_free_req, + + TP_PROTO(struct sst_hsw_stream *stream, + struct sst_hsw_ipc_stream_free_req *req), + + TP_ARGS(stream, req), + + TP_STRUCT__entry( + __field( int, id ) + __field( int, stream_id ) + ), + + TP_fast_assign( + __entry->id = stream->host_id; + __entry->stream_id = req->stream_id; + ), + + TP_printk("stream %d hw id %d", + (int) __entry->id, (int) __entry->stream_id) +); + +TRACE_EVENT(hsw_volume_req, + + TP_PROTO(struct sst_hsw_stream *stream, + struct sst_hsw_ipc_volume_req *req), + + TP_ARGS(stream, req), + + TP_STRUCT__entry( + __field( int, id ) + __field( uint32_t, channel ) + __field( uint32_t, target_volume ) + __field( uint64_t, curve_duration ) + __field( uint32_t, curve_type ) + ), + + TP_fast_assign( + __entry->id = stream->host_id; + __entry->channel = req->channel; + __entry->target_volume = req->target_volume; + __entry->curve_duration = req->curve_duration; + __entry->curve_type = req->curve_type; + ), + + TP_printk("stream %d chan 0x%x vol %d duration %llu type %d", + (int) __entry->id, (uint32_t) __entry->channel, + (uint32_t)__entry->target_volume, + (uint64_t)__entry->curve_duration, + (uint32_t)__entry->curve_type) +); + +TRACE_EVENT(hsw_device_config_req, + + TP_PROTO(struct sst_hsw_ipc_device_config_req *req), + + TP_ARGS(req), + + TP_STRUCT__entry( + __field( uint32_t, ssp ) + __field( uint32_t, clock_freq ) + __field( uint32_t, mode ) + __field( uint16_t, clock_divider ) + ), + + TP_fast_assign( + __entry->ssp = req->ssp_interface; + __entry->clock_freq = req->clock_frequency; + __entry->mode = req->mode; + __entry->clock_divider = req->clock_divider; + ), + + TP_printk("SSP %d Freq %d mode %d div %d", + (uint32_t)__entry->ssp, + (uint32_t)__entry->clock_freq, (uint32_t)__entry->mode, + (uint32_t)__entry->clock_divider) +); + +#endif /* _TRACE_HSWADSP_H */ + +/* This part must be outside protection */ +#include <trace/define_trace.h> diff --git a/include/trace/events/intel-sst.h b/include/trace/events/intel-sst.h new file mode 100644 index 000000000000..76c72d3f1902 --- /dev/null +++ b/include/trace/events/intel-sst.h @@ -0,0 +1,148 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM intel-sst + +#if !defined(_TRACE_INTEL_SST_H) || defined(TRACE_HEADER_MULTI_READ) +#define _TRACE_INTEL_SST_H + +#include <linux/types.h> +#include <linux/ktime.h> +#include <linux/tracepoint.h> + +DECLARE_EVENT_CLASS(sst_ipc_msg, + + TP_PROTO(unsigned int val), + + TP_ARGS(val), + + TP_STRUCT__entry( + __field( unsigned int, val ) + ), + + TP_fast_assign( + __entry->val = val; + ), + + TP_printk("0x%8.8x", (unsigned int)__entry->val) +); + +DEFINE_EVENT(sst_ipc_msg, sst_ipc_msg_tx, + + TP_PROTO(unsigned int val), + + TP_ARGS(val) + +); + +DEFINE_EVENT(sst_ipc_msg, sst_ipc_msg_rx, + + TP_PROTO(unsigned int val), + + TP_ARGS(val) + +); + +DECLARE_EVENT_CLASS(sst_ipc_mailbox, + + TP_PROTO(unsigned int offset, unsigned int val), + + TP_ARGS(offset, val), + + TP_STRUCT__entry( + __field( unsigned int, offset ) + __field( unsigned int, val ) + ), + + TP_fast_assign( + __entry->offset = offset; + __entry->val = val; + ), + + TP_printk(" 0x%4.4x = 0x%8.8x", + (unsigned int)__entry->offset, (unsigned int)__entry->val) +); + +DEFINE_EVENT(sst_ipc_mailbox, sst_ipc_inbox_rdata, + + TP_PROTO(unsigned int offset, unsigned int val), + + TP_ARGS(offset, val) + +); + +DEFINE_EVENT(sst_ipc_mailbox, sst_ipc_inbox_wdata, + + TP_PROTO(unsigned int offset, unsigned int val), + + TP_ARGS(offset, val) + +); + +DEFINE_EVENT(sst_ipc_mailbox, sst_ipc_outbox_rdata, + + TP_PROTO(unsigned int offset, unsigned int val), + + TP_ARGS(offset, val) + +); + +DEFINE_EVENT(sst_ipc_mailbox, sst_ipc_outbox_wdata, + + TP_PROTO(unsigned int offset, unsigned int val), + + TP_ARGS(offset, val) + +); + +DECLARE_EVENT_CLASS(sst_ipc_mailbox_info, + + TP_PROTO(unsigned int size), + + TP_ARGS(size), + + TP_STRUCT__entry( + __field( unsigned int, size ) + ), + + TP_fast_assign( + __entry->size = size; + ), + + TP_printk("Mailbox bytes 0x%8.8x", (unsigned int)__entry->size) +); + +DEFINE_EVENT(sst_ipc_mailbox_info, sst_ipc_inbox_read, + + TP_PROTO(unsigned int size), + + TP_ARGS(size) + +); + +DEFINE_EVENT(sst_ipc_mailbox_info, sst_ipc_inbox_write, + + TP_PROTO(unsigned int size), + + TP_ARGS(size) + +); + +DEFINE_EVENT(sst_ipc_mailbox_info, sst_ipc_outbox_read, + + TP_PROTO(unsigned int size), + + TP_ARGS(size) + +); + +DEFINE_EVENT(sst_ipc_mailbox_info, sst_ipc_outbox_write, + + TP_PROTO(unsigned int size), + + TP_ARGS(size) + +); + +#endif /* _TRACE_SST_H */ + +/* This part must be outside protection */ +#include <trace/define_trace.h> diff --git a/include/trace/events/migrate.h b/include/trace/events/migrate.h index 3075ffbb9a83..4e4f2f8b1ac2 100644 --- a/include/trace/events/migrate.h +++ b/include/trace/events/migrate.h @@ -4,6 +4,8 @@ #if !defined(_TRACE_MIGRATE_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_MIGRATE_H +#include <linux/tracepoint.h> + #define MIGRATE_MODE \ {MIGRATE_ASYNC, "MIGRATE_ASYNC"}, \ {MIGRATE_SYNC_LIGHT, "MIGRATE_SYNC_LIGHT"}, \ diff --git a/include/trace/events/net.h b/include/trace/events/net.h index a34f27b2e394..1de256b35807 100644 --- a/include/trace/events/net.h +++ b/include/trace/events/net.h @@ -153,8 +153,8 @@ DECLARE_EVENT_CLASS(net_dev_rx_verbose_template, __field( u16, vlan_tci ) __field( u16, protocol ) __field( u8, ip_summed ) - __field( u32, rxhash ) - __field( bool, l4_rxhash ) + __field( u32, hash ) + __field( bool, l4_hash ) __field( unsigned int, len ) __field( unsigned int, data_len ) __field( unsigned int, truesize ) @@ -179,8 +179,8 @@ DECLARE_EVENT_CLASS(net_dev_rx_verbose_template, __entry->vlan_tci = vlan_tx_tag_get(skb); __entry->protocol = ntohs(skb->protocol); __entry->ip_summed = skb->ip_summed; - __entry->rxhash = skb->rxhash; - __entry->l4_rxhash = skb->l4_rxhash; + __entry->hash = skb->hash; + __entry->l4_hash = skb->l4_hash; __entry->len = skb->len; __entry->data_len = skb->data_len; __entry->truesize = skb->truesize; @@ -191,11 +191,11 @@ DECLARE_EVENT_CLASS(net_dev_rx_verbose_template, __entry->gso_type = skb_shinfo(skb)->gso_type; ), - TP_printk("dev=%s napi_id=%#x queue_mapping=%u skbaddr=%p vlan_tagged=%d vlan_proto=0x%04x vlan_tci=0x%04x protocol=0x%04x ip_summed=%d rxhash=0x%08x l4_rxhash=%d len=%u data_len=%u truesize=%u mac_header_valid=%d mac_header=%d nr_frags=%d gso_size=%d gso_type=%#x", + TP_printk("dev=%s napi_id=%#x queue_mapping=%u skbaddr=%p vlan_tagged=%d vlan_proto=0x%04x vlan_tci=0x%04x protocol=0x%04x ip_summed=%d hash=0x%08x l4_hash=%d len=%u data_len=%u truesize=%u mac_header_valid=%d mac_header=%d nr_frags=%d gso_size=%d gso_type=%#x", __get_str(name), __entry->napi_id, __entry->queue_mapping, __entry->skbaddr, __entry->vlan_tagged, __entry->vlan_proto, __entry->vlan_tci, __entry->protocol, __entry->ip_summed, - __entry->rxhash, __entry->l4_rxhash, __entry->len, + __entry->hash, __entry->l4_hash, __entry->len, __entry->data_len, __entry->truesize, __entry->mac_header_valid, __entry->mac_header, __entry->nr_frags, __entry->gso_size, __entry->gso_type) diff --git a/include/trace/events/power.h b/include/trace/events/power.h index 9e9475c85de5..9a7e08d61258 100644 --- a/include/trace/events/power.h +++ b/include/trace/events/power.h @@ -42,7 +42,6 @@ TRACE_EVENT(pstate_sample, u32 state, u64 mperf, u64 aperf, - u32 energy, u32 freq ), @@ -51,7 +50,6 @@ TRACE_EVENT(pstate_sample, state, mperf, aperf, - energy, freq ), @@ -61,7 +59,6 @@ TRACE_EVENT(pstate_sample, __field(u32, state) __field(u64, mperf) __field(u64, aperf) - __field(u32, energy) __field(u32, freq) ), @@ -72,17 +69,15 @@ TRACE_EVENT(pstate_sample, __entry->state = state; __entry->mperf = mperf; __entry->aperf = aperf; - __entry->energy = energy; __entry->freq = freq; ), - TP_printk("core_busy=%lu scaled=%lu state=%lu mperf=%llu aperf=%llu energy=%lu freq=%lu ", + TP_printk("core_busy=%lu scaled=%lu state=%lu mperf=%llu aperf=%llu freq=%lu ", (unsigned long)__entry->core_busy, (unsigned long)__entry->scaled_busy, (unsigned long)__entry->state, (unsigned long long)__entry->mperf, (unsigned long long)__entry->aperf, - (unsigned long)__entry->energy, (unsigned long)__entry->freq ) @@ -412,8 +407,8 @@ DECLARE_EVENT_CLASS(dev_pm_qos_request, TP_printk("device=%s type=%s new_value=%d", __get_str(name), __print_symbolic(__entry->type, - { DEV_PM_QOS_LATENCY, "DEV_PM_QOS_LATENCY" }, - { DEV_PM_QOS_FLAGS, "DEV_PM_QOS_FLAGS" }), + { DEV_PM_QOS_RESUME_LATENCY, "DEV_PM_QOS_RESUME_LATENCY" }, + { DEV_PM_QOS_FLAGS, "DEV_PM_QOS_FLAGS" }), __entry->new_value) ); diff --git a/include/trace/events/sunrpc.h b/include/trace/events/sunrpc.h index ddc179b7a105..1fef3e6e9436 100644 --- a/include/trace/events/sunrpc.h +++ b/include/trace/events/sunrpc.h @@ -83,7 +83,7 @@ DECLARE_EVENT_CLASS(rpc_task_running, ), TP_fast_assign( - __entry->client_id = clnt->cl_clid; + __entry->client_id = clnt ? clnt->cl_clid : -1; __entry->task_id = task->tk_pid; __entry->action = action; __entry->runstate = task->tk_runstate; @@ -91,7 +91,7 @@ DECLARE_EVENT_CLASS(rpc_task_running, __entry->flags = task->tk_flags; ), - TP_printk("task:%u@%u flags=%4.4x state=%4.4lx status=%d action=%pf", + TP_printk("task:%u@%d flags=%4.4x state=%4.4lx status=%d action=%pf", __entry->task_id, __entry->client_id, __entry->flags, __entry->runstate, diff --git a/include/trace/events/v4l2.h b/include/trace/events/v4l2.h index ef94ecad1c94..b9bb1f204693 100644 --- a/include/trace/events/v4l2.h +++ b/include/trace/events/v4l2.h @@ -18,6 +18,7 @@ { V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY, "VIDEO_OUTPUT_OVERLAY" },\ { V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, "VIDEO_CAPTURE_MPLANE" },\ { V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, "VIDEO_OUTPUT_MPLANE" }, \ + { V4L2_BUF_TYPE_SDR_CAPTURE, "SDR_CAPTURE" }, \ { V4L2_BUF_TYPE_PRIVATE, "PRIVATE" }) #define show_field(field) \ diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h index c7bbbe794e65..cee02d65ab3f 100644 --- a/include/trace/events/writeback.h +++ b/include/trace/events/writeback.h @@ -4,6 +4,7 @@ #if !defined(_TRACE_WRITEBACK_H) || defined(TRACE_HEADER_MULTI_READ) #define _TRACE_WRITEBACK_H +#include <linux/tracepoint.h> #include <linux/backing-dev.h> #include <linux/writeback.h> @@ -287,11 +288,11 @@ TRACE_EVENT(writeback_queue_io, __field(int, reason) ), TP_fast_assign( - unsigned long older_than_this = work->older_than_this; + unsigned long *older_than_this = work->older_than_this; strncpy(__entry->name, dev_name(wb->bdi->dev), 32); - __entry->older = older_than_this; + __entry->older = older_than_this ? *older_than_this : 0; __entry->age = older_than_this ? - (jiffies - older_than_this) * 1000 / HZ : -1; + (jiffies - *older_than_this) * 1000 / HZ : -1; __entry->moved = moved; __entry->reason = work->reason; ), diff --git a/include/trace/ftrace.h b/include/trace/ftrace.h index 1a8b28db3775..8765126b328c 100644 --- a/include/trace/ftrace.h +++ b/include/trace/ftrace.h @@ -265,11 +265,9 @@ static notrace enum print_line_t \ ftrace_raw_output_##call(struct trace_iterator *iter, int flags, \ struct trace_event *event) \ { \ - struct trace_seq *s = &iter->seq; \ struct ftrace_raw_##template *field; \ struct trace_entry *entry; \ struct trace_seq *p = &iter->tmp_seq; \ - int ret; \ \ entry = iter->ent; \ \ @@ -281,13 +279,7 @@ ftrace_raw_output_##call(struct trace_iterator *iter, int flags, \ field = (typeof(field))entry; \ \ trace_seq_init(p); \ - ret = trace_seq_printf(s, "%s: ", #call); \ - if (ret) \ - ret = trace_seq_printf(s, print); \ - if (!ret) \ - return TRACE_TYPE_PARTIAL_LINE; \ - \ - return TRACE_TYPE_HANDLED; \ + return ftrace_output_call(iter, #call, print); \ } \ static struct trace_event_functions ftrace_event_type_funcs_##call = { \ .trace = ftrace_raw_output_##call, \ @@ -310,15 +302,12 @@ static struct trace_event_functions ftrace_event_type_funcs_##call = { \ #undef __array #define __array(type, item, len) \ do { \ - mutex_lock(&event_storage_mutex); \ + char *type_str = #type"["__stringify(len)"]"; \ BUILD_BUG_ON(len > MAX_FILTER_STR_VAL); \ - snprintf(event_storage, sizeof(event_storage), \ - "%s[%d]", #type, len); \ - ret = trace_define_field(event_call, event_storage, #item, \ + ret = trace_define_field(event_call, type_str, #item, \ offsetof(typeof(field), item), \ sizeof(field.item), \ is_signed_type(type), FILTER_OTHER); \ - mutex_unlock(&event_storage_mutex); \ if (ret) \ return ret; \ } while (0); @@ -373,10 +362,11 @@ ftrace_define_fields_##call(struct ftrace_event_call *event_call) \ #undef __dynamic_array #define __dynamic_array(type, item, len) \ + __item_length = (len) * sizeof(type); \ __data_offsets->item = __data_size + \ offsetof(typeof(*entry), __data); \ - __data_offsets->item |= (len * sizeof(type)) << 16; \ - __data_size += (len) * sizeof(type); + __data_offsets->item |= __item_length << 16; \ + __data_size += __item_length; #undef __string #define __string(item, src) __dynamic_array(char, item, \ @@ -388,6 +378,7 @@ static inline notrace int ftrace_get_offsets_##call( \ struct ftrace_data_offsets_##call *__data_offsets, proto) \ { \ int __data_size = 0; \ + int __maybe_unused __item_length; \ struct ftrace_raw_##call __maybe_unused *entry; \ \ tstruct; \ @@ -544,37 +535,27 @@ static notrace void \ ftrace_raw_event_##call(void *__data, proto) \ { \ struct ftrace_event_file *ftrace_file = __data; \ - struct ftrace_event_call *event_call = ftrace_file->event_call; \ struct ftrace_data_offsets_##call __maybe_unused __data_offsets;\ - struct ring_buffer_event *event; \ + struct ftrace_event_buffer fbuffer; \ struct ftrace_raw_##call *entry; \ - struct ring_buffer *buffer; \ - unsigned long irq_flags; \ int __data_size; \ - int pc; \ \ if (ftrace_trigger_soft_disabled(ftrace_file)) \ return; \ \ - local_save_flags(irq_flags); \ - pc = preempt_count(); \ - \ __data_size = ftrace_get_offsets_##call(&__data_offsets, args); \ \ - event = trace_event_buffer_lock_reserve(&buffer, ftrace_file, \ - event_call->event.type, \ - sizeof(*entry) + __data_size, \ - irq_flags, pc); \ - if (!event) \ + entry = ftrace_event_buffer_reserve(&fbuffer, ftrace_file, \ + sizeof(*entry) + __data_size); \ + \ + if (!entry) \ return; \ - entry = ring_buffer_event_data(event); \ \ tstruct \ \ { assign; } \ \ - event_trigger_unlock_commit(ftrace_file, buffer, event, entry, \ - irq_flags, pc); \ + ftrace_event_buffer_commit(&fbuffer); \ } /* * The ftrace_test_probe is compiled out, it is only here as a build time check |