Additional kernel probes
Quoted 1 line · * Woegerer, Paul ([email protected]) wrote:
Hi Mathieu,
Hi Paul,
Great ! A couple of early comments below,
Quoted 9 lines
we created a set of additional kernel probes for LTTng 2.0.
The patch below adds asoc, ext3, gpio, jbd, jbd2, kmem, lock, module, napi, net, power, regulator, scsi, skb, sock, udp, vmscan probes to LTTng 2.0.
The probes are verified to compile against all kernel versions from 3.0 to 3.6 (3.7-rc5 also works).
LTTng-modules states that 2.6.38 and 2.6.39 are supported too. Could you test those against these two kernel versions too ?
More below,
Quoted 155 lines
From
0f8a89285458f19c627c018d37891fafa9819fcaMon Sep 17 00:00:00 2001
From: Paul Woegerer <[email protected]>
Date: Mon, 12 Nov 2012 14:07:12 +0100
Subject: [PATCH] Add kernel probes for asoc, ext3, gpio, jbd, jbd2, kmem,
lock, module, napi, net, power, regulator, scsi, skb, sock, udp, vmscan.--- instrumentation/events/lttng-module/asoc.h | 340 ++++++ instrumentation/events/lttng-module/ext3.h | 870 +++++++++++++++ instrumentation/events/lttng-module/gpio.h | 56 + instrumentation/events/lttng-module/jbd.h | 243 +++++ instrumentation/events/lttng-module/jbd2.h | 238 ++++ instrumentation/events/lttng-module/kmem.h | 304 ++++++ instrumentation/events/lttng-module/lock.h | 86 ++ instrumentation/events/lttng-module/module.h | 134 +++ instrumentation/events/lttng-module/napi.h | 38 + instrumentation/events/lttng-module/net.h | 84 ++ instrumentation/events/lttng-module/power.h | 240 ++++ instrumentation/events/lttng-module/regulator.h | 141 +++ instrumentation/events/lttng-module/scsi.h | 369 +++++++ instrumentation/events/lttng-module/skb.h | 75 ++ instrumentation/events/lttng-module/sock.h | 68 ++ instrumentation/events/lttng-module/udp.h | 32 + instrumentation/events/lttng-module/vmscan.h | 499 +++++++++ instrumentation/events/mainline/asoc.h | 330 ++++++ instrumentation/events/mainline/ext3.h | 864 +++++++++++++++ instrumentation/events/mainline/fs_ext3.h | 1323 +++++++++++++++++++++++ instrumentation/events/mainline/gpio.h | 56 + instrumentation/events/mainline/jbd.h | 203 ++++ instrumentation/events/mainline/jbd2.h | 235 ++++ instrumentation/events/mainline/kmem.h | 308 ++++++ instrumentation/events/mainline/lock.h | 86 ++ instrumentation/events/mainline/module.h | 131 +++ instrumentation/events/mainline/napi.h | 38 + instrumentation/events/mainline/net.h | 84 ++ instrumentation/events/mainline/power.h | 240 ++++ instrumentation/events/mainline/regulator.h | 141 +++ instrumentation/events/mainline/scsi.h | 365 +++++++ instrumentation/events/mainline/skb.h | 75 ++ instrumentation/events/mainline/sock.h | 68 ++ instrumentation/events/mainline/udp.h | 32 + instrumentation/events/mainline/vmscan.h | 477 ++++++++ probes/Makefile | 72 ++ probes/lttng-probe-asoc.c | 45 + probes/lttng-probe-ext3.c | 56 + probes/lttng-probe-gpio.c | 43 + probes/lttng-probe-jbd.c | 44 + probes/lttng-probe-jbd2.c | 43 + probes/lttng-probe-kmem.c | 43 + probes/lttng-probe-lock.c | 43 + probes/lttng-probe-module.c | 43 + probes/lttng-probe-napi.c | 43 + probes/lttng-probe-net.c | 43 + probes/lttng-probe-power.c | 43 + probes/lttng-probe-regulator.c | 43 + probes/lttng-probe-scsi.c | 44 + probes/lttng-probe-skb.c | 43 + probes/lttng-probe-sock.c | 43 + probes/lttng-probe-udp.c | 43 + probes/lttng-probe-vmscan.c | 48 + 53 files changed, 9698 insertions(+) create mode 100644 instrumentation/events/lttng-module/asoc.h create mode 100644 instrumentation/events/lttng-module/ext3.h create mode 100644 instrumentation/events/lttng-module/gpio.h create mode 100644 instrumentation/events/lttng-module/jbd.h create mode 100644 instrumentation/events/lttng-module/jbd2.h create mode 100644 instrumentation/events/lttng-module/kmem.h create mode 100644 instrumentation/events/lttng-module/lock.h create mode 100644 instrumentation/events/lttng-module/module.h create mode 100644 instrumentation/events/lttng-module/napi.h create mode 100644 instrumentation/events/lttng-module/net.h create mode 100644 instrumentation/events/lttng-module/power.h create mode 100644 instrumentation/events/lttng-module/regulator.h create mode 100644 instrumentation/events/lttng-module/scsi.h create mode 100644 instrumentation/events/lttng-module/skb.h create mode 100644 instrumentation/events/lttng-module/sock.h create mode 100644 instrumentation/events/lttng-module/udp.h create mode 100644 instrumentation/events/lttng-module/vmscan.h create mode 100644 instrumentation/events/mainline/asoc.h create mode 100644 instrumentation/events/mainline/ext3.h create mode 100644 instrumentation/events/mainline/fs_ext3.h create mode 100644 instrumentation/events/mainline/gpio.h create mode 100644 instrumentation/events/mainline/jbd.h create mode 100644 instrumentation/events/mainline/jbd2.h create mode 100644 instrumentation/events/mainline/kmem.h create mode 100644 instrumentation/events/mainline/lock.h create mode 100644 instrumentation/events/mainline/module.h create mode 100644 instrumentation/events/mainline/napi.h create mode 100644 instrumentation/events/mainline/net.h create mode 100644 instrumentation/events/mainline/power.h create mode 100644 instrumentation/events/mainline/regulator.h create mode 100644 instrumentation/events/mainline/scsi.h create mode 100644 instrumentation/events/mainline/skb.h create mode 100644 instrumentation/events/mainline/sock.h create mode 100644 instrumentation/events/mainline/udp.h create mode 100644 instrumentation/events/mainline/vmscan.h create mode 100644 probes/lttng-probe-asoc.c create mode 100644 probes/lttng-probe-ext3.c create mode 100644 probes/lttng-probe-gpio.c create mode 100644 probes/lttng-probe-jbd.c create mode 100644 probes/lttng-probe-jbd2.c create mode 100644 probes/lttng-probe-kmem.c create mode 100644 probes/lttng-probe-lock.c create mode 100644 probes/lttng-probe-module.c create mode 100644 probes/lttng-probe-napi.c create mode 100644 probes/lttng-probe-net.c create mode 100644 probes/lttng-probe-power.c create mode 100644 probes/lttng-probe-regulator.c create mode 100644 probes/lttng-probe-scsi.c create mode 100644 probes/lttng-probe-skb.c create mode 100644 probes/lttng-probe-sock.c create mode 100644 probes/lttng-probe-udp.c create mode 100644 probes/lttng-probe-vmscan.cinstrumentation/events/lttng-module/asoc.h new file +33
-0@@ -0,0 +1,340 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM asoc + +#if !defined(_TRACE_ASOC_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_ASOC_H + +#include <linux/ktime.h> +#include <linux/tracepoint.h> +#include <linux/version.h> + +#ifndef _TRACE_ASOC_DEF +#define _TRACE_ASOC_DEF +struct snd_soc_jack ; +struct snd_soc_codec ; +#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,1 ,0 )) +struct snd_soc_platform ; +#endif +struct snd_soc_card ; +struct snd_soc_dapm_widget ; +#endif + +/* +* Log register events +*/ +DECLARE_EVENT_CLASS(snd_soc_reg, + + TP_PROTO(struct snd_soc_codec *codec, unsigned int reg, + unsigned int val), + + TP_ARGS(codec, reg, val), + + TP_STRUCT__entry( + __string( name, codec->name )
instrumentation/events/lttng-module/asoc.h line 43
Quoted 10 lines
instrumentation/events/lttng-module/asoc.h new file +10
-0+ __field( int, id ) + __field( unsigned int, reg ) +__field (unsigned int , val ) + ), + +TP_fast_assign ( + tp_strcpy(name, codec->name); +tp_assign (id, codec->id); +tp_assign (reg, reg); +tp_assign (val, val);
lttng-modules TP_fast_assign() section should not have semicolumn at the end of lines, e.g.:
TP_fast_assign(
tp_strcpy(name, codec->name)
tp_assign(id, codec->id)
tp_assign(reg, reg)
tp_assign(val, val)
)Thanks,
Mathieu
Quoted 9,993 lines
instrumentation/events/lttng-module/asoc.h new file +297
-0+ ), + + TP_printk("codec=%s.%d reg=%x val=%x", __get_str(name), + (int)__entry->id, (unsigned int)__entry->reg, + (unsigned int)__entry->val) +) + +DEFINE_EVENT(snd_soc_reg, snd_soc_reg_write, + + TP_PROTO(struct snd_soc_codec *codec, unsigned int reg, + unsigned int val), + + TP_ARGS(codec, reg, val) + +) + +DEFINE_EVENT (snd_soc_reg, snd_soc_reg_read, + + TP_PROTO(struct snd_soc_codec *codec, unsigned int reg, + unsigned int val), + +TP_ARGS (codec, reg, val) + +) + +#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,1 ,0 )) +DECLARE_EVENT_CLASS (snd_soc_preg, + + TP_PROTO(struct snd_soc_platform *platform, unsigned int reg, + unsigned int val), + +TP_ARGS (platform, reg, val), + +TP_STRUCT__entry ( + __string( name, platform->name ) + __field( int, id ) + __field( unsigned int, reg ) + __field( unsigned int, val ) + ), + +TP_fast_assign ( + tp_strcpy(name, platform->name); + tp_assign(id, platform->id); + tp_assign(reg, reg); + tp_assign(val, val); + ), + +TP_printk ("platform=%s.%d reg=%x val=%x" ,__get_str (name), + (int )__entry->id, (unsigned int )__entry->reg, + (unsigned int )__entry->val) +) + +DEFINE_EVENT (snd_soc_preg, snd_soc_preg_write, + + TP_PROTO(struct snd_soc_platform *platform, unsigned int reg, + unsigned int val), + +TP_ARGS (platform, reg, val) + +) + +DEFINE_EVENT (snd_soc_preg, snd_soc_preg_read, + + TP_PROTO(struct snd_soc_platform *platform, unsigned int reg, + unsigned int val), + +TP_ARGS (platform, reg, val) + +) +#endif + +DECLARE_EVENT_CLASS (snd_soc_card, + + TP_PROTO(struct snd_soc_card *card, int val), + +TP_ARGS (card, val), + +TP_STRUCT__entry ( + __string( name, card->name ) +__field ( int, val ) + ), + +TP_fast_assign ( + tp_strcpy(name, card->name); + tp_assign(val, val); + ), + +TP_printk ("card=%s val=%d" ,__get_str (name), (int )__entry->val) +) + +DEFINE_EVENT (snd_soc_card, snd_soc_bias_level_start, + + TP_PROTO(struct snd_soc_card *card, int val), + +TP_ARGS (card, val) + +) + +DEFINE_EVENT (snd_soc_card, snd_soc_bias_level_done, + + TP_PROTO(struct snd_soc_card *card, int val), + +TP_ARGS (card, val) + +) + +DECLARE_EVENT_CLASS (snd_soc_dapm_basic, + + TP_PROTO(struct snd_soc_card *card), + +TP_ARGS (card), + +TP_STRUCT__entry ( +__string ( name, card->name ) + ), + +TP_fast_assign ( + tp_strcpy(name, card->name); + ), + +TP_printk ("card=%s" ,__get_str (name)) +) + +DEFINE_EVENT (snd_soc_dapm_basic, snd_soc_dapm_start, + + TP_PROTO(struct snd_soc_card *card), + +TP_ARGS (card) + +) + +DEFINE_EVENT (snd_soc_dapm_basic, snd_soc_dapm_done, + + TP_PROTO(struct snd_soc_card *card), + +TP_ARGS (card) + +) + +DECLARE_EVENT_CLASS (snd_soc_dapm_widget, + + TP_PROTO(struct snd_soc_dapm_widget *w, int val), + +TP_ARGS (w, val), + +TP_STRUCT__entry ( + __string( name, w->name ) +__field ( int, val ) + ), + +TP_fast_assign ( + tp_strcpy(name, w->name); + tp_assign(val, val); + ), + +TP_printk ("widget=%s val=%d" ,__get_str (name), + (int )__entry->val) +) + +DEFINE_EVENT (snd_soc_dapm_widget, snd_soc_dapm_widget_power, + + TP_PROTO(struct snd_soc_dapm_widget *w, int val), + +TP_ARGS (w, val) + +) + +DEFINE_EVENT (snd_soc_dapm_widget, snd_soc_dapm_widget_event_start, + + TP_PROTO(struct snd_soc_dapm_widget *w, int val), + +TP_ARGS (w, val) + +) + +DEFINE_EVENT (snd_soc_dapm_widget, snd_soc_dapm_widget_event_done, + + TP_PROTO(struct snd_soc_dapm_widget *w, int val), + +TP_ARGS (w, val) + +) + +#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,2 ,0 )) +TRACE_EVENT (snd_soc_dapm_walk_done, + + TP_PROTO(struct snd_soc_card *card), + +TP_ARGS (card), + +TP_STRUCT__entry ( + __string( name, card->name ) + __field( int, power_checks ) + __field( int, path_checks ) +__field ( int, neighbour_checks ) + ), + +TP_fast_assign ( + tp_strcpy(name, card->name); + tp_assign(power_checks, card->dapm_stats.power_checks); + tp_assign(path_checks, card->dapm_stats.path_checks); + tp_assign(neighbour_checks, card->dapm_stats.neighbour_checks); + ), + +TP_printk ("%s: checks %d power, %d path, %d neighbour" , +__get_str (name), (int )__entry->power_checks, + (int )__entry->path_checks, (int )__entry->neighbour_checks) +) +#endif + +TRACE_EVENT (snd_soc_jack_irq, + + TP_PROTO(const char *name), + +TP_ARGS (name), + +TP_STRUCT__entry ( +__string ( name, name ) + ), + +TP_fast_assign ( + tp_strcpy(name, name); + ), + +TP_printk ("%s" ,__get_str (name)) +) + +TRACE_EVENT (snd_soc_jack_report, + + TP_PROTO(struct snd_soc_jack *jack, int mask, int val), + +TP_ARGS (jack, mask, val), + +TP_STRUCT__entry ( + __string( name, jack->jack->name ) + __field( int, mask ) +__field ( int, val ) + ), + +TP_fast_assign ( + tp_strcpy(name, jack->jack->name); + tp_assign(mask, mask); + tp_assign(val, val); + ), + +TP_printk ("jack=%s %x/%x" ,__get_str (name), (int )__entry->val, + (int )__entry->mask) +) + +TRACE_EVENT (snd_soc_jack_notify, + + TP_PROTO(struct snd_soc_jack *jack, int val), + +TP_ARGS (jack, val), + +TP_STRUCT__entry ( + __string( name, jack->jack->name ) +__field ( int, val ) + ), + +TP_fast_assign ( + tp_strcpy(name, jack->jack->name); + tp_assign(val, val); + ), + +TP_printk ("jack=%s %x" ,__get_str (name), (int )__entry->val) +) + +TRACE_EVENT (snd_soc_cache_sync, + + TP_PROTO(struct snd_soc_codec *codec, const char *type, + const char *status), + +TP_ARGS (codec, type, status), + +TP_STRUCT__entry ( + __string( name, codec->name ) + __string( status, status ) + __string( type, type ) +__field ( int, id ) + ), + +TP_fast_assign ( + tp_strcpy(name, codec->name); + tp_strcpy(status, status); + tp_strcpy(type, type); + tp_assign(id, codec->id); + ), + +TP_printk ("codec=%s.%d type=%s status=%s" ,__get_str (name), + (int )__entry->id,__get_str (type),__get_str (status)) +) + +#endif /* _TRACE_ASOC_H */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/ext3.h new file +870
-0@@ -0,0 +1,870 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM ext3 + +#if !defined(_TRACE_EXT3_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_EXT3_H + +#include <linux/tracepoint.h> + +#ifndef _TRACE_EXT3_DEF +#define _TRACE_EXT3_DEF +static struct dentry *dentry; +#endif + + +TRACE_EVENT (ext3_free_inode, + TP_PROTO(struct inode *inode), + +TP_ARGS (inode), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field( umode_t, mode ) + __field( uid_t, uid ) + __field( gid_t, gid ) +__field ( blkcnt_t, blocks ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(mode, inode->i_mode); + tp_assign(uid, inode->i_uid); + tp_assign(gid, inode->i_gid); + tp_assign(blocks, inode->i_blocks); + ), + +TP_printk ("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + __entry->mode, __entry->uid, __entry->gid, + (unsigned long ) __entry->blocks) +) + +TRACE_EVENT (ext3_request_inode, + TP_PROTO(struct inode *dir, int mode), + +TP_ARGS (dir, mode), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, dir ) +__field ( umode_t, mode ) + ), + +TP_fast_assign ( + tp_assign(dev, dir->i_sb->s_dev); + tp_assign(dir, dir->i_ino); + tp_assign(mode, mode); + ), + +TP_printk ("dev %d,%d dir %lu mode 0%o" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->dir, __entry->mode) +) + +TRACE_EVENT (ext3_allocate_inode, + TP_PROTO(struct inode *inode, struct inode *dir, int mode), + +TP_ARGS (inode, dir, mode), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field( ino_t, dir ) +__field ( umode_t, mode ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(dir, dir->i_ino); + tp_assign(mode, mode); + ), + +TP_printk ("dev %d,%d ino %lu dir %lu mode 0%o" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + (unsigned long ) __entry->dir, __entry->mode) +) + +TRACE_EVENT (ext3_evict_inode, + TP_PROTO(struct inode *inode), + +TP_ARGS (inode), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) +__field ( int, nlink ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(nlink, inode->i_nlink); + ), + +TP_printk ("dev %d,%d ino %lu nlink %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, __entry->nlink) +) + +TRACE_EVENT (ext3_drop_inode, + TP_PROTO(struct inode *inode, int drop), + +TP_ARGS (inode, drop), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) +__field ( int, drop ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(drop, drop); + ), + +TP_printk ("dev %d,%d ino %lu drop %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, __entry->drop) +) + +TRACE_EVENT (ext3_mark_inode_dirty, + TP_PROTO(struct inode *inode, unsigned long IP), + +TP_ARGS (inode,IP ), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field(unsigned long, ip ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(ip, IP); + ), + +TP_printk ("dev %d,%d ino %lu caller %pF" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, (void *)__entry->ip) +) + +TRACE_EVENT (ext3_write_begin, + TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, + unsigned int flags), + +TP_ARGS (inode, pos, len, flags), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field( loff_t, pos ) + __field( unsigned int, len ) + __field( unsigned int, flags ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(pos, pos); + tp_assign(len, len); + tp_assign(flags, flags); + ), + +TP_printk ("dev %d,%d ino %lu pos %llu len %u flags %u" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + (unsigned long long ) __entry->pos, __entry->len, + __entry->flags) +) + +DECLARE_EVENT_CLASS (ext3__write_end, + TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, + unsigned int copied), + +TP_ARGS (inode, pos, len, copied), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field( loff_t, pos ) + __field( unsigned int, len ) + __field( unsigned int, copied ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(pos, pos); + tp_assign(len, len); + tp_assign(copied, copied); + ), + +TP_printk ("dev %d,%d ino %lu pos %llu len %u copied %u" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + (unsigned long long ) __entry->pos, __entry->len, + __entry->copied) +) + +DEFINE_EVENT (ext3__write_end, ext3_ordered_write_end, + + TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, + unsigned int copied), + +TP_ARGS (inode, pos, len, copied) +) + +DEFINE_EVENT (ext3__write_end, ext3_writeback_write_end, + + TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, + unsigned int copied), + +TP_ARGS (inode, pos, len, copied) +) + +DEFINE_EVENT (ext3__write_end, ext3_journalled_write_end, + + TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, + unsigned int copied), + +TP_ARGS (inode, pos, len, copied) +) + +DECLARE_EVENT_CLASS (ext3__page_op, + TP_PROTO(struct page *page), + +TP_ARGS (page), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) +__field ( pgoff_t, index ) + + ), + +TP_fast_assign ( + tp_assign(index, page->index); + tp_assign(ino, page->mapping->host->i_ino); + tp_assign(dev, page->mapping->host->i_sb->s_dev); + ), + +TP_printk ("dev %d,%d ino %lu page_index %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, __entry->index) +) + +DEFINE_EVENT (ext3__page_op, ext3_ordered_writepage, + + TP_PROTO(struct page *page), + +TP_ARGS (page) +) + +DEFINE_EVENT (ext3__page_op, ext3_writeback_writepage, + + TP_PROTO(struct page *page), + +TP_ARGS (page) +) + +DEFINE_EVENT (ext3__page_op, ext3_journalled_writepage, + + TP_PROTO(struct page *page), + +TP_ARGS (page) +) + +DEFINE_EVENT (ext3__page_op, ext3_readpage, + + TP_PROTO(struct page *page), + +TP_ARGS (page) +) + +DEFINE_EVENT (ext3__page_op, ext3_releasepage, + + TP_PROTO(struct page *page), + +TP_ARGS (page) +) + +TRACE_EVENT (ext3_invalidatepage, + TP_PROTO(struct page *page, unsigned long offset), + +TP_ARGS (page, offset), + +TP_STRUCT__entry ( + __field( pgoff_t, index ) + __field( unsigned long, offset ) + __field( ino_t, ino ) +__field ( dev_t, dev ) + + ), + +TP_fast_assign ( + tp_assign(index, page->index); + tp_assign(offset, offset); + tp_assign(ino, page->mapping->host->i_ino); + tp_assign(dev, page->mapping->host->i_sb->s_dev); + ), + +TP_printk ("dev %d,%d ino %lu page_index %lu offset %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + __entry->index, __entry->offset) +) + +TRACE_EVENT (ext3_discard_blocks, + TP_PROTO(struct super_block *sb, unsigned long blk, + unsigned long count), + +TP_ARGS (sb, blk, count), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( unsigned long, blk ) + __field( unsigned long, count ) + + ), + +TP_fast_assign ( + tp_assign(dev, sb->s_dev); + tp_assign(blk, blk); + tp_assign(count, count); + ), + +TP_printk ("dev %d,%d blk %lu count %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->blk, __entry->count) +) + +TRACE_EVENT (ext3_request_blocks, + TP_PROTO(struct inode *inode, unsigned long goal, + unsigned long count), + +TP_ARGS (inode, goal, count), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field( unsigned long, count ) + __field( unsigned long, goal ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(count, count); + tp_assign(goal, goal); + ), + +TP_printk ("dev %d,%d ino %lu count %lu goal %lu " , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + __entry->count, __entry->goal) +) + +TRACE_EVENT (ext3_allocate_blocks, + TP_PROTO(struct inode *inode, unsigned long goal, + unsigned long count, unsigned long block), + +TP_ARGS (inode, goal, count, block), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field( unsigned long, block ) + __field( unsigned long, count ) + __field( unsigned long, goal ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(block, block); + tp_assign(count, count); + tp_assign(goal, goal); + ), + +TP_printk ("dev %d,%d ino %lu count %lu block %lu goal %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + __entry->count, __entry->block, + __entry->goal) +) + +TRACE_EVENT (ext3_free_blocks, + TP_PROTO(struct inode *inode, unsigned long block, + unsigned long count), + +TP_ARGS (inode, block, count), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field( umode_t, mode ) + __field( unsigned long, block ) + __field( unsigned long, count ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(mode, inode->i_mode); + tp_assign(block, block); + tp_assign(count, count); + ), + +TP_printk ("dev %d,%d ino %lu mode 0%o block %lu count %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + __entry->mode, __entry->block, __entry->count) +) + +TRACE_EVENT (ext3_sync_file_enter, + TP_PROTO(struct file *file, int datasync), + +TP_ARGS (file, datasync), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field( ino_t, parent ) +__field ( int, datasync ) + ), + +TP_fast_assign ( + dentry = file->f_path.dentry; + + tp_assign(dev, dentry->d_inode->i_sb->s_dev); + tp_assign(ino, dentry->d_inode->i_ino); + tp_assign(datasync, datasync); + tp_assign(parent, dentry->d_parent->d_inode->i_ino); + ), + +TP_printk ("dev %d,%d ino %lu parent %ld datasync %d " , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + (unsigned long ) __entry->parent, __entry->datasync) +) + +TRACE_EVENT (ext3_sync_file_exit, + TP_PROTO(struct inode *inode, int ret), + +TP_ARGS (inode, ret), + +TP_STRUCT__entry ( + __field( int, ret ) + __field( ino_t, ino ) +__field ( dev_t, dev ) + ), + +TP_fast_assign ( + tp_assign(ret, ret); + tp_assign(ino, inode->i_ino); + tp_assign(dev, inode->i_sb->s_dev); + ), + +TP_printk ("dev %d,%d ino %lu ret %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + __entry->ret) +) + +TRACE_EVENT (ext3_sync_fs, + TP_PROTO(struct super_block *sb, int wait), + +TP_ARGS (sb, wait), + +TP_STRUCT__entry ( + __field( dev_t, dev ) +__field ( int, wait ) + + ), + +TP_fast_assign ( + tp_assign(dev, sb->s_dev); + tp_assign(wait, wait); + ), + +TP_printk ("dev %d,%d wait %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->wait) +) + +TRACE_EVENT (ext3_rsv_window_add, + TP_PROTO(struct super_block *sb, + struct ext3_reserve_window_node *rsv_node), + +TP_ARGS (sb, rsv_node), + +TP_STRUCT__entry ( + __field( unsigned long, start ) + __field( unsigned long, end ) +__field ( dev_t, dev ) + ), + +TP_fast_assign ( + tp_assign(dev, sb->s_dev); + tp_assign(start, rsv_node->rsv_window._rsv_start); + tp_assign(end, rsv_node->rsv_window._rsv_end); + ), + +TP_printk ("dev %d,%d start %lu end %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->start, __entry->end) +) + +TRACE_EVENT (ext3_discard_reservation, + TP_PROTO(struct inode *inode, + struct ext3_reserve_window_node *rsv_node), + +TP_ARGS (inode, rsv_node), + +TP_STRUCT__entry ( + __field( unsigned long, start ) + __field( unsigned long, end ) + __field( ino_t, ino ) +__field ( dev_t, dev ) + ), + +TP_fast_assign ( + tp_assign(start, rsv_node->rsv_window._rsv_start); + tp_assign(end, rsv_node->rsv_window._rsv_end); + tp_assign(ino, inode->i_ino); + tp_assign(dev, inode->i_sb->s_dev); + ), + +TP_printk ("dev %d,%d ino %lu start %lu end %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long )__entry->ino, __entry->start, + __entry->end) +) + +TRACE_EVENT (ext3_alloc_new_reservation, + TP_PROTO(struct super_block *sb, unsigned long goal), + +TP_ARGS (sb, goal), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( unsigned long, goal ) + ), + +TP_fast_assign ( + tp_assign(dev, sb->s_dev); + tp_assign(goal, goal); + ), + +TP_printk ("dev %d,%d goal %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->goal) +) + +TRACE_EVENT (ext3_reserved, + TP_PROTO(struct super_block *sb, unsigned long block, + struct ext3_reserve_window_node *rsv_node), + +TP_ARGS (sb, block, rsv_node), + +TP_STRUCT__entry ( + __field( unsigned long, block ) + __field( unsigned long, start ) + __field( unsigned long, end ) +__field ( dev_t, dev ) + ), + +TP_fast_assign ( + tp_assign(block, block); + tp_assign(start, rsv_node->rsv_window._rsv_start); + tp_assign(end, rsv_node->rsv_window._rsv_end); + tp_assign(dev, sb->s_dev); + ), + +TP_printk ("dev %d,%d block %lu, start %lu end %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->block, __entry->start, __entry->end) +) + +TRACE_EVENT (ext3_forget, + TP_PROTO(struct inode *inode, int is_metadata, unsigned long block), + +TP_ARGS (inode, is_metadata, block), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field( umode_t, mode ) + __field( int, is_metadata ) + __field( unsigned long, block ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(mode, inode->i_mode); + tp_assign(is_metadata, is_metadata); + tp_assign(block, block); + ), + +TP_printk ("dev %d,%d ino %lu mode 0%o is_metadata %d block %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + __entry->mode, __entry->is_metadata, __entry->block) +) + +TRACE_EVENT (ext3_read_block_bitmap, + TP_PROTO(struct super_block *sb, unsigned int group), + +TP_ARGS (sb, group), + +TP_STRUCT__entry ( + __field( dev_t, dev ) +__field ( __u32, group ) + + ), + +TP_fast_assign ( + tp_assign(dev, sb->s_dev); + tp_assign(group, group); + ), + +TP_printk ("dev %d,%d group %u" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->group) +) + +TRACE_EVENT (ext3_direct_IO_enter, + TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw), + +TP_ARGS (inode, offset, len, rw), + +TP_STRUCT__entry ( + __field( ino_t, ino ) + __field( dev_t, dev ) + __field( loff_t, pos ) + __field( unsigned long, len ) +__field ( int, rw ) + ), + +TP_fast_assign ( + tp_assign(ino, inode->i_ino); + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(pos, offset); + tp_assign(len, len); + tp_assign(rw, rw); + ), + +TP_printk ("dev %d,%d ino %lu pos %llu len %lu rw %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + (unsigned long long ) __entry->pos, __entry->len, + __entry->rw) +) + +TRACE_EVENT (ext3_direct_IO_exit, + TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, + int rw, int ret), + +TP_ARGS (inode, offset, len, rw, ret), + +TP_STRUCT__entry ( + __field( ino_t, ino ) + __field( dev_t, dev ) + __field( loff_t, pos ) + __field( unsigned long, len ) + __field( int, rw ) +__field ( int, ret ) + ), + +TP_fast_assign ( + tp_assign(ino, inode->i_ino); + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(pos, offset); + tp_assign(len, len); + tp_assign(rw, rw); + tp_assign(ret, ret); + ), + +TP_printk ("dev %d,%d ino %lu pos %llu len %lu rw %d ret %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + (unsigned long long ) __entry->pos, __entry->len, + __entry->rw, __entry->ret) +) + +TRACE_EVENT (ext3_unlink_enter, + TP_PROTO(struct inode *parent, struct dentry *dentry), + +TP_ARGS (parent, dentry), + +TP_STRUCT__entry ( + __field( ino_t, parent ) + __field( ino_t, ino ) + __field( loff_t, size ) +__field ( dev_t, dev ) + ), + +TP_fast_assign ( + tp_assign(parent, parent->i_ino); + tp_assign(ino, dentry->d_inode->i_ino); + tp_assign(size, dentry->d_inode->i_size); + tp_assign(dev, dentry->d_inode->i_sb->s_dev); + ), + +TP_printk ("dev %d,%d ino %lu size %lld parent %ld" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + (unsigned long long )__entry->size, + (unsigned long ) __entry->parent) +) + +TRACE_EVENT (ext3_unlink_exit, + TP_PROTO(struct dentry *dentry, int ret), + +TP_ARGS (dentry, ret), + +TP_STRUCT__entry ( + __field( ino_t, ino ) + __field( dev_t, dev ) +__field ( int, ret ) + ), + +TP_fast_assign ( + tp_assign(ino, dentry->d_inode->i_ino); + tp_assign(dev, dentry->d_inode->i_sb->s_dev); + tp_assign(ret, ret); + ), + +TP_printk ("dev %d,%d ino %lu ret %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + __entry->ret) +) + +DECLARE_EVENT_CLASS (ext3__truncate, + TP_PROTO(struct inode *inode), + +TP_ARGS (inode), + +TP_STRUCT__entry ( + __field( ino_t, ino ) + __field( dev_t, dev ) +__field ( blkcnt_t, blocks ) + ), + +TP_fast_assign ( + tp_assign(ino, inode->i_ino); + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(blocks, inode->i_blocks); + ), + +TP_printk ("dev %d,%d ino %lu blocks %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, (unsigned long ) __entry->blocks) +) + +DEFINE_EVENT (ext3__truncate, ext3_truncate_enter, + + TP_PROTO(struct inode *inode), + +TP_ARGS (inode) +) + +DEFINE_EVENT (ext3__truncate, ext3_truncate_exit, + + TP_PROTO(struct inode *inode), + +TP_ARGS (inode) +) + +TRACE_EVENT (ext3_get_blocks_enter, + TP_PROTO(struct inode *inode, unsigned long lblk, + unsigned long len, int create), + +TP_ARGS (inode, lblk, len, create), + +TP_STRUCT__entry ( + __field( ino_t, ino ) + __field( dev_t, dev ) + __field( unsigned long, lblk ) + __field( unsigned long, len ) +__field ( int, create ) + ), + +TP_fast_assign ( + tp_assign(ino, inode->i_ino); + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(lblk, lblk); + tp_assign(len, len); + tp_assign(create, create); + ), + +TP_printk ("dev %d,%d ino %lu lblk %lu len %lu create %u" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + __entry->lblk, __entry->len, __entry->create) +) + +TRACE_EVENT (ext3_get_blocks_exit, + TP_PROTO(struct inode *inode, unsigned long lblk, + unsigned long pblk, unsigned long len, int ret), + +TP_ARGS (inode, lblk, pblk, len, ret), + +TP_STRUCT__entry ( + __field( ino_t, ino ) + __field( dev_t, dev ) + __field( unsigned long, lblk ) + __field( unsigned long, pblk ) + __field( unsigned long, len ) +__field ( int, ret ) + ), + +TP_fast_assign ( + tp_assign(ino, inode->i_ino); + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(lblk, lblk); + tp_assign(pblk, pblk); + tp_assign(len, len); + tp_assign(ret, ret); + ), + +TP_printk ("dev %d,%d ino %lu lblk %lu pblk %lu len %lu ret %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + __entry->lblk, __entry->pblk, + __entry->len, __entry->ret) +) + +TRACE_EVENT (ext3_load_inode, + TP_PROTO(struct inode *inode), + +TP_ARGS (inode), + +TP_STRUCT__entry ( + __field( ino_t, ino ) +__field ( dev_t, dev ) + ), + +TP_fast_assign ( + tp_assign(ino, inode->i_ino); + tp_assign(dev, inode->i_sb->s_dev); + ), + +TP_printk ("dev %d,%d ino %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino) +) + +#endif /* _TRACE_EXT3_H */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/gpio.h new file +56
-0@@ -0,0 +1,56 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM gpio + +#if !defined(_TRACE_GPIO_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_GPIO_H + +#include <linux/tracepoint.h> + +TRACE_EVENT (gpio_direction, + + TP_PROTO(unsigned gpio, int in, int err), + +TP_ARGS (gpio, in, err), + +TP_STRUCT__entry ( + __field(unsigned, gpio) + __field(int, in) +__field (int, err) + ), + +TP_fast_assign ( + tp_assign(gpio, gpio); + tp_assign(in, in); + tp_assign(err, err); + ), + +TP_printk ("%u %3s (%d)" , __entry->gpio, + __entry->in ?"in" :"out" , __entry->err) +) + +TRACE_EVENT (gpio_value, + + TP_PROTO(unsigned gpio, int get, int value), + +TP_ARGS (gpio, get, value), + +TP_STRUCT__entry ( + __field(unsigned, gpio) + __field(int, get) +__field (int, value) + ), + +TP_fast_assign ( + tp_assign(gpio, gpio); + tp_assign(get, get); + tp_assign(value, value); + ), + +TP_printk ("%u %3s %d" , __entry->gpio, + __entry->get ?"get" :"set" , __entry->value) +) + +#endif /* if !defined(_TRACE_GPIO_H) || defined(TRACE_HEADER_MULTI_READ) */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/jbd.h new file +243
-0@@ -0,0 +1,243 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM jbd + +#if !defined(_TRACE_JBD_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_JBD_H + +#include <linux/jbd.h> +#include <linux/tracepoint.h> + +TRACE_EVENT (jbd_checkpoint, + + TP_PROTO(journal_t *journal, int result), + +TP_ARGS (journal, result), + +TP_STRUCT__entry ( + __field( dev_t, dev ) +__field ( int, result ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); + tp_assign(result, result); + ), + +TP_printk ("dev %d,%d result %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->result) +) + +DECLARE_EVENT_CLASS (jbd_commit, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction), + +TP_STRUCT__entry ( + __field( dev_t, dev ) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + __field( char, sync_commit ) +#endif +__field ( int, transaction ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + tp_assign(sync_commit, commit_transaction->t_synchronous_commit); +#endif + tp_assign(transaction, commit_transaction->t_tid); + ), + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + TP_printk("dev %d,%d transaction %d sync %d", + MAJOR(__entry->dev), MINOR(__entry->dev), + __entry->transaction, __entry->sync_commit) +#else +TP_printk ("dev %d,%d transaction %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->transaction) +#endif +) + +DEFINE_EVENT (jbd_commit, jbd_start_commit, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction) +) + +DEFINE_EVENT (jbd_commit, jbd_commit_locking, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction) +) + +DEFINE_EVENT (jbd_commit, jbd_commit_flushing, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction) +) + +DEFINE_EVENT (jbd_commit, jbd_commit_logging, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction) +) + +TRACE_EVENT (jbd_drop_transaction, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction), + +TP_STRUCT__entry ( + __field( dev_t, dev ) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + __field( char, sync_commit ) +#endif +__field ( int, transaction ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + tp_assign(sync_commit, commit_transaction->t_synchronous_commit); +#endif + tp_assign(transaction, commit_transaction->t_tid); + ), + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + TP_printk("dev %d,%d transaction %d sync %d", + MAJOR(__entry->dev), MINOR(__entry->dev), + __entry->transaction, __entry->sync_commit) +#else +TP_printk ("dev %d,%d transaction %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->transaction) +#endif +) + +TRACE_EVENT (jbd_end_commit, +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction), + +TP_STRUCT__entry ( + __field( dev_t, dev ) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + __field( char, sync_commit ) +#endif + __field( int, transaction ) +__field ( int, head ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + tp_assign(sync_commit, commit_transaction->t_synchronous_commit); +#endif + tp_assign(transaction, commit_transaction->t_tid); + tp_assign(head, journal->j_tail_sequence); + ), + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + TP_printk("dev %d,%d transaction %d sync %d head %d", + MAJOR(__entry->dev), MINOR(__entry->dev), + __entry->transaction, __entry->sync_commit, __entry->head) +#else +TP_printk ("dev %d,%d transaction %d head %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->transaction, __entry->head) +#endif +) + +TRACE_EVENT (jbd_do_submit_data, +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction), + +TP_STRUCT__entry ( + __field( dev_t, dev ) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + __field( char, sync_commit ) +#endif +__field ( int, transaction ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + tp_assign(sync_commit, commit_transaction->t_synchronous_commit); +#endif + tp_assign(transaction, commit_transaction->t_tid); + ), + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + TP_printk("dev %d,%d transaction %d sync %d", + MAJOR(__entry->dev), MINOR(__entry->dev), + __entry->transaction, __entry->sync_commit) +#else +TP_printk ("dev %d,%d transaction %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->transaction) +#endif +) + +TRACE_EVENT (jbd_cleanup_journal_tail, + + TP_PROTO(journal_t *journal, tid_t first_tid, + unsigned long block_nr, unsigned long freed), + +TP_ARGS (journal, first_tid, block_nr, freed), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( tid_t, tail_sequence ) + __field( tid_t, first_tid ) + __field(unsigned long, block_nr ) + __field(unsigned long, freed ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); + tp_assign(tail_sequence, journal->j_tail_sequence); + tp_assign(first_tid, first_tid); + tp_assign(block_nr, block_nr); + tp_assign(freed, freed); + ), + +TP_printk ("dev %d,%d from %u to %u offset %lu freed %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->tail_sequence, __entry->first_tid, + __entry->block_nr, __entry->freed) +) + +TRACE_EVENT (jbd_update_superblock_end, + TP_PROTO(journal_t *journal, int wait), + +TP_ARGS (journal, wait), + +TP_STRUCT__entry ( + __field( dev_t, dev ) +__field ( int, wait ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); + tp_assign(wait, wait); + ), + +TP_printk ("dev %d,%d wait %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->wait) +) + +#endif /* _TRACE_JBD_H */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/jbd2.h new file +238
-0@@ -0,0 +1,238 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM jbd2 + +#if !defined(_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_JBD2_H + +#include <linux/jbd2.h> +#include <linux/tracepoint.h> + +#ifndef _TRACE_JBD2_DEF +#define _TRACE_JBD2_DEF +struct transaction_chp_stats_s ; +struct transaction_run_stats_s ; +#endif + +TRACE_EVENT (jbd2_checkpoint, + + TP_PROTO(journal_t *journal, int result), + +TP_ARGS (journal, result), + +TP_STRUCT__entry ( + __field( dev_t, dev ) +__field ( int, result ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); + tp_assign(result, result); + ), + +TP_printk ("dev %d,%d result %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), __entry->result) +) + +DECLARE_EVENT_CLASS (jbd2_commit, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( char, sync_commit ) +__field ( int, transaction ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); + tp_assign(sync_commit, commit_transaction->t_synchronous_commit); + tp_assign(transaction, commit_transaction->t_tid); + ), + +TP_printk ("dev %d,%d transaction %d sync %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->transaction, __entry->sync_commit) +) + +DEFINE_EVENT (jbd2_commit, jbd2_start_commit, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction) +) + +DEFINE_EVENT (jbd2_commit, jbd2_commit_locking, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction) +) + +DEFINE_EVENT (jbd2_commit, jbd2_commit_flushing, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction) +) + +DEFINE_EVENT (jbd2_commit, jbd2_commit_logging, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction) +) + +TRACE_EVENT (jbd2_end_commit, +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( char, sync_commit ) + __field( int, transaction ) +__field ( int, head ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); + tp_assign(sync_commit, commit_transaction->t_synchronous_commit); + tp_assign(transaction, commit_transaction->t_tid); + tp_assign(head, journal->j_tail_sequence); + ), + +TP_printk ("dev %d,%d transaction %d sync %d head %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->transaction, __entry->sync_commit, __entry->head) +) + +TRACE_EVENT (jbd2_submit_inode_data, + TP_PROTO(struct inode *inode), + +TP_ARGS (inode), + +TP_STRUCT__entry ( + __field( dev_t, dev ) +__field ( ino_t, ino ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + ), + +TP_printk ("dev %d,%d ino %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino) +) + +TRACE_EVENT (jbd2_run_stats, + TP_PROTO(dev_t dev, unsigned long tid, + struct transaction_run_stats_s *stats), + +TP_ARGS (dev, tid, stats), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( unsigned long, tid ) + __field( unsigned long, wait ) + __field( unsigned long, running ) + __field( unsigned long, locked ) + __field( unsigned long, flushing ) + __field( unsigned long, logging ) + __field( __u32, handle_count ) + __field( __u32, blocks ) +__field ( __u32, blocks_logged ) + ), + +TP_fast_assign ( + tp_assign(dev, dev); + tp_assign(tid, tid); + tp_assign(wait, stats->rs_wait); + tp_assign(running, stats->rs_running); + tp_assign(locked, stats->rs_locked); + tp_assign(flushing, stats->rs_flushing); + tp_assign(logging, stats->rs_logging); + tp_assign(handle_count, stats->rs_handle_count); + tp_assign(blocks, stats->rs_blocks); + tp_assign(blocks_logged, stats->rs_blocks_logged); + ), + +TP_printk ("dev %d,%d tid %lu wait %u running %u locked %u flushing %u " +"logging %u handle_count %u blocks %u blocks_logged %u" , +MAJOR (__entry->dev),MINOR (__entry->dev), __entry->tid, +jiffies_to_msecs (__entry->wait), +jiffies_to_msecs (__entry->running), +jiffies_to_msecs (__entry->locked), +jiffies_to_msecs (__entry->flushing), +jiffies_to_msecs (__entry->logging), + __entry->handle_count, __entry->blocks, + __entry->blocks_logged) +) + +TRACE_EVENT (jbd2_checkpoint_stats, + TP_PROTO(dev_t dev, unsigned long tid, + struct transaction_chp_stats_s *stats), + +TP_ARGS (dev, tid, stats), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( unsigned long, tid ) + __field( unsigned long, chp_time ) + __field( __u32, forced_to_close ) + __field( __u32, written ) +__field ( __u32, dropped ) + ), + +TP_fast_assign ( + tp_assign(dev, dev); + tp_assign(tid, tid); + tp_assign(chp_time, stats->cs_chp_time); + tp_assign(forced_to_close, stats->cs_forced_to_close); + tp_assign(written, stats->cs_written); + tp_assign(dropped, stats->cs_dropped); + ), + +TP_printk ("dev %d,%d tid %lu chp_time %u forced_to_close %u " +"written %u dropped %u" , +MAJOR (__entry->dev),MINOR (__entry->dev), __entry->tid, +jiffies_to_msecs (__entry->chp_time), + __entry->forced_to_close, __entry->written, __entry->dropped) +) + +TRACE_EVENT (jbd2_cleanup_journal_tail, + + TP_PROTO(journal_t *journal, tid_t first_tid, + unsigned long block_nr, unsigned long freed), + +TP_ARGS (journal, first_tid, block_nr, freed), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( tid_t, tail_sequence ) + __field( tid_t, first_tid ) + __field(unsigned long, block_nr ) + __field(unsigned long, freed ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); + tp_assign(tail_sequence, journal->j_tail_sequence); + tp_assign(first_tid, first_tid); + tp_assign(block_nr, block_nr); + tp_assign(freed, freed); + ), + +TP_printk ("dev %d,%d from %u to %u offset %lu freed %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->tail_sequence, __entry->first_tid, + __entry->block_nr, __entry->freed) +) + +#endif /* _TRACE_JBD2_H */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/kmem.h new file +304
-0@@ -0,0 +1,304 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM kmem + +#if !defined(_TRACE_KMEM_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_KMEM_H + +DECLARE_EVENT_CLASS (kmem_alloc, + + TP_PROTO(unsigned long call_site, + const void *ptr, + size_t bytes_req, + size_t bytes_alloc, + gfp_t gfp_flags), + +TP_ARGS (call_site, ptr, bytes_req, bytes_alloc, gfp_flags), + +TP_STRUCT__entry ( + __field( unsigned long, call_site ) + __field( const void *, ptr ) + __field( size_t, bytes_req ) + __field( size_t, bytes_alloc ) +__field ( gfp_t, gfp_flags ) + ), + +TP_fast_assign ( + tp_assign(call_site, call_site); + tp_assign(ptr, ptr); + tp_assign(bytes_req, bytes_req); + tp_assign(bytes_alloc, bytes_alloc); + tp_assign(gfp_flags, gfp_flags); + ), + +TP_printk ("call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%s" , + __entry->call_site, + __entry->ptr, + __entry->bytes_req, + __entry->bytes_alloc, +show_gfp_flags (__entry->gfp_flags)) +) + +DEFINE_EVENT (kmem_alloc, kmalloc, + + TP_PROTO(unsigned long call_site, const void *ptr, + size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags), + +TP_ARGS (call_site, ptr, bytes_req, bytes_alloc, gfp_flags) +) + +DEFINE_EVENT (kmem_alloc, kmem_cache_alloc, + + TP_PROTO(unsigned long call_site, const void *ptr, + size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags), + +TP_ARGS (call_site, ptr, bytes_req, bytes_alloc, gfp_flags) +) + +DECLARE_EVENT_CLASS (kmem_alloc_node, + + TP_PROTO(unsigned long call_site, + const void *ptr, + size_t bytes_req, + size_t bytes_alloc, + gfp_t gfp_flags, + int node), + +TP_ARGS (call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node), + +TP_STRUCT__entry ( + __field( unsigned long, call_site ) + __field( const void *, ptr ) + __field( size_t, bytes_req ) + __field( size_t, bytes_alloc ) + __field( gfp_t, gfp_flags ) +__field ( int, node ) + ), + +TP_fast_assign ( + tp_assign(call_site, call_site); + tp_assign(ptr, ptr); + tp_assign(bytes_req, bytes_req); + tp_assign(bytes_alloc, bytes_alloc); + tp_assign(gfp_flags, gfp_flags); + tp_assign(node, node); + ), + +TP_printk ("call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%s node=%d" , + __entry->call_site, + __entry->ptr, + __entry->bytes_req, + __entry->bytes_alloc, +show_gfp_flags (__entry->gfp_flags), + __entry->node) +) + +DEFINE_EVENT (kmem_alloc_node, kmalloc_node, + + TP_PROTO(unsigned long call_site, const void *ptr, + size_t bytes_req, size_t bytes_alloc, + gfp_t gfp_flags, int node), + +TP_ARGS (call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node) +) + +DEFINE_EVENT (kmem_alloc_node, kmem_cache_alloc_node, + + TP_PROTO(unsigned long call_site, const void *ptr, + size_t bytes_req, size_t bytes_alloc, + gfp_t gfp_flags, int node), + +TP_ARGS (call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node) +) + +DECLARE_EVENT_CLASS (kmem_free, + + TP_PROTO(unsigned long call_site, const void *ptr), + +TP_ARGS (call_site, ptr), + +TP_STRUCT__entry ( + __field( unsigned long, call_site ) + __field( const void *, ptr ) + ), + +TP_fast_assign ( + tp_assign(call_site, call_site); + tp_assign(ptr, ptr); + ), + +TP_printk ("call_site=%lx ptr=%p" , __entry->call_site, __entry->ptr) +) + +DEFINE_EVENT (kmem_free, kfree, + + TP_PROTO(unsigned long call_site, const void *ptr), + +TP_ARGS (call_site, ptr) +) + +DEFINE_EVENT (kmem_free, kmem_cache_free, + + TP_PROTO(unsigned long call_site, const void *ptr), + +TP_ARGS (call_site, ptr) +) + +TRACE_EVENT (mm_page_free_direct, + + TP_PROTO(struct page *page, unsigned int order), + +TP_ARGS (page, order), + +TP_STRUCT__entry ( + __field( struct page *, page ) + __field( unsigned int, order ) + ), + +TP_fast_assign ( + tp_assign(page, page); + tp_assign(order, order); + ), + +TP_printk ("page=%p pfn=%lu order=%d" , + __entry->page, +page_to_pfn (__entry->page), + __entry->order) +) + +TRACE_EVENT (mm_pagevec_free, + + TP_PROTO(struct page *page, int cold), + +TP_ARGS (page, cold), + +TP_STRUCT__entry ( + __field( struct page *, page ) +__field ( int, cold ) + ), + +TP_fast_assign ( + tp_assign(page, page); + tp_assign(cold, cold); + ), + +TP_printk ("page=%p pfn=%lu order=0 cold=%d" , + __entry->page, +page_to_pfn (__entry->page), + __entry->cold) +) + +TRACE_EVENT (mm_page_alloc, + + TP_PROTO(struct page *page, unsigned int order, + gfp_t gfp_flags, int migratetype), + +TP_ARGS (page, order, gfp_flags, migratetype), + +TP_STRUCT__entry ( + __field( struct page *, page ) + __field( unsigned int, order ) + __field( gfp_t, gfp_flags ) +__field ( int, migratetype ) + ), + +TP_fast_assign ( + tp_assign(page, page); + tp_assign(order, order); + tp_assign(gfp_flags, gfp_flags); + tp_assign(migratetype, migratetype); + ), + +TP_printk ("page=%p pfn=%lu order=%d migratetype=%d gfp_flags=%s" , + __entry->page, +page_to_pfn (__entry->page), + __entry->order, + __entry->migratetype, +show_gfp_flags (__entry->gfp_flags)) +) + +DECLARE_EVENT_CLASS (mm_page, + + TP_PROTO(struct page *page, unsigned int order, int migratetype), + +TP_ARGS (page, order, migratetype), + +TP_STRUCT__entry ( + __field( struct page *, page ) + __field( unsigned int, order ) +__field ( int, migratetype ) + ), + +TP_fast_assign ( + tp_assign(page, page); + tp_assign(order, order); + tp_assign(migratetype, migratetype); + ), + +TP_printk ("page=%p pfn=%lu order=%u migratetype=%d percpu_refill=%d" , + __entry->page, +page_to_pfn (__entry->page), + __entry->order, + __entry->migratetype, + __entry->order ==0 ) +) + +DEFINE_EVENT (mm_page, mm_page_alloc_zone_locked, + + TP_PROTO(struct page *page, unsigned int order, int migratetype), + +TP_ARGS (page, order, migratetype) +) + +DEFINE_EVENT_PRINT (mm_page, mm_page_pcpu_drain, + + TP_PROTO(struct page *page, unsigned int order, int migratetype), + +TP_ARGS (page, order, migratetype), + +TP_printk ("page=%p pfn=%lu order=%d migratetype=%d" , + __entry->page,page_to_pfn (__entry->page), + __entry->order, __entry->migratetype) +) + +TRACE_EVENT (mm_page_alloc_extfrag, + + TP_PROTO(struct page *page, + int alloc_order, int fallback_order, + int alloc_migratetype, int fallback_migratetype), + +TP_ARGS (page, + alloc_order, fallback_order, + alloc_migratetype, fallback_migratetype), + +TP_STRUCT__entry ( + __field( struct page *, page ) + __field( int, alloc_order ) + __field( int, fallback_order ) + __field( int, alloc_migratetype ) +__field ( int, fallback_migratetype ) + ), + +TP_fast_assign ( + tp_assign(page, page); + tp_assign(alloc_order, alloc_order); + tp_assign(fallback_order, fallback_order); + tp_assign(alloc_migratetype, alloc_migratetype); + tp_assign(fallback_migratetype, fallback_migratetype); + ), + +TP_printk ("page=%p pfn=%lu alloc_order=%d fallback_order=%d pageblock_order=%d alloc_migratetype=%d fallback_migratetype=%d fragmenting=%d change_ownership=%d" , + __entry->page, +page_to_pfn (__entry->page), + __entry->alloc_order, + __entry->fallback_order, + pageblock_order, + __entry->alloc_migratetype, + __entry->fallback_migratetype, + __entry->fallback_order < pageblock_order, + __entry->alloc_migratetype == __entry->fallback_migratetype) +) + +#endif /* _TRACE_KMEM_H */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/lock.h new file +86
-0@@ -0,0 +1,86 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM lock + +#if !defined(_TRACE_LOCK_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_LOCK_H + +#include <linux/lockdep.h> +#include <linux/tracepoint.h> + +#ifdef CONFIG_LOCKDEP + +TRACE_EVENT (lock_acquire, + + TP_PROTO(struct lockdep_map *lock, unsigned int subclass, + int trylock, int read, int check, + struct lockdep_map *next_lock, unsigned long ip), + +TP_ARGS (lock, subclass, trylock, read, check, next_lock, ip), + +TP_STRUCT__entry ( + __field(unsigned int, flags) + __string(name, lock->name) + __field(void *, lockdep_addr) + ), + +TP_fast_assign ( + tp_assign(flags, (trylock ? 1 : 0) | (read ? 2 : 0)); + tp_strcpy(name, lock->name); + tp_assign(lockdep_addr, lock); + ), + +TP_printk ("%p %s%s%s" , __entry->lockdep_addr, + (__entry->flags &1 ) ?"try " :"" , + (__entry->flags &2 ) ?"read " :"" , +__get_str (name)) +) + +DECLARE_EVENT_CLASS (lock, + + TP_PROTO(struct lockdep_map *lock, unsigned long ip), + +TP_ARGS (lock, ip), + +TP_STRUCT__entry ( + __string( name, lock->name ) + __field( void *, lockdep_addr ) + ), + +TP_fast_assign ( + tp_strcpy(name, lock->name); + tp_assign(lockdep_addr, lock); + ), + +TP_printk ("%p %s" , __entry->lockdep_addr,__get_str (name)) +) + +DEFINE_EVENT (lock, lock_release, + + TP_PROTO(struct lockdep_map *lock, unsigned long ip), + +TP_ARGS (lock, ip) +) + +#ifdef CONFIG_LOCK_STAT + +DEFINE_EVENT (lock, lock_contended, + + TP_PROTO(struct lockdep_map *lock, unsigned long ip), + +TP_ARGS (lock, ip) +) + +DEFINE_EVENT (lock, lock_acquired, + + TP_PROTO(struct lockdep_map *lock, unsigned long ip), + +TP_ARGS (lock, ip) +) + +#endif +#endif + +#endif /* _TRACE_LOCK_H */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/module.h new file +134
-0@@ -0,0 +1,134 @@ +/* +* Because linux/module.h has tracepoints in the header, and ftrace.h +* eventually includes this file, define_trace.h includes linux/module.h +* But we do not want the module.h to override the TRACE_SYSTEM macro +* variable that define_trace.h is processing, so we only set it +* when module events are being processed, which would happen when +* CREATE_TRACE_POINTS is defined. +*/ +#ifdef CREATE_TRACE_POINTS +#undef TRACE_SYSTEM +#define TRACE_SYSTEM module +#endif + +#if !defined(_TRACE_MODULE_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_MODULE_H + +#include <linux/tracepoint.h> + +#ifdef CONFIG_MODULES + +#ifndef _TRACE_MODULE_DEF +#define _TRACE_MODULE_DEF +struct module ; + +#define show_module_flags (flags) __print_flags(flags, "", \ + { (1UL << TAINT_PROPRIETARY_MODULE), "P" }, \ + { (1UL << TAINT_FORCED_MODULE), "F" }, \ + { (1UL << TAINT_CRAP), "C" }) +#endif + +TRACE_EVENT (module_load, + + TP_PROTO(struct module *mod), + +TP_ARGS (mod), + +TP_STRUCT__entry ( + __field( unsigned int, taints ) +__string ( name, mod->name ) + ), + +TP_fast_assign ( + tp_assign(taints, mod->taints); + tp_strcpy(name, mod->name); + ), + +TP_printk ("%s %s" ,__get_str (name),show_module_flags (__entry->taints)) +) + +TRACE_EVENT (module_free, + + TP_PROTO(struct module *mod), + +TP_ARGS (mod), + +TP_STRUCT__entry ( +__string ( name, mod->name ) + ), + +TP_fast_assign ( + tp_strcpy(name, mod->name); + ), + +TP_printk ("%s" ,__get_str (name)) +) + +#ifdef CONFIG_MODULE_UNLOAD +/* trace_module_get/put are only used if CONFIG_MODULE_UNLOAD is defined */ + +DECLARE_EVENT_CLASS (module_refcnt, + + TP_PROTO(struct module *mod, unsigned long ip), + +TP_ARGS (mod, ip), + +TP_STRUCT__entry ( + __field( unsigned long, ip ) + __field( int, refcnt ) +__string ( name, mod->name ) + ), + +TP_fast_assign ( + tp_assign(ip, ip); + tp_assign(refcnt, __this_cpu_read(mod->refptr->incs) + __this_cpu_read(mod->refptr->decs)); + tp_strcpy(name, mod->name); + ), + +TP_printk ("%s call_site=%pf refcnt=%d" , +__get_str (name), (void *)__entry->ip, __entry->refcnt) +) + +DEFINE_EVENT (module_refcnt, module_get, + + TP_PROTO(struct module *mod, unsigned long ip), + +TP_ARGS (mod, ip) +) + +DEFINE_EVENT (module_refcnt, module_put, + + TP_PROTO(struct module *mod, unsigned long ip), + +TP_ARGS (mod, ip) +) +#endif /* CONFIG_MODULE_UNLOAD */ + +TRACE_EVENT (module_request, + + TP_PROTO(char *name, bool wait, unsigned long ip), + +TP_ARGS (name, wait, ip), + +TP_STRUCT__entry ( + __field( unsigned long, ip ) + __field( bool, wait ) +__string ( name, name ) + ), + +TP_fast_assign ( + tp_assign(ip, ip); + tp_assign(wait, wait); + tp_strcpy(name, name); + ), + +TP_printk ("%s wait=%d call_site=%pf" , +__get_str (name), (int )__entry->wait, (void *)__entry->ip) +) + +#endif /* CONFIG_MODULES */ + +#endif /* _TRACE_MODULE_H */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/napi.h new file +38
-0@@ -0,0 +1,38 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM napi + +#if !defined(_TRACE_NAPI_H_) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_NAPI_H_ + +#include <linux/netdevice.h> +#include <linux/tracepoint.h> +#include <linux/ftrace.h> + +#define NO_DEV "(no_device)" + +TRACE_EVENT (napi_poll, + + TP_PROTO(struct napi_struct *napi), + +TP_ARGS (napi), + +TP_STRUCT__entry ( + __field( struct napi_struct *, napi) +__string ( dev_name, napi->dev ? napi->dev->name :NO_DEV ) + ), + +TP_fast_assign ( + tp_assign(napi, napi); + tp_strcpy(dev_name, napi->dev ? napi->dev->name : NO_DEV); + ), + +TP_printk ("napi poll on napi struct %p for device %s" , + __entry->napi,__get_str (dev_name)) +) + +#undef NO_DEV + +#endif /* _TRACE_NAPI_H_ */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/net.h new file +84
-0@@ -0,0 +1,84 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM net + +#if !defined(_TRACE_NET_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_NET_H + +#include <linux/skbuff.h> +#include <linux/netdevice.h> +#include <linux/ip.h> +#include <linux/tracepoint.h> + +TRACE_EVENT (net_dev_xmit, + + TP_PROTO(struct sk_buff *skb, + int rc, + struct net_device *dev, + unsigned int skb_len), + +TP_ARGS (skb, rc, dev, skb_len), + +TP_STRUCT__entry ( + __field( void *, skbaddr ) + __field( unsigned int, len ) + __field( int, rc ) +__string ( name, dev->name ) + ), + +TP_fast_assign ( + tp_assign(skbaddr, skb); + tp_assign(len, skb_len); + tp_assign(rc, rc); + tp_strcpy(name, dev->name); + ), + +TP_printk ("dev=%s skbaddr=%p len=%u rc=%d" , +__get_str (name), __entry->skbaddr, __entry->len, __entry->rc) +) + +DECLARE_EVENT_CLASS (net_dev_template, + + TP_PROTO(struct sk_buff *skb), + +TP_ARGS (skb), + +TP_STRUCT__entry ( + __field( void *, skbaddr ) + __field( unsigned int, len ) +__string ( name, skb->dev->name ) + ), + +TP_fast_assign ( + tp_assign(skbaddr, skb); + tp_assign(len, skb->len); + tp_strcpy(name, skb->dev->name); + ), + +TP_printk ("dev=%s skbaddr=%p len=%u" , +__get_str (name), __entry->skbaddr, __entry->len) +) + +DEFINE_EVENT (net_dev_template, net_dev_queue, + + TP_PROTO(struct sk_buff *skb), + +TP_ARGS (skb) +) + +DEFINE_EVENT (net_dev_template, netif_receive_skb, + + TP_PROTO(struct sk_buff *skb), + +TP_ARGS (skb) +) + +DEFINE_EVENT (net_dev_template, netif_rx, + + TP_PROTO(struct sk_buff *skb), + +TP_ARGS (skb) +) +#endif /* _TRACE_NET_H */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/power.h new file +240
-0@@ -0,0 +1,240 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM power + +#if !defined(_TRACE_POWER_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_POWER_H + +#include <linux/ktime.h> +#include <linux/tracepoint.h> + +DECLARE_EVENT_CLASS (cpu, + + TP_PROTO(unsigned int state, unsigned int cpu_id), + +TP_ARGS (state, cpu_id), + +TP_STRUCT__entry ( + __field( u32, state ) +__field ( u32, cpu_id ) + ), + +TP_fast_assign ( + tp_assign(state, state); + tp_assign(cpu_id, cpu_id); + ), + +TP_printk ("state=%lu cpu_id=%lu" , (unsigned long )__entry->state, + (unsigned long )__entry->cpu_id) +) + +DEFINE_EVENT (cpu, cpu_idle, + + TP_PROTO(unsigned int state, unsigned int cpu_id), + +TP_ARGS (state, cpu_id) +) + +/* This file can get included multiple times, TRACE_HEADER_MULTI_READ at top */ +#ifndef _PWR_EVENT_AVOID_DOUBLE_DEFINING +#define _PWR_EVENT_AVOID_DOUBLE_DEFINING + +#define PWR_EVENT_EXIT -1 +#endif + +DEFINE_EVENT (cpu, cpu_frequency, + + TP_PROTO(unsigned int frequency, unsigned int cpu_id), + +TP_ARGS (frequency, cpu_id) +) + +TRACE_EVENT (machine_suspend, + + TP_PROTO(unsigned int state), + +TP_ARGS (state), + +TP_STRUCT__entry ( +__field ( u32, state ) + ), + +TP_fast_assign ( + tp_assign(state, state); + ), + +TP_printk ("state=%lu" , (unsigned long )__entry->state) +) + +/* This code will be removed after deprecation time exceeded (2.6.41) */ +#ifdef CONFIG_EVENT_POWER_TRACING_DEPRECATED + +/* +* The power events are used for cpuidle & suspend (power_start, power_end) +* and for cpufreq (power_frequency) +*/ +DECLARE_EVENT_CLASS (power, + + TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id), + +TP_ARGS (type, state, cpu_id), + +TP_STRUCT__entry ( + __field( u64, type ) + __field( u64, state ) +__field ( u64, cpu_id ) + ), + +TP_fast_assign ( + tp_assign(type, type); + tp_assign(state, state); + tp_assign(cpu_id, cpu_id); + ), + +TP_printk ("type=%lu state=%lu cpu_id=%lu" , (unsigned long )__entry->type, + (unsigned long )__entry->state, (unsigned long )__entry->cpu_id) +) + +DEFINE_EVENT (power, power_start, + + TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id), + +TP_ARGS (type, state, cpu_id) +) + +DEFINE_EVENT (power, power_frequency, + + TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id), + +TP_ARGS (type, state, cpu_id) +) + +TRACE_EVENT (power_end, + + TP_PROTO(unsigned int cpu_id), + +TP_ARGS (cpu_id), + +TP_STRUCT__entry ( +__field ( u64, cpu_id ) + ), + +TP_fast_assign ( + tp_assign(cpu_id, cpu_id); + ), + +TP_printk ("cpu_id=%lu" , (unsigned long )__entry->cpu_id) + +) + +/* Deprecated dummy functions must be protected against multi-declartion */ +#ifndef _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED +#define _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED + +enum { +POWER_NONE =0 , +POWER_CSTATE =1 , +POWER_PSTATE =2 , +}; +#endif /* _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED */ + +#else /* CONFIG_EVENT_POWER_TRACING_DEPRECATED */ + +#ifndef _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED +#define _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED +enum { +POWER_NONE =0 , +POWER_CSTATE =1 , +POWER_PSTATE =2 , +}; + +/* These dummy declaration have to be ripped out when the deprecated +events get removed */ +static inline void trace_power_start (u64 type,u64 state,u64 cpuid) {}; +static inline void trace_power_end (u64 cpuid) {}; +static inline void trace_power_frequency (u64 type,u64 state,u64 cpuid) {}; +#endif /* _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED */ + +#endif /* CONFIG_EVENT_POWER_TRACING_DEPRECATED */ + +/* +* The clock events are used for clock enable/disable and for +* clock rate change +*/ +DECLARE_EVENT_CLASS (clock, + + TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id), + +TP_ARGS (name, state, cpu_id), + +TP_STRUCT__entry ( + __string( name, name ) + __field( u64, state ) +__field ( u64, cpu_id ) + ), + +TP_fast_assign ( + tp_strcpy(name, name); + tp_assign(state, state); + tp_assign(cpu_id, cpu_id); + ), + +TP_printk ("%s state=%lu cpu_id=%lu" ,__get_str (name), + (unsigned long )__entry->state, (unsigned long )__entry->cpu_id) +) + +DEFINE_EVENT (clock, clock_enable, + + TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id), + +TP_ARGS (name, state, cpu_id) +) + +DEFINE_EVENT (clock, clock_disable, + + TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id), + +TP_ARGS (name, state, cpu_id) +) + +DEFINE_EVENT (clock, clock_set_rate, + + TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id), + +TP_ARGS (name, state, cpu_id) +) + +/* +* The power domain events are used for power domains transitions + */ +DECLARE_EVENT_CLASS (power_domain, + + TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id), + +TP_ARGS (name, state, cpu_id), + +TP_STRUCT__entry ( + __string( name, name ) + __field( u64, state ) +__field ( u64, cpu_id ) + ), + +TP_fast_assign ( + tp_strcpy(name, name); + tp_assign(state, state); + tp_assign(cpu_id, cpu_id); +), + +TP_printk ("%s state=%lu cpu_id=%lu" ,__get_str (name), + (unsigned long )__entry->state, (unsigned long )__entry->cpu_id) +) + +DEFINE_EVENT (power_domain, power_domain_target, + + TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id), + +TP_ARGS (name, state, cpu_id) +) +#endif /* _TRACE_POWER_H */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/regulator.h new file +141
-0@@ -0,0 +1,141 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM regulator + +#if !defined(_TRACE_REGULATOR_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_REGULATOR_H + +#include <linux/ktime.h> +#include <linux/tracepoint.h> + +/* +* Events which just log themselves and the regulator name for enable/disable +* type tracking. +*/ +DECLARE_EVENT_CLASS (regulator_basic, + + TP_PROTO(const char *name), + +TP_ARGS (name), + +TP_STRUCT__entry ( +__string ( name, name ) + ), + +TP_fast_assign ( + tp_strcpy(name, name); + ), + +TP_printk ("name=%s" ,__get_str (name)) + +) + +DEFINE_EVENT (regulator_basic, regulator_enable, + + TP_PROTO(const char *name), + +TP_ARGS (name) + +) + +DEFINE_EVENT (regulator_basic, regulator_enable_delay, + + TP_PROTO(const char *name), + +TP_ARGS (name) + +) + +DEFINE_EVENT (regulator_basic, regulator_enable_complete, + + TP_PROTO(const char *name), + +TP_ARGS (name) + +) + +DEFINE_EVENT (regulator_basic, regulator_disable, + + TP_PROTO(const char *name), + +TP_ARGS (name) + +) + +DEFINE_EVENT (regulator_basic, regulator_disable_complete, + + TP_PROTO(const char *name), + +TP_ARGS (name) + +) + +/* +* Events that take a range of numerical values, mostly for voltages +* and so on. + */ +DECLARE_EVENT_CLASS (regulator_range, + + TP_PROTO(const char *name, int min, int max), + +TP_ARGS (name, min, max), + +TP_STRUCT__entry ( + __string( name, name ) + __field( int, min ) +__field ( int, max ) + ), + +TP_fast_assign ( + tp_strcpy(name, name); + tp_assign(min, min); + tp_assign(max, max); + ), + +TP_printk ("name=%s (%d-%d)" ,__get_str (name), + (int )__entry->min, (int )__entry->max) +) + +DEFINE_EVENT (regulator_range, regulator_set_voltage, + + TP_PROTO(const char *name, int min, int max), + +TP_ARGS (name, min, max) + +) + + +/* +* Events that take a single value, mostly for readback and refcounts. + */ +DECLARE_EVENT_CLASS (regulator_value, + + TP_PROTO(const char *name, unsigned int val), + +TP_ARGS (name, val), + +TP_STRUCT__entry ( + __string( name, name ) + __field( unsigned int, val ) + ), + +TP_fast_assign ( + tp_strcpy(name, name); + tp_assign(val, val); + ), + +TP_printk ("name=%s, val=%u" ,__get_str (name), + (int )__entry->val) +) + +DEFINE_EVENT (regulator_value, regulator_set_voltage_complete, + + TP_PROTO(const char *name, unsigned int value), + +TP_ARGS (name, value) + +) + +#endif /* _TRACE_POWER_H */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/scsi.h new file +369
-0@@ -0,0 +1,369 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM scsi + +#if !defined(_TRACE_SCSI_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_SCSI_H + +#include <scsi/scsi_cmnd.h> +#include <scsi/scsi_host.h> +#include <linux/tracepoint.h> +#include <linux/trace_seq.h> + +#ifndef _TRACE_SCSI_DEF +#define _TRACE_SCSI_DEF + +#define scsi_opcode_name (opcode) { opcode, #opcode } +#define show_opcode_name (val) \ + __print_symbolic(val, \ + scsi_opcode_name(TEST_UNIT_READY), \ + scsi_opcode_name(REZERO_UNIT), \ + scsi_opcode_name(REQUEST_SENSE), \ + scsi_opcode_name(FORMAT_UNIT), \ + scsi_opcode_name(READ_BLOCK_LIMITS), \ + scsi_opcode_name(REASSIGN_BLOCKS), \ + scsi_opcode_name(INITIALIZE_ELEMENT_STATUS), \ + scsi_opcode_name(READ_6), \ + scsi_opcode_name(WRITE_6), \ + scsi_opcode_name(SEEK_6), \ + scsi_opcode_name(READ_REVERSE), \ + scsi_opcode_name(WRITE_FILEMARKS), \ + scsi_opcode_name(SPACE), \ + scsi_opcode_name(INQUIRY), \ + scsi_opcode_name(RECOVER_BUFFERED_DATA), \ + scsi_opcode_name(MODE_SELECT), \ + scsi_opcode_name(RESERVE), \ + scsi_opcode_name(RELEASE), \ + scsi_opcode_name(COPY), \ + scsi_opcode_name(ERASE), \ + scsi_opcode_name(MODE_SENSE), \ + scsi_opcode_name(START_STOP), \ + scsi_opcode_name(RECEIVE_DIAGNOSTIC), \ + scsi_opcode_name(SEND_DIAGNOSTIC), \ + scsi_opcode_name(ALLOW_MEDIUM_REMOVAL), \ + scsi_opcode_name(SET_WINDOW), \ + scsi_opcode_name(READ_CAPACITY), \ + scsi_opcode_name(READ_10), \ + scsi_opcode_name(WRITE_10), \ + scsi_opcode_name(SEEK_10), \ + scsi_opcode_name(POSITION_TO_ELEMENT), \ + scsi_opcode_name(WRITE_VERIFY), \ + scsi_opcode_name(VERIFY), \ + scsi_opcode_name(SEARCH_HIGH), \ + scsi_opcode_name(SEARCH_EQUAL), \ + scsi_opcode_name(SEARCH_LOW), \ + scsi_opcode_name(SET_LIMITS), \ + scsi_opcode_name(PRE_FETCH), \ + scsi_opcode_name(READ_POSITION), \ + scsi_opcode_name(SYNCHRONIZE_CACHE), \ + scsi_opcode_name(LOCK_UNLOCK_CACHE), \ + scsi_opcode_name(READ_DEFECT_DATA), \ + scsi_opcode_name(MEDIUM_SCAN), \ + scsi_opcode_name(COMPARE), \ + scsi_opcode_name(COPY_VERIFY), \ + scsi_opcode_name(WRITE_BUFFER), \ + scsi_opcode_name(READ_BUFFER), \ + scsi_opcode_name(UPDATE_BLOCK), \ + scsi_opcode_name(READ_LONG), \ + scsi_opcode_name(WRITE_LONG), \ + scsi_opcode_name(CHANGE_DEFINITION), \ + scsi_opcode_name(WRITE_SAME), \ + scsi_opcode_name(UNMAP), \ + scsi_opcode_name(READ_TOC), \ + scsi_opcode_name(LOG_SELECT), \ + scsi_opcode_name(LOG_SENSE), \ + scsi_opcode_name(XDWRITEREAD_10), \ + scsi_opcode_name(MODE_SELECT_10), \ + scsi_opcode_name(RESERVE_10), \ + scsi_opcode_name(RELEASE_10), \ + scsi_opcode_name(MODE_SENSE_10), \ + scsi_opcode_name(PERSISTENT_RESERVE_IN), \ + scsi_opcode_name(PERSISTENT_RESERVE_OUT), \ + scsi_opcode_name(VARIABLE_LENGTH_CMD), \ + scsi_opcode_name(REPORT_LUNS), \ + scsi_opcode_name(MAINTENANCE_IN), \ + scsi_opcode_name(MAINTENANCE_OUT), \ + scsi_opcode_name(MOVE_MEDIUM), \ + scsi_opcode_name(EXCHANGE_MEDIUM), \ + scsi_opcode_name(READ_12), \ + scsi_opcode_name(WRITE_12), \ + scsi_opcode_name(WRITE_VERIFY_12), \ + scsi_opcode_name(SEARCH_HIGH_12), \ + scsi_opcode_name(SEARCH_EQUAL_12), \ + scsi_opcode_name(SEARCH_LOW_12), \ + scsi_opcode_name(READ_ELEMENT_STATUS), \ + scsi_opcode_name(SEND_VOLUME_TAG), \ + scsi_opcode_name(WRITE_LONG_2), \ + scsi_opcode_name(READ_16), \ + scsi_opcode_name(WRITE_16), \ + scsi_opcode_name(VERIFY_16), \ + scsi_opcode_name(WRITE_SAME_16), \ + scsi_opcode_name(SERVICE_ACTION_IN), \ + scsi_opcode_name(SAI_READ_CAPACITY_16), \ + scsi_opcode_name(SAI_GET_LBA_STATUS), \ + scsi_opcode_name(MI_REPORT_TARGET_PGS), \ + scsi_opcode_name(MO_SET_TARGET_PGS), \ + scsi_opcode_name(READ_32), \ + scsi_opcode_name(WRITE_32), \ + scsi_opcode_name(WRITE_SAME_32), \ + scsi_opcode_name(ATA_16), \ + scsi_opcode_name(ATA_12)) + +#define scsi_hostbyte_name (result) { result, #result } +#define show_hostbyte_name (val) \ + __print_symbolic(val, \ + scsi_hostbyte_name(DID_OK), \ + scsi_hostbyte_name(DID_NO_CONNECT), \ + scsi_hostbyte_name(DID_BUS_BUSY), \ + scsi_hostbyte_name(DID_TIME_OUT), \ + scsi_hostbyte_name(DID_BAD_TARGET), \ + scsi_hostbyte_name(DID_ABORT), \ + scsi_hostbyte_name(DID_PARITY), \ + scsi_hostbyte_name(DID_ERROR), \ + scsi_hostbyte_name(DID_RESET), \ + scsi_hostbyte_name(DID_BAD_INTR), \ + scsi_hostbyte_name(DID_PASSTHROUGH), \ + scsi_hostbyte_name(DID_SOFT_ERROR), \ + scsi_hostbyte_name(DID_IMM_RETRY), \ + scsi_hostbyte_name(DID_REQUEUE), \ + scsi_hostbyte_name(DID_TRANSPORT_DISRUPTED), \ + scsi_hostbyte_name(DID_TRANSPORT_FAILFAST)) + +#define scsi_driverbyte_name (result) { result, #result } +#define show_driverbyte_name (val) \ + __print_symbolic(val, \ + scsi_driverbyte_name(DRIVER_OK), \ + scsi_driverbyte_name(DRIVER_BUSY), \ + scsi_driverbyte_name(DRIVER_SOFT), \ + scsi_driverbyte_name(DRIVER_MEDIA), \ + scsi_driverbyte_name(DRIVER_ERROR), \ + scsi_driverbyte_name(DRIVER_INVALID), \ + scsi_driverbyte_name(DRIVER_TIMEOUT), \ + scsi_driverbyte_name(DRIVER_HARD), \ + scsi_driverbyte_name(DRIVER_SENSE)) + +#define scsi_msgbyte_name (result) { result, #result } +#define show_msgbyte_name (val) \ + __print_symbolic(val, \ + scsi_msgbyte_name(COMMAND_COMPLETE), \ + scsi_msgbyte_name(EXTENDED_MESSAGE), \ + scsi_msgbyte_name(SAVE_POINTERS), \ + scsi_msgbyte_name(RESTORE_POINTERS), \ + scsi_msgbyte_name(DISCONNECT), \ + scsi_msgbyte_name(INITIATOR_ERROR), \ + scsi_msgbyte_name(ABORT_TASK_SET), \ + scsi_msgbyte_name(MESSAGE_REJECT), \ + scsi_msgbyte_name(NOP), \ + scsi_msgbyte_name(MSG_PARITY_ERROR), \ + scsi_msgbyte_name(LINKED_CMD_COMPLETE), \ + scsi_msgbyte_name(LINKED_FLG_CMD_COMPLETE), \ + scsi_msgbyte_name(TARGET_RESET), \ + scsi_msgbyte_name(ABORT_TASK), \ + scsi_msgbyte_name(CLEAR_TASK_SET), \ + scsi_msgbyte_name(INITIATE_RECOVERY), \ + scsi_msgbyte_name(RELEASE_RECOVERY), \ + scsi_msgbyte_name(CLEAR_ACA), \ + scsi_msgbyte_name(LOGICAL_UNIT_RESET), \ + scsi_msgbyte_name(SIMPLE_QUEUE_TAG), \ + scsi_msgbyte_name(HEAD_OF_QUEUE_TAG), \ + scsi_msgbyte_name(ORDERED_QUEUE_TAG), \ + scsi_msgbyte_name(IGNORE_WIDE_RESIDUE), \ + scsi_msgbyte_name(ACA), \ + scsi_msgbyte_name(QAS_REQUEST), \ + scsi_msgbyte_name(BUS_DEVICE_RESET), \ + scsi_msgbyte_name(ABORT)) + +#define scsi_statusbyte_name (result) { result, #result } +#define show_statusbyte_name (val) \ + __print_symbolic(val, \ + scsi_statusbyte_name(SAM_STAT_GOOD), \ + scsi_statusbyte_name(SAM_STAT_CHECK_CONDITION), \ + scsi_statusbyte_name(SAM_STAT_CONDITION_MET), \ + scsi_statusbyte_name(SAM_STAT_BUSY), \ + scsi_statusbyte_name(SAM_STAT_INTERMEDIATE), \ + scsi_statusbyte_name(SAM_STAT_INTERMEDIATE_CONDITION_MET), \ + scsi_statusbyte_name(SAM_STAT_RESERVATION_CONFLICT), \ + scsi_statusbyte_name(SAM_STAT_COMMAND_TERMINATED), \ + scsi_statusbyte_name(SAM_STAT_TASK_SET_FULL), \ + scsi_statusbyte_name(SAM_STAT_ACA_ACTIVE), \ + scsi_statusbyte_name(SAM_STAT_TASK_ABORTED)) + +#define scsi_prot_op_name (result) { result, #result } +#define show_prot_op_name (val) \ + __print_symbolic(val, \ + scsi_prot_op_name(SCSI_PROT_NORMAL), \ + scsi_prot_op_name(SCSI_PROT_READ_INSERT), \ + scsi_prot_op_name(SCSI_PROT_WRITE_STRIP), \ + scsi_prot_op_name(SCSI_PROT_READ_STRIP), \ + scsi_prot_op_name(SCSI_PROT_WRITE_INSERT), \ + scsi_prot_op_name(SCSI_PROT_READ_PASS), \ + scsi_prot_op_name(SCSI_PROT_WRITE_PASS)) + +const char *scsi_trace_parse_cdb (struct trace_seq *,unsigned char *,int ); +#define __parse_cdb (cdb, len) scsi_trace_parse_cdb(p, cdb, len) +#endif + +TRACE_EVENT(scsi_dispatch_cmd_start, + + TP_PROTO(struct scsi_cmnd *cmd), + + TP_ARGS(cmd), + + TP_STRUCT__entry( + __field( unsigned int, host_no ) + __field( unsigned int, channel ) + __field( unsigned int, id ) + __field( unsigned int, lun ) + __field( unsigned int, opcode ) + __field( unsigned int, cmd_len ) + __field( unsigned int, data_sglen ) + __field( unsigned int, prot_sglen ) + __field( unsigned char, prot_op ) + __dynamic_array_hex(unsigned char, cmnd, cmd->cmd_len) + ), + + TP_fast_assign( + tp_assign(host_no, cmd->device->host->host_no); + tp_assign(channel, cmd->device->channel);Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/skb.h new file +75
-0Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/sock.h new file +68
-0Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/udp.h new file +32
-0Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/vmscan.h new file +499
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/asoc.h new file +330
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/ext3.h new file +864
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/fs_ext3.h new file +1323
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/gpio.h new file +56
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/jbd.h new file +203
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/jbd2.h new file +235
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/kmem.h new file +308
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/lock.h new file +86
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/module.h new file +131
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/napi.h new file +38
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/net.h new file +84
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/power.h new file +240
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/regulator.h new file +141
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/scsi.h new file +365
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/skb.h new file +75
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/sock.h new file +68
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/udp.h new file +32
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/vmscan.h new file +477
-0Lines of this file are not shown. View the raw message.
probes/lttng-probe-regulator.c new file +43
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 13 lines
1.7.10.4 -- Paul Woegerer | SW Development Engineer http://go.mentor.com/sourceryanalyzer Mentor Embedded(tm) | Prinz Eugen Straße 72/2/4, Vienna, 1040 Austria Nucleus® | Linux® | Android(tm) | Services | UI | Multi-OS Android is a trademark of Google Inc. Use of this trademark is subject to Google Permissions. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.
Signature · 4 lines
Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com
Part of the diff is not shown here. View the raw message.
Quoted 6 lines · Mathieu Desnoyers
Quoted 2 lines · * Woegerer, Paul ([email protected]) wrote:
The probes are verified to compile against all kernel versions from 3.0 to 3.6 (3.7-rc5 also works).
LTTng-modules states that 2.6.38 and 2.6.39 are supported too. Could you test those against these two kernel versions too ?
Added support down to 2.6.38 (couple more ifdefs in net.h) See Subject: [PATCH 2/3] Add ifdefs to net probe to support Linux 2.6.39
Quoted 9 lines
lttng-modules
TP_fast_assign()section should not have semicolumn at the end of lines, e.g.:TP_fast_assign( tp_strcpy(name, codec->name) tp_assign(id, codec->id) tp_assign(reg, reg) tp_assign(val, val) )
Fixed for all probes.
See Subject: [PATCH 3/3] Remove semicolons in TP_fast_assign blocks.
And now the updated patch series ...
From bb32fa6dd5e569d110b0f60ba705a398265a7617 Mon Sep 17 00:00:00 2001
From: Paul Woegerer <[email protected]>
Date: Mon, 12 Nov 2012 14:07:12 +0100
Subject: [PATCH 1/3] Add kernel probes for asoc, ext3, gpio, jbd, jbd2, kmem,
lock, module, napi, net, power, regulator, scsi, skb,
sock, udp, vmscan.
--- instrumentation/events/lttng-module/asoc.h | 340 ++++++ instrumentation/events/lttng-module/ext3.h | 870 +++++++++++++++ instrumentation/events/lttng-module/gpio.h | 56 + instrumentation/events/lttng-module/jbd.h | 243 +++++ instrumentation/events/lttng-module/jbd2.h | 238 ++++ instrumentation/events/lttng-module/kmem.h | 304 ++++++ instrumentation/events/lttng-module/lock.h | 86 ++ instrumentation/events/lttng-module/module.h | 134 +++ instrumentation/events/lttng-module/napi.h | 38 + instrumentation/events/lttng-module/net.h | 84 ++ instrumentation/events/lttng-module/power.h | 240 ++++ instrumentation/events/lttng-module/regulator.h | 141 +++ instrumentation/events/lttng-module/scsi.h | 369 +++++++ instrumentation/events/lttng-module/skb.h | 75 ++ instrumentation/events/lttng-module/sock.h | 68 ++ instrumentation/events/lttng-module/udp.h | 32 + instrumentation/events/lttng-module/vmscan.h | 499 +++++++++ instrumentation/events/mainline/asoc.h | 330 ++++++ instrumentation/events/mainline/ext3.h | 864 +++++++++++++++ instrumentation/events/mainline/fs_ext3.h | 1323 +++++++++++++++++++++++ instrumentation/events/mainline/gpio.h | 56 + instrumentation/events/mainline/jbd.h | 203 ++++ instrumentation/events/mainline/jbd2.h | 235 ++++ instrumentation/events/mainline/kmem.h | 308 ++++++ instrumentation/events/mainline/lock.h | 86 ++ instrumentation/events/mainline/module.h | 131 +++ instrumentation/events/mainline/napi.h | 38 + instrumentation/events/mainline/net.h | 84 ++ instrumentation/events/mainline/power.h | 240 ++++ instrumentation/events/mainline/regulator.h | 141 +++ instrumentation/events/mainline/scsi.h | 365 +++++++ instrumentation/events/mainline/skb.h | 75 ++ instrumentation/events/mainline/sock.h | 68 ++ instrumentation/events/mainline/udp.h | 32 + instrumentation/events/mainline/vmscan.h | 477 ++++++++ probes/Makefile | 72 ++ probes/lttng-probe-asoc.c | 45 + probes/lttng-probe-ext3.c | 56 + probes/lttng-probe-gpio.c | 43 + probes/lttng-probe-jbd.c | 44 + probes/lttng-probe-jbd2.c | 43 + probes/lttng-probe-kmem.c | 43 + probes/lttng-probe-lock.c | 43 + probes/lttng-probe-module.c | 43 + probes/lttng-probe-napi.c | 43 + probes/lttng-probe-net.c | 43 + probes/lttng-probe-power.c | 43 + probes/lttng-probe-regulator.c | 43 + probes/lttng-probe-scsi.c | 44 + probes/lttng-probe-skb.c | 43 + probes/lttng-probe-sock.c | 43 + probes/lttng-probe-udp.c | 43 + probes/lttng-probe-vmscan.c | 48 + 53 files changed, 9698 insertions(+) create mode 100644 instrumentation/events/lttng-module/asoc.h create mode 100644 instrumentation/events/lttng-module/ext3.h create mode 100644 instrumentation/events/lttng-module/gpio.h create mode 100644 instrumentation/events/lttng-module/jbd.h create mode 100644 instrumentation/events/lttng-module/jbd2.h create mode 100644 instrumentation/events/lttng-module/kmem.h create mode 100644 instrumentation/events/lttng-module/lock.h create mode 100644 instrumentation/events/lttng-module/module.h create mode 100644 instrumentation/events/lttng-module/napi.h create mode 100644 instrumentation/events/lttng-module/net.h create mode 100644 instrumentation/events/lttng-module/power.h create mode 100644 instrumentation/events/lttng-module/regulator.h create mode 100644 instrumentation/events/lttng-module/scsi.h create mode 100644 instrumentation/events/lttng-module/skb.h create mode 100644 instrumentation/events/lttng-module/sock.h create mode 100644 instrumentation/events/lttng-module/udp.h create mode 100644 instrumentation/events/lttng-module/vmscan.h create mode 100644 instrumentation/events/mainline/asoc.h create mode 100644 instrumentation/events/mainline/ext3.h create mode 100644 instrumentation/events/mainline/fs_ext3.h create mode 100644 instrumentation/events/mainline/gpio.h create mode 100644 instrumentation/events/mainline/jbd.h create mode 100644 instrumentation/events/mainline/jbd2.h create mode 100644 instrumentation/events/mainline/kmem.h create mode 100644 instrumentation/events/mainline/lock.h create mode 100644 instrumentation/events/mainline/module.h create mode 100644 instrumentation/events/mainline/napi.h create mode 100644 instrumentation/events/mainline/net.h create mode 100644 instrumentation/events/mainline/power.h create mode 100644 instrumentation/events/mainline/regulator.h create mode 100644 instrumentation/events/mainline/scsi.h create mode 100644 instrumentation/events/mainline/skb.h create mode 100644 instrumentation/events/mainline/sock.h create mode 100644 instrumentation/events/mainline/udp.h create mode 100644 instrumentation/events/mainline/vmscan.h create mode 100644 probes/lttng-probe-asoc.c create mode 100644 probes/lttng-probe-ext3.c create mode 100644 probes/lttng-probe-gpio.c create mode 100644 probes/lttng-probe-jbd.c create mode 100644 probes/lttng-probe-jbd2.c create mode 100644 probes/lttng-probe-kmem.c create mode 100644 probes/lttng-probe-lock.c create mode 100644 probes/lttng-probe-module.c create mode 100644 probes/lttng-probe-napi.c create mode 100644 probes/lttng-probe-net.c create mode 100644 probes/lttng-probe-power.c create mode 100644 probes/lttng-probe-regulator.c create mode 100644 probes/lttng-probe-scsi.c create mode 100644 probes/lttng-probe-skb.c create mode 100644 probes/lttng-probe-sock.c create mode 100644 probes/lttng-probe-udp.c create mode 100644 probes/lttng-probe-vmscan.c
instrumentation/events/lttng-module/asoc.h new file +340 -0
@@ -0,0 +1,340 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM asoc + +#if !defined(_TRACE_ASOC_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_ASOC_H + +#include <linux/ktime.h> +#include <linux/tracepoint.h> +#include <linux/version.h> + +#ifndef _TRACE_ASOC_DEF +#define _TRACE_ASOC_DEF +struct snd_soc_jack ; +struct snd_soc_codec ; +#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,1 ,0 )) +struct snd_soc_platform ; +#endif +struct snd_soc_card ; +struct snd_soc_dapm_widget ; +#endif + +/* +* Log register events +*/ +DECLARE_EVENT_CLASS (snd_soc_reg, + + TP_PROTO(struct snd_soc_codec *codec, unsigned int reg, + unsigned int val), + +TP_ARGS (codec, reg, val), + +TP_STRUCT__entry ( + __string( name, codec->name ) + __field( int, id ) + __field( unsigned int, reg ) + __field( unsigned int, val ) + ), + +TP_fast_assign ( + tp_strcpy(name, codec->name); + tp_assign(id, codec->id); + tp_assign(reg, reg); + tp_assign(val, val); + ), + +TP_printk ("codec=%s.%d reg=%x val=%x" ,__get_str (name), + (int )__entry->id, (unsigned int )__entry->reg, + (unsigned int )__entry->val) +) + +DEFINE_EVENT (snd_soc_reg, snd_soc_reg_write, + + TP_PROTO(struct snd_soc_codec *codec, unsigned int reg, + unsigned int val), + +TP_ARGS (codec, reg, val) + +) + +DEFINE_EVENT (snd_soc_reg, snd_soc_reg_read, + + TP_PROTO(struct snd_soc_codec *codec, unsigned int reg, + unsigned int val), + +TP_ARGS (codec, reg, val) + +) + +#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,1 ,0 )) +DECLARE_EVENT_CLASS (snd_soc_preg, + + TP_PROTO(struct snd_soc_platform *platform, unsigned int reg, + unsigned int val), + +TP_ARGS (platform, reg, val), + +TP_STRUCT__entry ( + __string( name, platform->name ) + __field( int, id ) + __field( unsigned int, reg ) + __field( unsigned int, val ) + ), + +TP_fast_assign ( + tp_strcpy(name, platform->name); + tp_assign(id, platform->id); + tp_assign(reg, reg); + tp_assign(val, val); + ), + +TP_printk ("platform=%s.%d reg=%x val=%x" ,__get_str (name), + (int )__entry->id, (unsigned int )__entry->reg, + (unsigned int )__entry->val) +) + +DEFINE_EVENT (snd_soc_preg, snd_soc_preg_write, + + TP_PROTO(struct snd_soc_platform *platform, unsigned int reg, + unsigned int val), + +TP_ARGS (platform, reg, val) + +) + +DEFINE_EVENT (snd_soc_preg, snd_soc_preg_read, + + TP_PROTO(struct snd_soc_platform *platform, unsigned int reg, + unsigned int val), + +TP_ARGS (platform, reg, val) + +) +#endif + +DECLARE_EVENT_CLASS (snd_soc_card, + + TP_PROTO(struct snd_soc_card *card, int val), + +TP_ARGS (card, val), + +TP_STRUCT__entry ( + __string( name, card->name ) +__field ( int, val ) + ), + +TP_fast_assign ( + tp_strcpy(name, card->name); + tp_assign(val, val); + ), + +TP_printk ("card=%s val=%d" ,__get_str (name), (int )__entry->val) +) + +DEFINE_EVENT (snd_soc_card, snd_soc_bias_level_start, + + TP_PROTO(struct snd_soc_card *card, int val), + +TP_ARGS (card, val) + +) + +DEFINE_EVENT (snd_soc_card, snd_soc_bias_level_done, + + TP_PROTO(struct snd_soc_card *card, int val), + +TP_ARGS (card, val) + +) + +DECLARE_EVENT_CLASS (snd_soc_dapm_basic, + + TP_PROTO(struct snd_soc_card *card), + +TP_ARGS (card), + +TP_STRUCT__entry ( +__string ( name, card->name ) + ), + +TP_fast_assign ( + tp_strcpy(name, card->name); + ), + +TP_printk ("card=%s" ,__get_str (name)) +) + +DEFINE_EVENT (snd_soc_dapm_basic, snd_soc_dapm_start, + + TP_PROTO(struct snd_soc_card *card), + +TP_ARGS (card) + +) + +DEFINE_EVENT (snd_soc_dapm_basic, snd_soc_dapm_done, + + TP_PROTO(struct snd_soc_card *card), + +TP_ARGS (card) + +) + +DECLARE_EVENT_CLASS (snd_soc_dapm_widget, + + TP_PROTO(struct snd_soc_dapm_widget *w, int val), + +TP_ARGS (w, val), + +TP_STRUCT__entry ( + __string( name, w->name ) +__field ( int, val ) + ), + +TP_fast_assign ( + tp_strcpy(name, w->name); + tp_assign(val, val); + ), + +TP_printk ("widget=%s val=%d" ,__get_str (name), + (int )__entry->val) +) + +DEFINE_EVENT (snd_soc_dapm_widget, snd_soc_dapm_widget_power, + + TP_PROTO(struct snd_soc_dapm_widget *w, int val), + +TP_ARGS (w, val) + +) + +DEFINE_EVENT (snd_soc_dapm_widget, snd_soc_dapm_widget_event_start, + + TP_PROTO(struct snd_soc_dapm_widget *w, int val), + +TP_ARGS (w, val) + +) + +DEFINE_EVENT (snd_soc_dapm_widget, snd_soc_dapm_widget_event_done, + + TP_PROTO(struct snd_soc_dapm_widget *w, int val), + +TP_ARGS (w, val) + +) + +#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,2 ,0 )) +TRACE_EVENT (snd_soc_dapm_walk_done, + + TP_PROTO(struct snd_soc_card *card), + +TP_ARGS (card), + +TP_STRUCT__entry ( + __string( name, card->name ) + __field( int, power_checks ) + __field( int, path_checks ) +__field ( int, neighbour_checks ) + ), + +TP_fast_assign ( + tp_strcpy(name, card->name); + tp_assign(power_checks, card->dapm_stats.power_checks); + tp_assign(path_checks, card->dapm_stats.path_checks); + tp_assign(neighbour_checks, card->dapm_stats.neighbour_checks); + ), + +TP_printk ("%s: checks %d power, %d path, %d neighbour" , +__get_str (name), (int )__entry->power_checks, + (int )__entry->path_checks, (int )__entry->neighbour_checks) +) +#endif + +TRACE_EVENT (snd_soc_jack_irq, + + TP_PROTO(const char *name), + +TP_ARGS (name), + +TP_STRUCT__entry ( +__string ( name, name ) + ), + +TP_fast_assign ( + tp_strcpy(name, name); + ), + +TP_printk ("%s" ,__get_str (name)) +) + +TRACE_EVENT (snd_soc_jack_report, + + TP_PROTO(struct snd_soc_jack *jack, int mask, int val), + +TP_ARGS (jack, mask, val), + +TP_STRUCT__entry ( + __string( name, jack->jack->name ) + __field( int, mask ) +__field ( int, val ) + ), + +TP_fast_assign ( + tp_strcpy(name, jack->jack->name); + tp_assign(mask, mask); + tp_assign(val, val); + ), + +TP_printk ("jack=%s %x/%x" ,__get_str (name), (int )__entry->val, + (int )__entry->mask) +) + +TRACE_EVENT (snd_soc_jack_notify, + + TP_PROTO(struct snd_soc_jack *jack, int val), + +TP_ARGS (jack, val), + +TP_STRUCT__entry ( + __string( name, jack->jack->name ) +__field ( int, val ) + ), + +TP_fast_assign ( + tp_strcpy(name, jack->jack->name); + tp_assign(val, val); + ), + +TP_printk ("jack=%s %x" ,__get_str (name), (int )__entry->val) +) + +TRACE_EVENT (snd_soc_cache_sync, + + TP_PROTO(struct snd_soc_codec *codec, const char *type, + const char *status), + +TP_ARGS (codec, type, status), + +TP_STRUCT__entry ( + __string( name, codec->name ) + __string( status, status ) + __string( type, type ) +__field ( int, id ) + ), + +TP_fast_assign ( + tp_strcpy(name, codec->name); + tp_strcpy(status, status); + tp_strcpy(type, type); + tp_assign(id, codec->id); + ), + +TP_printk ("codec=%s.%d type=%s status=%s" ,__get_str (name), + (int )__entry->id,__get_str (type),__get_str (status)) +) + +#endif /* _TRACE_ASOC_H */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h"
instrumentation/events/lttng-module/ext3.h new file +870 -0
870 lines not on this page · raw message
instrumentation/events/lttng-module/gpio.h new file +56 -0
56 lines not on this page · raw message
instrumentation/events/lttng-module/jbd.h new file +243 -0
243 lines not on this page · raw message
instrumentation/events/lttng-module/jbd2.h new file +238 -0
238 lines not on this page · raw message
instrumentation/events/lttng-module/kmem.h new file +304 -0
304 lines not on this page · raw message
instrumentation/events/lttng-module/lock.h new file +86 -0
86 lines not on this page · raw message
instrumentation/events/lttng-module/module.h new file +134 -0
134 lines not on this page · raw message
instrumentation/events/lttng-module/napi.h new file +38 -0
@@ -0,0 +1,38 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM napi + +#if !defined(_TRACE_NAPI_H_) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_NAPI_H_ + +#include <linux/netdevice.h> +#include <linux/tracepoint.h> +#include <linux/ftrace.h> + +#define NO_DEV "(no_device)" + +TRACE_EVENT (napi_poll, + + TP_PROTO(struct napi_struct *napi), + +TP_ARGS (napi), + +TP_STRUCT__entry ( + __field( struct napi_struct *, napi) +__string ( dev_name, napi->dev ? napi->dev->name :NO_DEV ) + ), + +TP_fast_assign ( + tp_assign(napi, napi); + tp_strcpy(dev_name, napi->dev ? napi->dev->name : NO_DEV); + ), + +TP_printk ("napi poll on napi struct %p for device %s" , + __entry->napi,__get_str (dev_name)) +) + +#undef NO_DEV + +#endif /* _TRACE_NAPI_H_ */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h"
instrumentation/events/lttng-module/net.h new file +84 -0
84 lines not on this page · raw message
instrumentation/events/lttng-module/power.h new file +240 -0
240 lines not on this page · raw message
instrumentation/events/lttng-module/regulator.h new file +141 -0
141 lines not on this page · raw message
instrumentation/events/lttng-module/scsi.h new file +369 -0
226 lines not on this page · raw message
instrumentation/events/lttng-module/skb.h new file +75 -0
75 lines not on this page · raw message
instrumentation/events/lttng-module/sock.h new file +68 -0
68 lines not on this page · raw message
instrumentation/events/lttng-module/udp.h new file +32 -0
Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/vmscan.h new file +499 -0
499 lines not on this page · raw message
instrumentation/events/mainline/asoc.h new file +330 -0
330 lines not on this page · raw message
instrumentation/events/mainline/ext3.h new file +864 -0
864 lines not on this page · raw message
instrumentation/events/mainline/fs_ext3.h new file +1323 -0
1,323 lines not on this page · raw message
instrumentation/events/mainline/gpio.h new file +56 -0
56 lines not on this page · raw message
instrumentation/events/mainline/jbd.h new file +203 -0
203 lines not on this page · raw message
instrumentation/events/mainline/jbd2.h new file +235 -0
235 lines not on this page · raw message
instrumentation/events/mainline/kmem.h new file +308 -0
308 lines not on this page · raw message
instrumentation/events/mainline/lock.h new file +86 -0
86 lines not on this page · raw message
instrumentation/events/mainline/module.h new file +131 -0
131 lines not on this page · raw message
instrumentation/events/mainline/napi.h new file +38 -0
Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/net.h new file +84 -0
84 lines not on this page · raw message
instrumentation/events/mainline/power.h new file +240 -0
240 lines not on this page · raw message
instrumentation/events/mainline/regulator.h new file +141 -0
141 lines not on this page · raw message
instrumentation/events/mainline/scsi.h new file +365 -0
365 lines not on this page · raw message
instrumentation/events/mainline/skb.h new file +75 -0
75 lines not on this page · raw message
instrumentation/events/mainline/sock.h new file +68 -0
68 lines not on this page · raw message
instrumentation/events/mainline/udp.h new file +32 -0
Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/vmscan.h new file +477 -0
477 lines not on this page · raw message
probes/Makefile +72 -0
72 lines not on this page · raw message
probes/lttng-probe-asoc.c new file +45 -0
45 lines not on this page · raw message
probes/lttng-probe-ext3.c new file +56 -0
56 lines not on this page · raw message
probes/lttng-probe-gpio.c new file +43 -0
43 lines not on this page · raw message
probes/lttng-probe-jbd.c new file +44 -0
44 lines not on this page · raw message
probes/lttng-probe-jbd2.c new file +43 -0
43 lines not on this page · raw message
probes/lttng-probe-kmem.c new file +43 -0
43 lines not on this page · raw message
probes/lttng-probe-lock.c new file +43 -0
43 lines not on this page · raw message
probes/lttng-probe-module.c new file +43 -0
43 lines not on this page · raw message
probes/lttng-probe-napi.c new file +43 -0
43 lines not on this page · raw message
probes/lttng-probe-net.c new file +43 -0
43 lines not on this page · raw message
probes/lttng-probe-power.c new file +43 -0
43 lines not on this page · raw message
probes/lttng-probe-regulator.c new file +43 -0
43 lines not on this page · raw message
probes/lttng-probe-scsi.c new file +44 -0
44 lines not on this page · raw message
probes/lttng-probe-skb.c new file +43 -0
43 lines not on this page · raw message
probes/lttng-probe-sock.c new file +43 -0
43 lines not on this page · raw message
probes/lttng-probe-udp.c new file +43 -0
43 lines not on this page · raw message
probes/lttng-probe-vmscan.c new file +48 -0
48 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 11 lines
1.7.10.4 From 5b1d2fa2044ba95020a12671da188fbe85967c80 Mon Sep 17 00:00:00 2001 From: Paul Woegerer <[email protected]> Date: Tue, 13 Nov 2012 16:58:22 +0100 Subject: [PATCH 2/3] Add ifdefs to net probe to support Linux 2.6.39 --- instrumentation/events/lttng-module/net.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)
instrumentation/events/lttng-module/net.h +21 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 27 lines
1.7.10.4 From 0f2be20124423c54865f9e45f035c75b8e7a5598 Mon Sep 17 00:00:00 2001 From: Paul Woegerer <[email protected]> Date: Wed, 14 Nov 2012 10:10:49 +0100 Subject: [PATCH 3/3] Remove semicolons in TP_fast_assign blocks. --- instrumentation/events/lttng-module/asoc.h | 54 ++--- instrumentation/events/lttng-module/ext3.h | 238 +++++++++++------------ instrumentation/events/lttng-module/gpio.h | 12 +- instrumentation/events/lttng-module/jbd.h | 44 ++--- instrumentation/events/lttng-module/jbd2.h | 42 ++-- instrumentation/events/lttng-module/kmem.h | 58 +++--- instrumentation/events/lttng-module/lock.h | 10 +- instrumentation/events/lttng-module/module.h | 18 +- instrumentation/events/lttng-module/napi.h | 4 +- instrumentation/events/lttng-module/net.h | 22 +-- instrumentation/events/lttng-module/power.h | 26 +-- instrumentation/events/lttng-module/regulator.h | 12 +- instrumentation/events/lttng-module/scsi.h | 66 +++---- instrumentation/events/lttng-module/skb.h | 12 +- instrumentation/events/lttng-module/sock.h | 14 +- instrumentation/events/lttng-module/udp.h | 4 +- instrumentation/events/lttng-module/vmscan.h | 104 +++++----- 17 files changed, 370 insertions(+), 370 deletions(-)
instrumentation/events/lttng-module/asoc.h +27 -27
54 lines not on this page · raw message
instrumentation/events/lttng-module/ext3.h +119 -119
238 lines not on this page · raw message
instrumentation/events/lttng-module/gpio.h +6 -6
Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/jbd.h +22 -22
44 lines not on this page · raw message
instrumentation/events/lttng-module/jbd2.h +21 -21
42 lines not on this page · raw message
instrumentation/events/lttng-module/kmem.h +29 -29
58 lines not on this page · raw message
instrumentation/events/lttng-module/lock.h +5 -5
Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/module.h +9 -9
Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/napi.h +2 -2
Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/net.h +11 -11
Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/power.h +13 -13
Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/regulator.h +6 -6
Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/scsi.h +33 -33
66 lines not on this page · raw message
instrumentation/events/lttng-module/skb.h +6 -6
Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/sock.h +7 -7
Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/udp.h +2 -2
Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/vmscan.h +52 -52
104 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.10.4
Part of the diff is not shown here. View the raw message.
Quoted 22 lines · * Woegerer, Paul ([email protected]) wrote:
Quoted 6 lines · Mathieu Desnoyers
Quoted 2 lines · * Woegerer, Paul ([email protected]) wrote:
The probes are verified to compile against all kernel versions from 3.0 to 3.6 (3.7-rc5 also works).
LTTng-modules states that 2.6.38 and 2.6.39 are supported too. Could you test those against these two kernel versions too ?
Added support down to 2.6.38 (couple more ifdefs in
net.h) See Subject: [PATCH 2/3] Add ifdefs to net probe to support Linux 2.6.39Quoted 9 lines
lttng-modules
TP_fast_assign()section should not have semicolumn at the end of lines, e.g.:TP_fast_assign( tp_strcpy(name, codec->name) tp_assign(id, codec->id) tp_assign(reg, reg) tp_assign(val, val) )
Quoted 5 lines
Fixed for all probes.
See Subject: [PATCH 3/3] Remove semicolons inTP_fast_assignblocks.And now the updated patch series ...
All merged. For next time, a few nits: please send each patch in a separate email, and usually we don't put dots at the end of titles. Also, if you can put your Signed-off-by at the end of the patch header, it would follow our workflow entirely.
Thanks!
Mathieu
Quoted 11,779 lines
From
bb32fa6dd5e569d110b0f60ba705a398265a7617Mon Sep 17 00:00:00 2001
From: Paul Woegerer <[email protected]>
Date: Mon, 12 Nov 2012 14:07:12 +0100
Subject: [PATCH 1/3] Add kernel probes for asoc, ext3, gpio, jbd, jbd2, kmem,
lock, module, napi, net, power, regulator, scsi, skb,
sock, udp, vmscan.--- instrumentation/events/lttng-module/asoc.h | 340 ++++++ instrumentation/events/lttng-module/ext3.h | 870 +++++++++++++++ instrumentation/events/lttng-module/gpio.h | 56 + instrumentation/events/lttng-module/jbd.h | 243 +++++ instrumentation/events/lttng-module/jbd2.h | 238 ++++ instrumentation/events/lttng-module/kmem.h | 304 ++++++ instrumentation/events/lttng-module/lock.h | 86 ++ instrumentation/events/lttng-module/module.h | 134 +++ instrumentation/events/lttng-module/napi.h | 38 + instrumentation/events/lttng-module/net.h | 84 ++ instrumentation/events/lttng-module/power.h | 240 ++++ instrumentation/events/lttng-module/regulator.h | 141 +++ instrumentation/events/lttng-module/scsi.h | 369 +++++++ instrumentation/events/lttng-module/skb.h | 75 ++ instrumentation/events/lttng-module/sock.h | 68 ++ instrumentation/events/lttng-module/udp.h | 32 + instrumentation/events/lttng-module/vmscan.h | 499 +++++++++ instrumentation/events/mainline/asoc.h | 330 ++++++ instrumentation/events/mainline/ext3.h | 864 +++++++++++++++ instrumentation/events/mainline/fs_ext3.h | 1323 +++++++++++++++++++++++ instrumentation/events/mainline/gpio.h | 56 + instrumentation/events/mainline/jbd.h | 203 ++++ instrumentation/events/mainline/jbd2.h | 235 ++++ instrumentation/events/mainline/kmem.h | 308 ++++++ instrumentation/events/mainline/lock.h | 86 ++ instrumentation/events/mainline/module.h | 131 +++ instrumentation/events/mainline/napi.h | 38 + instrumentation/events/mainline/net.h | 84 ++ instrumentation/events/mainline/power.h | 240 ++++ instrumentation/events/mainline/regulator.h | 141 +++ instrumentation/events/mainline/scsi.h | 365 +++++++ instrumentation/events/mainline/skb.h | 75 ++ instrumentation/events/mainline/sock.h | 68 ++ instrumentation/events/mainline/udp.h | 32 + instrumentation/events/mainline/vmscan.h | 477 ++++++++ probes/Makefile | 72 ++ probes/lttng-probe-asoc.c | 45 + probes/lttng-probe-ext3.c | 56 + probes/lttng-probe-gpio.c | 43 + probes/lttng-probe-jbd.c | 44 + probes/lttng-probe-jbd2.c | 43 + probes/lttng-probe-kmem.c | 43 + probes/lttng-probe-lock.c | 43 + probes/lttng-probe-module.c | 43 + probes/lttng-probe-napi.c | 43 + probes/lttng-probe-net.c | 43 + probes/lttng-probe-power.c | 43 + probes/lttng-probe-regulator.c | 43 + probes/lttng-probe-scsi.c | 44 + probes/lttng-probe-skb.c | 43 + probes/lttng-probe-sock.c | 43 + probes/lttng-probe-udp.c | 43 + probes/lttng-probe-vmscan.c | 48 + 53 files changed, 9698 insertions(+) create mode 100644 instrumentation/events/lttng-module/asoc.h create mode 100644 instrumentation/events/lttng-module/ext3.h create mode 100644 instrumentation/events/lttng-module/gpio.h create mode 100644 instrumentation/events/lttng-module/jbd.h create mode 100644 instrumentation/events/lttng-module/jbd2.h create mode 100644 instrumentation/events/lttng-module/kmem.h create mode 100644 instrumentation/events/lttng-module/lock.h create mode 100644 instrumentation/events/lttng-module/module.h create mode 100644 instrumentation/events/lttng-module/napi.h create mode 100644 instrumentation/events/lttng-module/net.h create mode 100644 instrumentation/events/lttng-module/power.h create mode 100644 instrumentation/events/lttng-module/regulator.h create mode 100644 instrumentation/events/lttng-module/scsi.h create mode 100644 instrumentation/events/lttng-module/skb.h create mode 100644 instrumentation/events/lttng-module/sock.h create mode 100644 instrumentation/events/lttng-module/udp.h create mode 100644 instrumentation/events/lttng-module/vmscan.h create mode 100644 instrumentation/events/mainline/asoc.h create mode 100644 instrumentation/events/mainline/ext3.h create mode 100644 instrumentation/events/mainline/fs_ext3.h create mode 100644 instrumentation/events/mainline/gpio.h create mode 100644 instrumentation/events/mainline/jbd.h create mode 100644 instrumentation/events/mainline/jbd2.h create mode 100644 instrumentation/events/mainline/kmem.h create mode 100644 instrumentation/events/mainline/lock.h create mode 100644 instrumentation/events/mainline/module.h create mode 100644 instrumentation/events/mainline/napi.h create mode 100644 instrumentation/events/mainline/net.h create mode 100644 instrumentation/events/mainline/power.h create mode 100644 instrumentation/events/mainline/regulator.h create mode 100644 instrumentation/events/mainline/scsi.h create mode 100644 instrumentation/events/mainline/skb.h create mode 100644 instrumentation/events/mainline/sock.h create mode 100644 instrumentation/events/mainline/udp.h create mode 100644 instrumentation/events/mainline/vmscan.h create mode 100644 probes/lttng-probe-asoc.c create mode 100644 probes/lttng-probe-ext3.c create mode 100644 probes/lttng-probe-gpio.c create mode 100644 probes/lttng-probe-jbd.c create mode 100644 probes/lttng-probe-jbd2.c create mode 100644 probes/lttng-probe-kmem.c create mode 100644 probes/lttng-probe-lock.c create mode 100644 probes/lttng-probe-module.c create mode 100644 probes/lttng-probe-napi.c create mode 100644 probes/lttng-probe-net.c create mode 100644 probes/lttng-probe-power.c create mode 100644 probes/lttng-probe-regulator.c create mode 100644 probes/lttng-probe-scsi.c create mode 100644 probes/lttng-probe-skb.c create mode 100644 probes/lttng-probe-sock.c create mode 100644 probes/lttng-probe-udp.c create mode 100644 probes/lttng-probe-vmscan.cinstrumentation/events/lttng-module/asoc.h new file +340
-0@@ -0,0 +1,340 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM asoc + +#if !defined(_TRACE_ASOC_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_ASOC_H + +#include <linux/ktime.h> +#include <linux/tracepoint.h> +#include <linux/version.h> + +#ifndef _TRACE_ASOC_DEF +#define _TRACE_ASOC_DEF +struct snd_soc_jack ; +struct snd_soc_codec ; +#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,1 ,0 )) +struct snd_soc_platform ; +#endif +struct snd_soc_card ; +struct snd_soc_dapm_widget ; +#endif + +/* +* Log register events +*/ +DECLARE_EVENT_CLASS (snd_soc_reg, + + TP_PROTO(struct snd_soc_codec *codec, unsigned int reg, + unsigned int val), + +TP_ARGS (codec, reg, val), + +TP_STRUCT__entry ( + __string( name, codec->name ) + __field( int, id ) + __field( unsigned int, reg ) + __field( unsigned int, val ) + ), + +TP_fast_assign ( + tp_strcpy(name, codec->name); + tp_assign(id, codec->id); + tp_assign(reg, reg); + tp_assign(val, val); + ), + +TP_printk ("codec=%s.%d reg=%x val=%x" ,__get_str (name), + (int )__entry->id, (unsigned int )__entry->reg, + (unsigned int )__entry->val) +) + +DEFINE_EVENT (snd_soc_reg, snd_soc_reg_write, + + TP_PROTO(struct snd_soc_codec *codec, unsigned int reg, + unsigned int val), + +TP_ARGS (codec, reg, val) + +) + +DEFINE_EVENT (snd_soc_reg, snd_soc_reg_read, + + TP_PROTO(struct snd_soc_codec *codec, unsigned int reg, + unsigned int val), + +TP_ARGS (codec, reg, val) + +) + +#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,1 ,0 )) +DECLARE_EVENT_CLASS (snd_soc_preg, + + TP_PROTO(struct snd_soc_platform *platform, unsigned int reg, + unsigned int val), + +TP_ARGS (platform, reg, val), + +TP_STRUCT__entry ( + __string( name, platform->name ) + __field( int, id ) + __field( unsigned int, reg ) + __field( unsigned int, val ) + ), + +TP_fast_assign ( + tp_strcpy(name, platform->name); + tp_assign(id, platform->id); + tp_assign(reg, reg); + tp_assign(val, val); + ), + +TP_printk ("platform=%s.%d reg=%x val=%x" ,__get_str (name), + (int )__entry->id, (unsigned int )__entry->reg, + (unsigned int )__entry->val) +) + +DEFINE_EVENT (snd_soc_preg, snd_soc_preg_write, + + TP_PROTO(struct snd_soc_platform *platform, unsigned int reg, + unsigned int val), + +TP_ARGS (platform, reg, val) + +) + +DEFINE_EVENT (snd_soc_preg, snd_soc_preg_read, + + TP_PROTO(struct snd_soc_platform *platform, unsigned int reg, + unsigned int val), + +TP_ARGS (platform, reg, val) + +) +#endif + +DECLARE_EVENT_CLASS (snd_soc_card, + + TP_PROTO(struct snd_soc_card *card, int val), + +TP_ARGS (card, val), + +TP_STRUCT__entry ( + __string( name, card->name ) +__field ( int, val ) + ), + +TP_fast_assign ( + tp_strcpy(name, card->name); + tp_assign(val, val); + ), + +TP_printk ("card=%s val=%d" ,__get_str (name), (int )__entry->val) +) + +DEFINE_EVENT (snd_soc_card, snd_soc_bias_level_start, + + TP_PROTO(struct snd_soc_card *card, int val), + +TP_ARGS (card, val) + +) + +DEFINE_EVENT (snd_soc_card, snd_soc_bias_level_done, + + TP_PROTO(struct snd_soc_card *card, int val), + +TP_ARGS (card, val) + +) + +DECLARE_EVENT_CLASS (snd_soc_dapm_basic, + + TP_PROTO(struct snd_soc_card *card), + +TP_ARGS (card), + +TP_STRUCT__entry ( +__string ( name, card->name ) + ), + +TP_fast_assign ( + tp_strcpy(name, card->name); + ), + +TP_printk ("card=%s" ,__get_str (name)) +) + +DEFINE_EVENT (snd_soc_dapm_basic, snd_soc_dapm_start, + + TP_PROTO(struct snd_soc_card *card), + +TP_ARGS (card) + +) + +DEFINE_EVENT (snd_soc_dapm_basic, snd_soc_dapm_done, + + TP_PROTO(struct snd_soc_card *card), + +TP_ARGS (card) + +) + +DECLARE_EVENT_CLASS (snd_soc_dapm_widget, + + TP_PROTO(struct snd_soc_dapm_widget *w, int val), + +TP_ARGS (w, val), + +TP_STRUCT__entry ( + __string( name, w->name ) +__field ( int, val ) + ), + +TP_fast_assign ( + tp_strcpy(name, w->name); + tp_assign(val, val); + ), + +TP_printk ("widget=%s val=%d" ,__get_str (name), + (int )__entry->val) +) + +DEFINE_EVENT (snd_soc_dapm_widget, snd_soc_dapm_widget_power, + + TP_PROTO(struct snd_soc_dapm_widget *w, int val), + +TP_ARGS (w, val) + +) + +DEFINE_EVENT (snd_soc_dapm_widget, snd_soc_dapm_widget_event_start, + + TP_PROTO(struct snd_soc_dapm_widget *w, int val), + +TP_ARGS (w, val) + +) + +DEFINE_EVENT (snd_soc_dapm_widget, snd_soc_dapm_widget_event_done, + + TP_PROTO(struct snd_soc_dapm_widget *w, int val), + +TP_ARGS (w, val) + +) + +#if (LINUX_VERSION_CODE >=KERNEL_VERSION (3 ,2 ,0 )) +TRACE_EVENT (snd_soc_dapm_walk_done, + + TP_PROTO(struct snd_soc_card *card), + +TP_ARGS (card), + +TP_STRUCT__entry ( + __string( name, card->name ) + __field( int, power_checks ) + __field( int, path_checks ) +__field ( int, neighbour_checks ) + ), + +TP_fast_assign ( + tp_strcpy(name, card->name); + tp_assign(power_checks, card->dapm_stats.power_checks); + tp_assign(path_checks, card->dapm_stats.path_checks); + tp_assign(neighbour_checks, card->dapm_stats.neighbour_checks); + ), + +TP_printk ("%s: checks %d power, %d path, %d neighbour" , +__get_str (name), (int )__entry->power_checks, + (int )__entry->path_checks, (int )__entry->neighbour_checks) +) +#endif + +TRACE_EVENT (snd_soc_jack_irq, + + TP_PROTO(const char *name), + +TP_ARGS (name), + +TP_STRUCT__entry ( +__string ( name, name ) + ), + +TP_fast_assign ( + tp_strcpy(name, name); + ), + +TP_printk ("%s" ,__get_str (name)) +) + +TRACE_EVENT (snd_soc_jack_report, + + TP_PROTO(struct snd_soc_jack *jack, int mask, int val), + +TP_ARGS (jack, mask, val), + +TP_STRUCT__entry ( + __string( name, jack->jack->name ) + __field( int, mask ) +__field ( int, val ) + ), + +TP_fast_assign ( + tp_strcpy(name, jack->jack->name); + tp_assign(mask, mask); + tp_assign(val, val); + ), + +TP_printk ("jack=%s %x/%x" ,__get_str (name), (int )__entry->val, + (int )__entry->mask) +) + +TRACE_EVENT (snd_soc_jack_notify, + + TP_PROTO(struct snd_soc_jack *jack, int val), + +TP_ARGS (jack, val), + +TP_STRUCT__entry ( + __string( name, jack->jack->name ) +__field ( int, val ) + ), + +TP_fast_assign ( + tp_strcpy(name, jack->jack->name); + tp_assign(val, val); + ), + +TP_printk ("jack=%s %x" ,__get_str (name), (int )__entry->val) +) + +TRACE_EVENT (snd_soc_cache_sync, + + TP_PROTO(struct snd_soc_codec *codec, const char *type, + const char *status), + +TP_ARGS (codec, type, status), + +TP_STRUCT__entry ( + __string( name, codec->name ) + __string( status, status ) + __string( type, type ) +__field ( int, id ) + ), + +TP_fast_assign ( + tp_strcpy(name, codec->name); + tp_strcpy(status, status); + tp_strcpy(type, type); + tp_assign(id, codec->id); + ), + +TP_printk ("codec=%s.%d type=%s status=%s" ,__get_str (name), + (int )__entry->id,__get_str (type),__get_str (status)) +) + +#endif /* _TRACE_ASOC_H */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/ext3.h new file +870
-0@@ -0,0 +1,870 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM ext3 + +#if !defined(_TRACE_EXT3_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_EXT3_H + +#include <linux/tracepoint.h> + +#ifndef _TRACE_EXT3_DEF +#define _TRACE_EXT3_DEF +static struct dentry *dentry; +#endif + + +TRACE_EVENT (ext3_free_inode, + TP_PROTO(struct inode *inode), + +TP_ARGS (inode), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field( umode_t, mode ) + __field( uid_t, uid ) + __field( gid_t, gid ) +__field ( blkcnt_t, blocks ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(mode, inode->i_mode); + tp_assign(uid, inode->i_uid); + tp_assign(gid, inode->i_gid); + tp_assign(blocks, inode->i_blocks); + ), + +TP_printk ("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + __entry->mode, __entry->uid, __entry->gid, + (unsigned long ) __entry->blocks) +) + +TRACE_EVENT (ext3_request_inode, + TP_PROTO(struct inode *dir, int mode), + +TP_ARGS (dir, mode), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, dir ) +__field ( umode_t, mode ) + ), + +TP_fast_assign ( + tp_assign(dev, dir->i_sb->s_dev); + tp_assign(dir, dir->i_ino); + tp_assign(mode, mode); + ), + +TP_printk ("dev %d,%d dir %lu mode 0%o" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->dir, __entry->mode) +) + +TRACE_EVENT (ext3_allocate_inode, + TP_PROTO(struct inode *inode, struct inode *dir, int mode), + +TP_ARGS (inode, dir, mode), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field( ino_t, dir ) +__field ( umode_t, mode ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(dir, dir->i_ino); + tp_assign(mode, mode); + ), + +TP_printk ("dev %d,%d ino %lu dir %lu mode 0%o" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + (unsigned long ) __entry->dir, __entry->mode) +) + +TRACE_EVENT (ext3_evict_inode, + TP_PROTO(struct inode *inode), + +TP_ARGS (inode), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) +__field ( int, nlink ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(nlink, inode->i_nlink); + ), + +TP_printk ("dev %d,%d ino %lu nlink %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, __entry->nlink) +) + +TRACE_EVENT (ext3_drop_inode, + TP_PROTO(struct inode *inode, int drop), + +TP_ARGS (inode, drop), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) +__field ( int, drop ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(drop, drop); + ), + +TP_printk ("dev %d,%d ino %lu drop %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, __entry->drop) +) + +TRACE_EVENT (ext3_mark_inode_dirty, + TP_PROTO(struct inode *inode, unsigned long IP), + +TP_ARGS (inode,IP ), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field(unsigned long, ip ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(ip, IP); + ), + +TP_printk ("dev %d,%d ino %lu caller %pF" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, (void *)__entry->ip) +) + +TRACE_EVENT (ext3_write_begin, + TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, + unsigned int flags), + +TP_ARGS (inode, pos, len, flags), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field( loff_t, pos ) + __field( unsigned int, len ) + __field( unsigned int, flags ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(pos, pos); + tp_assign(len, len); + tp_assign(flags, flags); + ), + +TP_printk ("dev %d,%d ino %lu pos %llu len %u flags %u" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + (unsigned long long ) __entry->pos, __entry->len, + __entry->flags) +) + +DECLARE_EVENT_CLASS (ext3__write_end, + TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, + unsigned int copied), + +TP_ARGS (inode, pos, len, copied), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field( loff_t, pos ) + __field( unsigned int, len ) + __field( unsigned int, copied ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(pos, pos); + tp_assign(len, len); + tp_assign(copied, copied); + ), + +TP_printk ("dev %d,%d ino %lu pos %llu len %u copied %u" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + (unsigned long long ) __entry->pos, __entry->len, + __entry->copied) +) + +DEFINE_EVENT (ext3__write_end, ext3_ordered_write_end, + + TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, + unsigned int copied), + +TP_ARGS (inode, pos, len, copied) +) + +DEFINE_EVENT (ext3__write_end, ext3_writeback_write_end, + + TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, + unsigned int copied), + +TP_ARGS (inode, pos, len, copied) +) + +DEFINE_EVENT (ext3__write_end, ext3_journalled_write_end, + + TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, + unsigned int copied), + +TP_ARGS (inode, pos, len, copied) +) + +DECLARE_EVENT_CLASS (ext3__page_op, + TP_PROTO(struct page *page), + +TP_ARGS (page), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) +__field ( pgoff_t, index ) + + ), + +TP_fast_assign ( + tp_assign(index, page->index); + tp_assign(ino, page->mapping->host->i_ino); + tp_assign(dev, page->mapping->host->i_sb->s_dev); + ), + +TP_printk ("dev %d,%d ino %lu page_index %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, __entry->index) +) + +DEFINE_EVENT (ext3__page_op, ext3_ordered_writepage, + + TP_PROTO(struct page *page), + +TP_ARGS (page) +) + +DEFINE_EVENT (ext3__page_op, ext3_writeback_writepage, + + TP_PROTO(struct page *page), + +TP_ARGS (page) +) + +DEFINE_EVENT (ext3__page_op, ext3_journalled_writepage, + + TP_PROTO(struct page *page), + +TP_ARGS (page) +) + +DEFINE_EVENT (ext3__page_op, ext3_readpage, + + TP_PROTO(struct page *page), + +TP_ARGS (page) +) + +DEFINE_EVENT (ext3__page_op, ext3_releasepage, + + TP_PROTO(struct page *page), + +TP_ARGS (page) +) + +TRACE_EVENT (ext3_invalidatepage, + TP_PROTO(struct page *page, unsigned long offset), + +TP_ARGS (page, offset), + +TP_STRUCT__entry ( + __field( pgoff_t, index ) + __field( unsigned long, offset ) + __field( ino_t, ino ) +__field ( dev_t, dev ) + + ), + +TP_fast_assign ( + tp_assign(index, page->index); + tp_assign(offset, offset); + tp_assign(ino, page->mapping->host->i_ino); + tp_assign(dev, page->mapping->host->i_sb->s_dev); + ), + +TP_printk ("dev %d,%d ino %lu page_index %lu offset %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + __entry->index, __entry->offset) +) + +TRACE_EVENT (ext3_discard_blocks, + TP_PROTO(struct super_block *sb, unsigned long blk, + unsigned long count), + +TP_ARGS (sb, blk, count), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( unsigned long, blk ) + __field( unsigned long, count ) + + ), + +TP_fast_assign ( + tp_assign(dev, sb->s_dev); + tp_assign(blk, blk); + tp_assign(count, count); + ), + +TP_printk ("dev %d,%d blk %lu count %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->blk, __entry->count) +) + +TRACE_EVENT (ext3_request_blocks, + TP_PROTO(struct inode *inode, unsigned long goal, + unsigned long count), + +TP_ARGS (inode, goal, count), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field( unsigned long, count ) + __field( unsigned long, goal ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(count, count); + tp_assign(goal, goal); + ), + +TP_printk ("dev %d,%d ino %lu count %lu goal %lu " , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + __entry->count, __entry->goal) +) + +TRACE_EVENT (ext3_allocate_blocks, + TP_PROTO(struct inode *inode, unsigned long goal, + unsigned long count, unsigned long block), + +TP_ARGS (inode, goal, count, block), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field( unsigned long, block ) + __field( unsigned long, count ) + __field( unsigned long, goal ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(block, block); + tp_assign(count, count); + tp_assign(goal, goal); + ), + +TP_printk ("dev %d,%d ino %lu count %lu block %lu goal %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + __entry->count, __entry->block, + __entry->goal) +) + +TRACE_EVENT (ext3_free_blocks, + TP_PROTO(struct inode *inode, unsigned long block, + unsigned long count), + +TP_ARGS (inode, block, count), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field( umode_t, mode ) + __field( unsigned long, block ) + __field( unsigned long, count ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(mode, inode->i_mode); + tp_assign(block, block); + tp_assign(count, count); + ), + +TP_printk ("dev %d,%d ino %lu mode 0%o block %lu count %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + __entry->mode, __entry->block, __entry->count) +) + +TRACE_EVENT (ext3_sync_file_enter, + TP_PROTO(struct file *file, int datasync), + +TP_ARGS (file, datasync), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field( ino_t, parent ) +__field ( int, datasync ) + ), + +TP_fast_assign ( + dentry = file->f_path.dentry; + + tp_assign(dev, dentry->d_inode->i_sb->s_dev); + tp_assign(ino, dentry->d_inode->i_ino); + tp_assign(datasync, datasync); + tp_assign(parent, dentry->d_parent->d_inode->i_ino); + ), + +TP_printk ("dev %d,%d ino %lu parent %ld datasync %d " , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + (unsigned long ) __entry->parent, __entry->datasync) +) + +TRACE_EVENT (ext3_sync_file_exit, + TP_PROTO(struct inode *inode, int ret), + +TP_ARGS (inode, ret), + +TP_STRUCT__entry ( + __field( int, ret ) + __field( ino_t, ino ) +__field ( dev_t, dev ) + ), + +TP_fast_assign ( + tp_assign(ret, ret); + tp_assign(ino, inode->i_ino); + tp_assign(dev, inode->i_sb->s_dev); + ), + +TP_printk ("dev %d,%d ino %lu ret %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + __entry->ret) +) + +TRACE_EVENT (ext3_sync_fs, + TP_PROTO(struct super_block *sb, int wait), + +TP_ARGS (sb, wait), + +TP_STRUCT__entry ( + __field( dev_t, dev ) +__field ( int, wait ) + + ), + +TP_fast_assign ( + tp_assign(dev, sb->s_dev); + tp_assign(wait, wait); + ), + +TP_printk ("dev %d,%d wait %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->wait) +) + +TRACE_EVENT (ext3_rsv_window_add, + TP_PROTO(struct super_block *sb, + struct ext3_reserve_window_node *rsv_node), + +TP_ARGS (sb, rsv_node), + +TP_STRUCT__entry ( + __field( unsigned long, start ) + __field( unsigned long, end ) +__field ( dev_t, dev ) + ), + +TP_fast_assign ( + tp_assign(dev, sb->s_dev); + tp_assign(start, rsv_node->rsv_window._rsv_start); + tp_assign(end, rsv_node->rsv_window._rsv_end); + ), + +TP_printk ("dev %d,%d start %lu end %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->start, __entry->end) +) + +TRACE_EVENT (ext3_discard_reservation, + TP_PROTO(struct inode *inode, + struct ext3_reserve_window_node *rsv_node), + +TP_ARGS (inode, rsv_node), + +TP_STRUCT__entry ( + __field( unsigned long, start ) + __field( unsigned long, end ) + __field( ino_t, ino ) +__field ( dev_t, dev ) + ), + +TP_fast_assign ( + tp_assign(start, rsv_node->rsv_window._rsv_start); + tp_assign(end, rsv_node->rsv_window._rsv_end); + tp_assign(ino, inode->i_ino); + tp_assign(dev, inode->i_sb->s_dev); + ), + +TP_printk ("dev %d,%d ino %lu start %lu end %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long )__entry->ino, __entry->start, + __entry->end) +) + +TRACE_EVENT (ext3_alloc_new_reservation, + TP_PROTO(struct super_block *sb, unsigned long goal), + +TP_ARGS (sb, goal), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( unsigned long, goal ) + ), + +TP_fast_assign ( + tp_assign(dev, sb->s_dev); + tp_assign(goal, goal); + ), + +TP_printk ("dev %d,%d goal %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->goal) +) + +TRACE_EVENT (ext3_reserved, + TP_PROTO(struct super_block *sb, unsigned long block, + struct ext3_reserve_window_node *rsv_node), + +TP_ARGS (sb, block, rsv_node), + +TP_STRUCT__entry ( + __field( unsigned long, block ) + __field( unsigned long, start ) + __field( unsigned long, end ) +__field ( dev_t, dev ) + ), + +TP_fast_assign ( + tp_assign(block, block); + tp_assign(start, rsv_node->rsv_window._rsv_start); + tp_assign(end, rsv_node->rsv_window._rsv_end); + tp_assign(dev, sb->s_dev); + ), + +TP_printk ("dev %d,%d block %lu, start %lu end %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->block, __entry->start, __entry->end) +) + +TRACE_EVENT (ext3_forget, + TP_PROTO(struct inode *inode, int is_metadata, unsigned long block), + +TP_ARGS (inode, is_metadata, block), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( ino_t, ino ) + __field( umode_t, mode ) + __field( int, is_metadata ) + __field( unsigned long, block ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + tp_assign(mode, inode->i_mode); + tp_assign(is_metadata, is_metadata); + tp_assign(block, block); + ), + +TP_printk ("dev %d,%d ino %lu mode 0%o is_metadata %d block %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + __entry->mode, __entry->is_metadata, __entry->block) +) + +TRACE_EVENT (ext3_read_block_bitmap, + TP_PROTO(struct super_block *sb, unsigned int group), + +TP_ARGS (sb, group), + +TP_STRUCT__entry ( + __field( dev_t, dev ) +__field ( __u32, group ) + + ), + +TP_fast_assign ( + tp_assign(dev, sb->s_dev); + tp_assign(group, group); + ), + +TP_printk ("dev %d,%d group %u" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->group) +) + +TRACE_EVENT (ext3_direct_IO_enter, + TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, int rw), + +TP_ARGS (inode, offset, len, rw), + +TP_STRUCT__entry ( + __field( ino_t, ino ) + __field( dev_t, dev ) + __field( loff_t, pos ) + __field( unsigned long, len ) +__field ( int, rw ) + ), + +TP_fast_assign ( + tp_assign(ino, inode->i_ino); + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(pos, offset); + tp_assign(len, len); + tp_assign(rw, rw); + ), + +TP_printk ("dev %d,%d ino %lu pos %llu len %lu rw %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + (unsigned long long ) __entry->pos, __entry->len, + __entry->rw) +) + +TRACE_EVENT (ext3_direct_IO_exit, + TP_PROTO(struct inode *inode, loff_t offset, unsigned long len, + int rw, int ret), + +TP_ARGS (inode, offset, len, rw, ret), + +TP_STRUCT__entry ( + __field( ino_t, ino ) + __field( dev_t, dev ) + __field( loff_t, pos ) + __field( unsigned long, len ) + __field( int, rw ) +__field ( int, ret ) + ), + +TP_fast_assign ( + tp_assign(ino, inode->i_ino); + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(pos, offset); + tp_assign(len, len); + tp_assign(rw, rw); + tp_assign(ret, ret); + ), + +TP_printk ("dev %d,%d ino %lu pos %llu len %lu rw %d ret %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + (unsigned long long ) __entry->pos, __entry->len, + __entry->rw, __entry->ret) +) + +TRACE_EVENT (ext3_unlink_enter, + TP_PROTO(struct inode *parent, struct dentry *dentry), + +TP_ARGS (parent, dentry), + +TP_STRUCT__entry ( + __field( ino_t, parent ) + __field( ino_t, ino ) + __field( loff_t, size ) +__field ( dev_t, dev ) + ), + +TP_fast_assign ( + tp_assign(parent, parent->i_ino); + tp_assign(ino, dentry->d_inode->i_ino); + tp_assign(size, dentry->d_inode->i_size); + tp_assign(dev, dentry->d_inode->i_sb->s_dev); + ), + +TP_printk ("dev %d,%d ino %lu size %lld parent %ld" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + (unsigned long long )__entry->size, + (unsigned long ) __entry->parent) +) + +TRACE_EVENT (ext3_unlink_exit, + TP_PROTO(struct dentry *dentry, int ret), + +TP_ARGS (dentry, ret), + +TP_STRUCT__entry ( + __field( ino_t, ino ) + __field( dev_t, dev ) +__field ( int, ret ) + ), + +TP_fast_assign ( + tp_assign(ino, dentry->d_inode->i_ino); + tp_assign(dev, dentry->d_inode->i_sb->s_dev); + tp_assign(ret, ret); + ), + +TP_printk ("dev %d,%d ino %lu ret %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + __entry->ret) +) + +DECLARE_EVENT_CLASS (ext3__truncate, + TP_PROTO(struct inode *inode), + +TP_ARGS (inode), + +TP_STRUCT__entry ( + __field( ino_t, ino ) + __field( dev_t, dev ) +__field ( blkcnt_t, blocks ) + ), + +TP_fast_assign ( + tp_assign(ino, inode->i_ino); + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(blocks, inode->i_blocks); + ), + +TP_printk ("dev %d,%d ino %lu blocks %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, (unsigned long ) __entry->blocks) +) + +DEFINE_EVENT (ext3__truncate, ext3_truncate_enter, + + TP_PROTO(struct inode *inode), + +TP_ARGS (inode) +) + +DEFINE_EVENT (ext3__truncate, ext3_truncate_exit, + + TP_PROTO(struct inode *inode), + +TP_ARGS (inode) +) + +TRACE_EVENT (ext3_get_blocks_enter, + TP_PROTO(struct inode *inode, unsigned long lblk, + unsigned long len, int create), + +TP_ARGS (inode, lblk, len, create), + +TP_STRUCT__entry ( + __field( ino_t, ino ) + __field( dev_t, dev ) + __field( unsigned long, lblk ) + __field( unsigned long, len ) +__field ( int, create ) + ), + +TP_fast_assign ( + tp_assign(ino, inode->i_ino); + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(lblk, lblk); + tp_assign(len, len); + tp_assign(create, create); + ), + +TP_printk ("dev %d,%d ino %lu lblk %lu len %lu create %u" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + __entry->lblk, __entry->len, __entry->create) +) + +TRACE_EVENT (ext3_get_blocks_exit, + TP_PROTO(struct inode *inode, unsigned long lblk, + unsigned long pblk, unsigned long len, int ret), + +TP_ARGS (inode, lblk, pblk, len, ret), + +TP_STRUCT__entry ( + __field( ino_t, ino ) + __field( dev_t, dev ) + __field( unsigned long, lblk ) + __field( unsigned long, pblk ) + __field( unsigned long, len ) +__field ( int, ret ) + ), + +TP_fast_assign ( + tp_assign(ino, inode->i_ino); + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(lblk, lblk); + tp_assign(pblk, pblk); + tp_assign(len, len); + tp_assign(ret, ret); + ), + +TP_printk ("dev %d,%d ino %lu lblk %lu pblk %lu len %lu ret %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino, + __entry->lblk, __entry->pblk, + __entry->len, __entry->ret) +) + +TRACE_EVENT (ext3_load_inode, + TP_PROTO(struct inode *inode), + +TP_ARGS (inode), + +TP_STRUCT__entry ( + __field( ino_t, ino ) +__field ( dev_t, dev ) + ), + +TP_fast_assign ( + tp_assign(ino, inode->i_ino); + tp_assign(dev, inode->i_sb->s_dev); + ), + +TP_printk ("dev %d,%d ino %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino) +) + +#endif /* _TRACE_EXT3_H */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/gpio.h new file +56
-0@@ -0,0 +1,56 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM gpio + +#if !defined(_TRACE_GPIO_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_GPIO_H + +#include <linux/tracepoint.h> + +TRACE_EVENT (gpio_direction, + + TP_PROTO(unsigned gpio, int in, int err), + +TP_ARGS (gpio, in, err), + +TP_STRUCT__entry ( + __field(unsigned, gpio) + __field(int, in) +__field (int, err) + ), + +TP_fast_assign ( + tp_assign(gpio, gpio); + tp_assign(in, in); + tp_assign(err, err); + ), + +TP_printk ("%u %3s (%d)" , __entry->gpio, + __entry->in ?"in" :"out" , __entry->err) +) + +TRACE_EVENT (gpio_value, + + TP_PROTO(unsigned gpio, int get, int value), + +TP_ARGS (gpio, get, value), + +TP_STRUCT__entry ( + __field(unsigned, gpio) + __field(int, get) +__field (int, value) + ), + +TP_fast_assign ( + tp_assign(gpio, gpio); + tp_assign(get, get); + tp_assign(value, value); + ), + +TP_printk ("%u %3s %d" , __entry->gpio, + __entry->get ?"get" :"set" , __entry->value) +) + +#endif /* if !defined(_TRACE_GPIO_H) || defined(TRACE_HEADER_MULTI_READ) */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/jbd.h new file +243
-0@@ -0,0 +1,243 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM jbd + +#if !defined(_TRACE_JBD_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_JBD_H + +#include <linux/jbd.h> +#include <linux/tracepoint.h> + +TRACE_EVENT (jbd_checkpoint, + + TP_PROTO(journal_t *journal, int result), + +TP_ARGS (journal, result), + +TP_STRUCT__entry ( + __field( dev_t, dev ) +__field ( int, result ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); + tp_assign(result, result); + ), + +TP_printk ("dev %d,%d result %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->result) +) + +DECLARE_EVENT_CLASS (jbd_commit, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction), + +TP_STRUCT__entry ( + __field( dev_t, dev ) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + __field( char, sync_commit ) +#endif +__field ( int, transaction ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + tp_assign(sync_commit, commit_transaction->t_synchronous_commit); +#endif + tp_assign(transaction, commit_transaction->t_tid); + ), + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + TP_printk("dev %d,%d transaction %d sync %d", + MAJOR(__entry->dev), MINOR(__entry->dev), + __entry->transaction, __entry->sync_commit) +#else +TP_printk ("dev %d,%d transaction %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->transaction) +#endif +) + +DEFINE_EVENT (jbd_commit, jbd_start_commit, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction) +) + +DEFINE_EVENT (jbd_commit, jbd_commit_locking, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction) +) + +DEFINE_EVENT (jbd_commit, jbd_commit_flushing, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction) +) + +DEFINE_EVENT (jbd_commit, jbd_commit_logging, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction) +) + +TRACE_EVENT (jbd_drop_transaction, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction), + +TP_STRUCT__entry ( + __field( dev_t, dev ) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + __field( char, sync_commit ) +#endif +__field ( int, transaction ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + tp_assign(sync_commit, commit_transaction->t_synchronous_commit); +#endif + tp_assign(transaction, commit_transaction->t_tid); + ), + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + TP_printk("dev %d,%d transaction %d sync %d", + MAJOR(__entry->dev), MINOR(__entry->dev), + __entry->transaction, __entry->sync_commit) +#else +TP_printk ("dev %d,%d transaction %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->transaction) +#endif +) + +TRACE_EVENT (jbd_end_commit, +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction), + +TP_STRUCT__entry ( + __field( dev_t, dev ) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + __field( char, sync_commit ) +#endif + __field( int, transaction ) +__field ( int, head ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + tp_assign(sync_commit, commit_transaction->t_synchronous_commit); +#endif + tp_assign(transaction, commit_transaction->t_tid); + tp_assign(head, journal->j_tail_sequence); + ), + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + TP_printk("dev %d,%d transaction %d sync %d head %d", + MAJOR(__entry->dev), MINOR(__entry->dev), + __entry->transaction, __entry->sync_commit, __entry->head) +#else +TP_printk ("dev %d,%d transaction %d head %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->transaction, __entry->head) +#endif +) + +TRACE_EVENT (jbd_do_submit_data, +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction), + +TP_STRUCT__entry ( + __field( dev_t, dev ) +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + __field( char, sync_commit ) +#endif +__field ( int, transaction ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + tp_assign(sync_commit, commit_transaction->t_synchronous_commit); +#endif + tp_assign(transaction, commit_transaction->t_tid); + ), + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)) + TP_printk("dev %d,%d transaction %d sync %d", + MAJOR(__entry->dev), MINOR(__entry->dev), + __entry->transaction, __entry->sync_commit) +#else +TP_printk ("dev %d,%d transaction %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->transaction) +#endif +) + +TRACE_EVENT (jbd_cleanup_journal_tail, + + TP_PROTO(journal_t *journal, tid_t first_tid, + unsigned long block_nr, unsigned long freed), + +TP_ARGS (journal, first_tid, block_nr, freed), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( tid_t, tail_sequence ) + __field( tid_t, first_tid ) + __field(unsigned long, block_nr ) + __field(unsigned long, freed ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); + tp_assign(tail_sequence, journal->j_tail_sequence); + tp_assign(first_tid, first_tid); + tp_assign(block_nr, block_nr); + tp_assign(freed, freed); + ), + +TP_printk ("dev %d,%d from %u to %u offset %lu freed %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->tail_sequence, __entry->first_tid, + __entry->block_nr, __entry->freed) +) + +TRACE_EVENT (jbd_update_superblock_end, + TP_PROTO(journal_t *journal, int wait), + +TP_ARGS (journal, wait), + +TP_STRUCT__entry ( + __field( dev_t, dev ) +__field ( int, wait ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); + tp_assign(wait, wait); + ), + +TP_printk ("dev %d,%d wait %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->wait) +) + +#endif /* _TRACE_JBD_H */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/jbd2.h new file +238
-0@@ -0,0 +1,238 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM jbd2 + +#if !defined(_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_JBD2_H + +#include <linux/jbd2.h> +#include <linux/tracepoint.h> + +#ifndef _TRACE_JBD2_DEF +#define _TRACE_JBD2_DEF +struct transaction_chp_stats_s ; +struct transaction_run_stats_s ; +#endif + +TRACE_EVENT (jbd2_checkpoint, + + TP_PROTO(journal_t *journal, int result), + +TP_ARGS (journal, result), + +TP_STRUCT__entry ( + __field( dev_t, dev ) +__field ( int, result ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); + tp_assign(result, result); + ), + +TP_printk ("dev %d,%d result %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), __entry->result) +) + +DECLARE_EVENT_CLASS (jbd2_commit, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( char, sync_commit ) +__field ( int, transaction ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); + tp_assign(sync_commit, commit_transaction->t_synchronous_commit); + tp_assign(transaction, commit_transaction->t_tid); + ), + +TP_printk ("dev %d,%d transaction %d sync %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->transaction, __entry->sync_commit) +) + +DEFINE_EVENT (jbd2_commit, jbd2_start_commit, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction) +) + +DEFINE_EVENT (jbd2_commit, jbd2_commit_locking, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction) +) + +DEFINE_EVENT (jbd2_commit, jbd2_commit_flushing, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction) +) + +DEFINE_EVENT (jbd2_commit, jbd2_commit_logging, + +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction) +) + +TRACE_EVENT (jbd2_end_commit, +TP_PROTO (journal_t *journal, transaction_t *commit_transaction), + +TP_ARGS (journal, commit_transaction), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( char, sync_commit ) + __field( int, transaction ) +__field ( int, head ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); + tp_assign(sync_commit, commit_transaction->t_synchronous_commit); + tp_assign(transaction, commit_transaction->t_tid); + tp_assign(head, journal->j_tail_sequence); + ), + +TP_printk ("dev %d,%d transaction %d sync %d head %d" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->transaction, __entry->sync_commit, __entry->head) +) + +TRACE_EVENT (jbd2_submit_inode_data, + TP_PROTO(struct inode *inode), + +TP_ARGS (inode), + +TP_STRUCT__entry ( + __field( dev_t, dev ) +__field ( ino_t, ino ) + ), + +TP_fast_assign ( + tp_assign(dev, inode->i_sb->s_dev); + tp_assign(ino, inode->i_ino); + ), + +TP_printk ("dev %d,%d ino %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + (unsigned long ) __entry->ino) +) + +TRACE_EVENT (jbd2_run_stats, + TP_PROTO(dev_t dev, unsigned long tid, + struct transaction_run_stats_s *stats), + +TP_ARGS (dev, tid, stats), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( unsigned long, tid ) + __field( unsigned long, wait ) + __field( unsigned long, running ) + __field( unsigned long, locked ) + __field( unsigned long, flushing ) + __field( unsigned long, logging ) + __field( __u32, handle_count ) + __field( __u32, blocks ) +__field ( __u32, blocks_logged ) + ), + +TP_fast_assign ( + tp_assign(dev, dev); + tp_assign(tid, tid); + tp_assign(wait, stats->rs_wait); + tp_assign(running, stats->rs_running); + tp_assign(locked, stats->rs_locked); + tp_assign(flushing, stats->rs_flushing); + tp_assign(logging, stats->rs_logging); + tp_assign(handle_count, stats->rs_handle_count); + tp_assign(blocks, stats->rs_blocks); + tp_assign(blocks_logged, stats->rs_blocks_logged); + ), + +TP_printk ("dev %d,%d tid %lu wait %u running %u locked %u flushing %u " +"logging %u handle_count %u blocks %u blocks_logged %u" , +MAJOR (__entry->dev),MINOR (__entry->dev), __entry->tid, +jiffies_to_msecs (__entry->wait), +jiffies_to_msecs (__entry->running), +jiffies_to_msecs (__entry->locked), +jiffies_to_msecs (__entry->flushing), +jiffies_to_msecs (__entry->logging), + __entry->handle_count, __entry->blocks, + __entry->blocks_logged) +) + +TRACE_EVENT (jbd2_checkpoint_stats, + TP_PROTO(dev_t dev, unsigned long tid, + struct transaction_chp_stats_s *stats), + +TP_ARGS (dev, tid, stats), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( unsigned long, tid ) + __field( unsigned long, chp_time ) + __field( __u32, forced_to_close ) + __field( __u32, written ) +__field ( __u32, dropped ) + ), + +TP_fast_assign ( + tp_assign(dev, dev); + tp_assign(tid, tid); + tp_assign(chp_time, stats->cs_chp_time); + tp_assign(forced_to_close, stats->cs_forced_to_close); + tp_assign(written, stats->cs_written); + tp_assign(dropped, stats->cs_dropped); + ), + +TP_printk ("dev %d,%d tid %lu chp_time %u forced_to_close %u " +"written %u dropped %u" , +MAJOR (__entry->dev),MINOR (__entry->dev), __entry->tid, +jiffies_to_msecs (__entry->chp_time), + __entry->forced_to_close, __entry->written, __entry->dropped) +) + +TRACE_EVENT (jbd2_cleanup_journal_tail, + + TP_PROTO(journal_t *journal, tid_t first_tid, + unsigned long block_nr, unsigned long freed), + +TP_ARGS (journal, first_tid, block_nr, freed), + +TP_STRUCT__entry ( + __field( dev_t, dev ) + __field( tid_t, tail_sequence ) + __field( tid_t, first_tid ) + __field(unsigned long, block_nr ) + __field(unsigned long, freed ) + ), + +TP_fast_assign ( + tp_assign(dev, journal->j_fs_dev->bd_dev); + tp_assign(tail_sequence, journal->j_tail_sequence); + tp_assign(first_tid, first_tid); + tp_assign(block_nr, block_nr); + tp_assign(freed, freed); + ), + +TP_printk ("dev %d,%d from %u to %u offset %lu freed %lu" , +MAJOR (__entry->dev),MINOR (__entry->dev), + __entry->tail_sequence, __entry->first_tid, + __entry->block_nr, __entry->freed) +) + +#endif /* _TRACE_JBD2_H */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/kmem.h new file +304
-0@@ -0,0 +1,304 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM kmem + +#if !defined(_TRACE_KMEM_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_KMEM_H + +DECLARE_EVENT_CLASS (kmem_alloc, + + TP_PROTO(unsigned long call_site, + const void *ptr, + size_t bytes_req, + size_t bytes_alloc, + gfp_t gfp_flags), + +TP_ARGS (call_site, ptr, bytes_req, bytes_alloc, gfp_flags), + +TP_STRUCT__entry ( + __field( unsigned long, call_site ) + __field( const void *, ptr ) + __field( size_t, bytes_req ) + __field( size_t, bytes_alloc ) +__field ( gfp_t, gfp_flags ) + ), + +TP_fast_assign ( + tp_assign(call_site, call_site); + tp_assign(ptr, ptr); + tp_assign(bytes_req, bytes_req); + tp_assign(bytes_alloc, bytes_alloc); + tp_assign(gfp_flags, gfp_flags); + ), + +TP_printk ("call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%s" , + __entry->call_site, + __entry->ptr, + __entry->bytes_req, + __entry->bytes_alloc, +show_gfp_flags (__entry->gfp_flags)) +) + +DEFINE_EVENT (kmem_alloc, kmalloc, + + TP_PROTO(unsigned long call_site, const void *ptr, + size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags), + +TP_ARGS (call_site, ptr, bytes_req, bytes_alloc, gfp_flags) +) + +DEFINE_EVENT (kmem_alloc, kmem_cache_alloc, + + TP_PROTO(unsigned long call_site, const void *ptr, + size_t bytes_req, size_t bytes_alloc, gfp_t gfp_flags), + +TP_ARGS (call_site, ptr, bytes_req, bytes_alloc, gfp_flags) +) + +DECLARE_EVENT_CLASS (kmem_alloc_node, + + TP_PROTO(unsigned long call_site, + const void *ptr, + size_t bytes_req, + size_t bytes_alloc, + gfp_t gfp_flags, + int node), + +TP_ARGS (call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node), + +TP_STRUCT__entry ( + __field( unsigned long, call_site ) + __field( const void *, ptr ) + __field( size_t, bytes_req ) + __field( size_t, bytes_alloc ) + __field( gfp_t, gfp_flags ) +__field ( int, node ) + ), + +TP_fast_assign ( + tp_assign(call_site, call_site); + tp_assign(ptr, ptr); + tp_assign(bytes_req, bytes_req); + tp_assign(bytes_alloc, bytes_alloc); + tp_assign(gfp_flags, gfp_flags); + tp_assign(node, node); + ), + +TP_printk ("call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%s node=%d" , + __entry->call_site, + __entry->ptr, + __entry->bytes_req, + __entry->bytes_alloc, +show_gfp_flags (__entry->gfp_flags), + __entry->node) +) + +DEFINE_EVENT (kmem_alloc_node, kmalloc_node, + + TP_PROTO(unsigned long call_site, const void *ptr, + size_t bytes_req, size_t bytes_alloc, + gfp_t gfp_flags, int node), + +TP_ARGS (call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node) +) + +DEFINE_EVENT (kmem_alloc_node, kmem_cache_alloc_node, + + TP_PROTO(unsigned long call_site, const void *ptr, + size_t bytes_req, size_t bytes_alloc, + gfp_t gfp_flags, int node), + +TP_ARGS (call_site, ptr, bytes_req, bytes_alloc, gfp_flags, node) +) + +DECLARE_EVENT_CLASS (kmem_free, + + TP_PROTO(unsigned long call_site, const void *ptr), + +TP_ARGS (call_site, ptr), + +TP_STRUCT__entry ( + __field( unsigned long, call_site ) + __field( const void *, ptr ) + ), + +TP_fast_assign ( + tp_assign(call_site, call_site); + tp_assign(ptr, ptr); + ), + +TP_printk ("call_site=%lx ptr=%p" , __entry->call_site, __entry->ptr) +) + +DEFINE_EVENT (kmem_free, kfree, + + TP_PROTO(unsigned long call_site, const void *ptr), + +TP_ARGS (call_site, ptr) +) + +DEFINE_EVENT (kmem_free, kmem_cache_free, + + TP_PROTO(unsigned long call_site, const void *ptr), + +TP_ARGS (call_site, ptr) +) + +TRACE_EVENT (mm_page_free_direct, + + TP_PROTO(struct page *page, unsigned int order), + +TP_ARGS (page, order), + +TP_STRUCT__entry ( + __field( struct page *, page ) + __field( unsigned int, order ) + ), + +TP_fast_assign ( + tp_assign(page, page); + tp_assign(order, order); + ), + +TP_printk ("page=%p pfn=%lu order=%d" , + __entry->page, +page_to_pfn (__entry->page), + __entry->order) +) + +TRACE_EVENT (mm_pagevec_free, + + TP_PROTO(struct page *page, int cold), + +TP_ARGS (page, cold), + +TP_STRUCT__entry ( + __field( struct page *, page ) +__field ( int, cold ) + ), + +TP_fast_assign ( + tp_assign(page, page); + tp_assign(cold, cold); + ), + +TP_printk ("page=%p pfn=%lu order=0 cold=%d" , + __entry->page, +page_to_pfn (__entry->page), + __entry->cold) +) + +TRACE_EVENT (mm_page_alloc, + + TP_PROTO(struct page *page, unsigned int order, + gfp_t gfp_flags, int migratetype), + +TP_ARGS (page, order, gfp_flags, migratetype), + +TP_STRUCT__entry ( + __field( struct page *, page ) + __field( unsigned int, order ) + __field( gfp_t, gfp_flags ) +__field ( int, migratetype ) + ), + +TP_fast_assign ( + tp_assign(page, page); + tp_assign(order, order); + tp_assign(gfp_flags, gfp_flags); + tp_assign(migratetype, migratetype); + ), + +TP_printk ("page=%p pfn=%lu order=%d migratetype=%d gfp_flags=%s" , + __entry->page, +page_to_pfn (__entry->page), + __entry->order, + __entry->migratetype, +show_gfp_flags (__entry->gfp_flags)) +) + +DECLARE_EVENT_CLASS (mm_page, + + TP_PROTO(struct page *page, unsigned int order, int migratetype), + +TP_ARGS (page, order, migratetype), + +TP_STRUCT__entry ( + __field( struct page *, page ) + __field( unsigned int, order ) +__field ( int, migratetype ) + ), + +TP_fast_assign ( + tp_assign(page, page); + tp_assign(order, order); + tp_assign(migratetype, migratetype); + ), + +TP_printk ("page=%p pfn=%lu order=%u migratetype=%d percpu_refill=%d" , + __entry->page, +page_to_pfn (__entry->page), + __entry->order, + __entry->migratetype, + __entry->order ==0 ) +) + +DEFINE_EVENT (mm_page, mm_page_alloc_zone_locked, + + TP_PROTO(struct page *page, unsigned int order, int migratetype), + +TP_ARGS (page, order, migratetype) +) + +DEFINE_EVENT_PRINT (mm_page, mm_page_pcpu_drain, + + TP_PROTO(struct page *page, unsigned int order, int migratetype), + +TP_ARGS (page, order, migratetype), + +TP_printk ("page=%p pfn=%lu order=%d migratetype=%d" , + __entry->page,page_to_pfn (__entry->page), + __entry->order, __entry->migratetype) +) + +TRACE_EVENT (mm_page_alloc_extfrag, + + TP_PROTO(struct page *page, + int alloc_order, int fallback_order, + int alloc_migratetype, int fallback_migratetype), + +TP_ARGS (page, + alloc_order, fallback_order, + alloc_migratetype, fallback_migratetype), + +TP_STRUCT__entry ( + __field( struct page *, page ) + __field( int, alloc_order ) + __field( int, fallback_order ) + __field( int, alloc_migratetype ) +__field ( int, fallback_migratetype ) + ), + +TP_fast_assign ( + tp_assign(page, page); + tp_assign(alloc_order, alloc_order); + tp_assign(fallback_order, fallback_order); + tp_assign(alloc_migratetype, alloc_migratetype); + tp_assign(fallback_migratetype, fallback_migratetype); + ), + +TP_printk ("page=%p pfn=%lu alloc_order=%d fallback_order=%d pageblock_order=%d alloc_migratetype=%d fallback_migratetype=%d fragmenting=%d change_ownership=%d" , + __entry->page, +page_to_pfn (__entry->page), + __entry->alloc_order, + __entry->fallback_order, + pageblock_order, + __entry->alloc_migratetype, + __entry->fallback_migratetype, + __entry->fallback_order < pageblock_order, + __entry->alloc_migratetype == __entry->fallback_migratetype) +) + +#endif /* _TRACE_KMEM_H */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/lock.h new file +86
-0@@ -0,0 +1,86 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM lock + +#if !defined(_TRACE_LOCK_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_LOCK_H + +#include <linux/lockdep.h> +#include <linux/tracepoint.h> + +#ifdef CONFIG_LOCKDEP + +TRACE_EVENT (lock_acquire, + + TP_PROTO(struct lockdep_map *lock, unsigned int subclass, + int trylock, int read, int check, + struct lockdep_map *next_lock, unsigned long ip), + +TP_ARGS (lock, subclass, trylock, read, check, next_lock, ip), + +TP_STRUCT__entry ( + __field(unsigned int, flags) + __string(name, lock->name) + __field(void *, lockdep_addr) + ), + +TP_fast_assign ( + tp_assign(flags, (trylock ? 1 : 0) | (read ? 2 : 0)); + tp_strcpy(name, lock->name); + tp_assign(lockdep_addr, lock); + ), + +TP_printk ("%p %s%s%s" , __entry->lockdep_addr, + (__entry->flags &1 ) ?"try " :"" , + (__entry->flags &2 ) ?"read " :"" , +__get_str (name)) +) + +DECLARE_EVENT_CLASS (lock, + + TP_PROTO(struct lockdep_map *lock, unsigned long ip), + +TP_ARGS (lock, ip), + +TP_STRUCT__entry ( + __string( name, lock->name ) + __field( void *, lockdep_addr ) + ), + +TP_fast_assign ( + tp_strcpy(name, lock->name); + tp_assign(lockdep_addr, lock); + ), + +TP_printk ("%p %s" , __entry->lockdep_addr,__get_str (name)) +) + +DEFINE_EVENT (lock, lock_release, + + TP_PROTO(struct lockdep_map *lock, unsigned long ip), + +TP_ARGS (lock, ip) +) + +#ifdef CONFIG_LOCK_STAT + +DEFINE_EVENT (lock, lock_contended, + + TP_PROTO(struct lockdep_map *lock, unsigned long ip), + +TP_ARGS (lock, ip) +) + +DEFINE_EVENT (lock, lock_acquired, + + TP_PROTO(struct lockdep_map *lock, unsigned long ip), + +TP_ARGS (lock, ip) +) + +#endif +#endif + +#endif /* _TRACE_LOCK_H */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/module.h new file +134
-0@@ -0,0 +1,134 @@ +/* +* Because linux/module.h has tracepoints in the header, and ftrace.h +* eventually includes this file, define_trace.h includes linux/module.h +* But we do not want the module.h to override the TRACE_SYSTEM macro +* variable that define_trace.h is processing, so we only set it +* when module events are being processed, which would happen when +* CREATE_TRACE_POINTS is defined. +*/ +#ifdef CREATE_TRACE_POINTS +#undef TRACE_SYSTEM +#define TRACE_SYSTEM module +#endif + +#if !defined(_TRACE_MODULE_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_MODULE_H + +#include <linux/tracepoint.h> + +#ifdef CONFIG_MODULES + +#ifndef _TRACE_MODULE_DEF +#define _TRACE_MODULE_DEF +struct module ; + +#define show_module_flags (flags) __print_flags(flags, "", \ + { (1UL << TAINT_PROPRIETARY_MODULE), "P" }, \ + { (1UL << TAINT_FORCED_MODULE), "F" }, \ + { (1UL << TAINT_CRAP), "C" }) +#endif + +TRACE_EVENT (module_load, + + TP_PROTO(struct module *mod), + +TP_ARGS (mod), + +TP_STRUCT__entry ( + __field( unsigned int, taints ) +__string ( name, mod->name ) + ), + +TP_fast_assign ( + tp_assign(taints, mod->taints); + tp_strcpy(name, mod->name); + ), + +TP_printk ("%s %s" ,__get_str (name),show_module_flags (__entry->taints)) +) + +TRACE_EVENT (module_free, + + TP_PROTO(struct module *mod), + +TP_ARGS (mod), + +TP_STRUCT__entry ( +__string ( name, mod->name ) + ), + +TP_fast_assign ( + tp_strcpy(name, mod->name); + ), + +TP_printk ("%s" ,__get_str (name)) +) + +#ifdef CONFIG_MODULE_UNLOAD +/* trace_module_get/put are only used if CONFIG_MODULE_UNLOAD is defined */ + +DECLARE_EVENT_CLASS (module_refcnt, + + TP_PROTO(struct module *mod, unsigned long ip), + +TP_ARGS (mod, ip), + +TP_STRUCT__entry ( + __field( unsigned long, ip ) + __field( int, refcnt ) +__string ( name, mod->name ) + ), + +TP_fast_assign ( + tp_assign(ip, ip); + tp_assign(refcnt, __this_cpu_read(mod->refptr->incs) + __this_cpu_read(mod->refptr->decs)); + tp_strcpy(name, mod->name); + ), + +TP_printk ("%s call_site=%pf refcnt=%d" , +__get_str (name), (void *)__entry->ip, __entry->refcnt) +) + +DEFINE_EVENT (module_refcnt, module_get, + + TP_PROTO(struct module *mod, unsigned long ip), + +TP_ARGS (mod, ip) +) + +DEFINE_EVENT (module_refcnt, module_put, + + TP_PROTO(struct module *mod, unsigned long ip), + +TP_ARGS (mod, ip) +) +#endif /* CONFIG_MODULE_UNLOAD */ + +TRACE_EVENT (module_request, + + TP_PROTO(char *name, bool wait, unsigned long ip), + +TP_ARGS (name, wait, ip), + +TP_STRUCT__entry ( + __field( unsigned long, ip ) + __field( bool, wait ) +__string ( name, name ) + ), + +TP_fast_assign ( + tp_assign(ip, ip); + tp_assign(wait, wait); + tp_strcpy(name, name); + ), + +TP_printk ("%s wait=%d call_site=%pf" , +__get_str (name), (int )__entry->wait, (void *)__entry->ip) +) + +#endif /* CONFIG_MODULES */ + +#endif /* _TRACE_MODULE_H */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/napi.h new file +38
-0@@ -0,0 +1,38 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM napi + +#if !defined(_TRACE_NAPI_H_) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_NAPI_H_ + +#include <linux/netdevice.h> +#include <linux/tracepoint.h> +#include <linux/ftrace.h> + +#define NO_DEV "(no_device)" + +TRACE_EVENT (napi_poll, + + TP_PROTO(struct napi_struct *napi), + +TP_ARGS (napi), + +TP_STRUCT__entry ( + __field( struct napi_struct *, napi) +__string ( dev_name, napi->dev ? napi->dev->name :NO_DEV ) + ), + +TP_fast_assign ( + tp_assign(napi, napi); + tp_strcpy(dev_name, napi->dev ? napi->dev->name : NO_DEV); + ), + +TP_printk ("napi poll on napi struct %p for device %s" , + __entry->napi,__get_str (dev_name)) +) + +#undef NO_DEV + +#endif /* _TRACE_NAPI_H_ */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/net.h new file +84
-0@@ -0,0 +1,84 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM net + +#if !defined(_TRACE_NET_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_NET_H + +#include <linux/skbuff.h> +#include <linux/netdevice.h> +#include <linux/ip.h> +#include <linux/tracepoint.h> + +TRACE_EVENT (net_dev_xmit, + + TP_PROTO(struct sk_buff *skb, + int rc, + struct net_device *dev, + unsigned int skb_len), + +TP_ARGS (skb, rc, dev, skb_len), + +TP_STRUCT__entry ( + __field( void *, skbaddr ) + __field( unsigned int, len ) + __field( int, rc ) +__string ( name, dev->name ) + ), + +TP_fast_assign ( + tp_assign(skbaddr, skb); + tp_assign(len, skb_len); + tp_assign(rc, rc); + tp_strcpy(name, dev->name); + ), + +TP_printk ("dev=%s skbaddr=%p len=%u rc=%d" , +__get_str (name), __entry->skbaddr, __entry->len, __entry->rc) +) + +DECLARE_EVENT_CLASS (net_dev_template, + + TP_PROTO(struct sk_buff *skb), + +TP_ARGS (skb), + +TP_STRUCT__entry ( + __field( void *, skbaddr ) + __field( unsigned int, len ) +__string ( name, skb->dev->name ) + ), + +TP_fast_assign ( + tp_assign(skbaddr, skb); + tp_assign(len, skb->len); + tp_strcpy(name, skb->dev->name); + ), + +TP_printk ("dev=%s skbaddr=%p len=%u" , +__get_str (name), __entry->skbaddr, __entry->len) +) + +DEFINE_EVENT (net_dev_template, net_dev_queue, + + TP_PROTO(struct sk_buff *skb), + +TP_ARGS (skb) +) + +DEFINE_EVENT (net_dev_template, netif_receive_skb, + + TP_PROTO(struct sk_buff *skb), + +TP_ARGS (skb) +) + +DEFINE_EVENT (net_dev_template, netif_rx, + + TP_PROTO(struct sk_buff *skb), + +TP_ARGS (skb) +) +#endif /* _TRACE_NET_H */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/power.h new file +240
-0@@ -0,0 +1,240 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM power + +#if !defined(_TRACE_POWER_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_POWER_H + +#include <linux/ktime.h> +#include <linux/tracepoint.h> + +DECLARE_EVENT_CLASS (cpu, + + TP_PROTO(unsigned int state, unsigned int cpu_id), + +TP_ARGS (state, cpu_id), + +TP_STRUCT__entry ( + __field( u32, state ) +__field ( u32, cpu_id ) + ), + +TP_fast_assign ( + tp_assign(state, state); + tp_assign(cpu_id, cpu_id); + ), + +TP_printk ("state=%lu cpu_id=%lu" , (unsigned long )__entry->state, + (unsigned long )__entry->cpu_id) +) + +DEFINE_EVENT (cpu, cpu_idle, + + TP_PROTO(unsigned int state, unsigned int cpu_id), + +TP_ARGS (state, cpu_id) +) + +/* This file can get included multiple times, TRACE_HEADER_MULTI_READ at top */ +#ifndef _PWR_EVENT_AVOID_DOUBLE_DEFINING +#define _PWR_EVENT_AVOID_DOUBLE_DEFINING + +#define PWR_EVENT_EXIT -1 +#endif + +DEFINE_EVENT (cpu, cpu_frequency, + + TP_PROTO(unsigned int frequency, unsigned int cpu_id), + +TP_ARGS (frequency, cpu_id) +) + +TRACE_EVENT (machine_suspend, + + TP_PROTO(unsigned int state), + +TP_ARGS (state), + +TP_STRUCT__entry ( +__field ( u32, state ) + ), + +TP_fast_assign ( + tp_assign(state, state); + ), + +TP_printk ("state=%lu" , (unsigned long )__entry->state) +) + +/* This code will be removed after deprecation time exceeded (2.6.41) */ +#ifdef CONFIG_EVENT_POWER_TRACING_DEPRECATED + +/* +* The power events are used for cpuidle & suspend (power_start, power_end) +* and for cpufreq (power_frequency) +*/ +DECLARE_EVENT_CLASS (power, + + TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id), + +TP_ARGS (type, state, cpu_id), + +TP_STRUCT__entry ( + __field( u64, type ) + __field( u64, state ) +__field ( u64, cpu_id ) + ), + +TP_fast_assign ( + tp_assign(type, type); + tp_assign(state, state); + tp_assign(cpu_id, cpu_id); + ), + +TP_printk ("type=%lu state=%lu cpu_id=%lu" , (unsigned long )__entry->type, + (unsigned long )__entry->state, (unsigned long )__entry->cpu_id) +) + +DEFINE_EVENT (power, power_start, + + TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id), + +TP_ARGS (type, state, cpu_id) +) + +DEFINE_EVENT (power, power_frequency, + + TP_PROTO(unsigned int type, unsigned int state, unsigned int cpu_id), + +TP_ARGS (type, state, cpu_id) +) + +TRACE_EVENT (power_end, + + TP_PROTO(unsigned int cpu_id), + +TP_ARGS (cpu_id), + +TP_STRUCT__entry ( +__field ( u64, cpu_id ) + ), + +TP_fast_assign ( + tp_assign(cpu_id, cpu_id); + ), + +TP_printk ("cpu_id=%lu" , (unsigned long )__entry->cpu_id) + +) + +/* Deprecated dummy functions must be protected against multi-declartion */ +#ifndef _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED +#define _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED + +enum { +POWER_NONE =0 , +POWER_CSTATE =1 , +POWER_PSTATE =2 , +}; +#endif /* _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED */ + +#else /* CONFIG_EVENT_POWER_TRACING_DEPRECATED */ + +#ifndef _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED +#define _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED +enum { +POWER_NONE =0 , +POWER_CSTATE =1 , +POWER_PSTATE =2 , +}; + +/* These dummy declaration have to be ripped out when the deprecated +events get removed */ +static inline void trace_power_start (u64 type,u64 state,u64 cpuid) {}; +static inline void trace_power_end (u64 cpuid) {}; +static inline void trace_power_frequency (u64 type,u64 state,u64 cpuid) {}; +#endif /* _PWR_EVENT_AVOID_DOUBLE_DEFINING_DEPRECATED */ + +#endif /* CONFIG_EVENT_POWER_TRACING_DEPRECATED */ + +/* +* The clock events are used for clock enable/disable and for +* clock rate change +*/ +DECLARE_EVENT_CLASS (clock, + + TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id), + +TP_ARGS (name, state, cpu_id), + +TP_STRUCT__entry ( + __string( name, name ) + __field( u64, state ) +__field ( u64, cpu_id ) + ), + +TP_fast_assign ( + tp_strcpy(name, name); + tp_assign(state, state); + tp_assign(cpu_id, cpu_id); + ), + +TP_printk ("%s state=%lu cpu_id=%lu" ,__get_str (name), + (unsigned long )__entry->state, (unsigned long )__entry->cpu_id) +) + +DEFINE_EVENT (clock, clock_enable, + + TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id), + +TP_ARGS (name, state, cpu_id) +) + +DEFINE_EVENT (clock, clock_disable, + + TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id), + +TP_ARGS (name, state, cpu_id) +) + +DEFINE_EVENT (clock, clock_set_rate, + + TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id), + +TP_ARGS (name, state, cpu_id) +) + +/* +* The power domain events are used for power domains transitions + */ +DECLARE_EVENT_CLASS (power_domain, + + TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id), + +TP_ARGS (name, state, cpu_id), + +TP_STRUCT__entry ( + __string( name, name ) + __field( u64, state ) +__field ( u64, cpu_id ) + ), + +TP_fast_assign ( + tp_strcpy(name, name); + tp_assign(state, state); + tp_assign(cpu_id, cpu_id); +), + +TP_printk ("%s state=%lu cpu_id=%lu" ,__get_str (name), + (unsigned long )__entry->state, (unsigned long )__entry->cpu_id) +) + +DEFINE_EVENT (power_domain, power_domain_target, + + TP_PROTO(const char *name, unsigned int state, unsigned int cpu_id), + +TP_ARGS (name, state, cpu_id) +) +#endif /* _TRACE_POWER_H */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/regulator.h new file +141
-0@@ -0,0 +1,141 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM regulator + +#if !defined(_TRACE_REGULATOR_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_REGULATOR_H + +#include <linux/ktime.h> +#include <linux/tracepoint.h> + +/* +* Events which just log themselves and the regulator name for enable/disable +* type tracking. +*/ +DECLARE_EVENT_CLASS (regulator_basic, + + TP_PROTO(const char *name), + +TP_ARGS (name), + +TP_STRUCT__entry ( +__string ( name, name ) + ), + +TP_fast_assign ( + tp_strcpy(name, name); + ), + +TP_printk ("name=%s" ,__get_str (name)) + +) + +DEFINE_EVENT (regulator_basic, regulator_enable, + + TP_PROTO(const char *name), + +TP_ARGS (name) + +) + +DEFINE_EVENT (regulator_basic, regulator_enable_delay, + + TP_PROTO(const char *name), + +TP_ARGS (name) + +) + +DEFINE_EVENT (regulator_basic, regulator_enable_complete, + + TP_PROTO(const char *name), + +TP_ARGS (name) + +) + +DEFINE_EVENT (regulator_basic, regulator_disable, + + TP_PROTO(const char *name), + +TP_ARGS (name) + +) + +DEFINE_EVENT (regulator_basic, regulator_disable_complete, + + TP_PROTO(const char *name), + +TP_ARGS (name) + +) + +/* +* Events that take a range of numerical values, mostly for voltages +* and so on. + */ +DECLARE_EVENT_CLASS (regulator_range, + + TP_PROTO(const char *name, int min, int max), + +TP_ARGS (name, min, max), + +TP_STRUCT__entry ( + __string( name, name ) + __field( int, min ) +__field ( int, max ) + ), + +TP_fast_assign ( + tp_strcpy(name, name); + tp_assign(min, min); + tp_assign(max, max); + ), + +TP_printk ("name=%s (%d-%d)" ,__get_str (name), + (int )__entry->min, (int )__entry->max) +) + +DEFINE_EVENT (regulator_range, regulator_set_voltage, + + TP_PROTO(const char *name, int min, int max), + +TP_ARGS (name, min, max) + +) + + +/* +* Events that take a single value, mostly for readback and refcounts. + */ +DECLARE_EVENT_CLASS (regulator_value, + + TP_PROTO(const char *name, unsigned int val), + +TP_ARGS (name, val), + +TP_STRUCT__entry ( + __string( name, name ) + __field( unsigned int, val ) + ), + +TP_fast_assign ( + tp_strcpy(name, name); + tp_assign(val, val); + ), + +TP_printk ("name=%s, val=%u" ,__get_str (name), + (int )__entry->val) +) + +DEFINE_EVENT (regulator_value, regulator_set_voltage_complete, + + TP_PROTO(const char *name, unsigned int value), + +TP_ARGS (name, value) + +) + +#endif /* _TRACE_POWER_H */ + +/* This part must be outside protection */ +#include "../../../probes/define_trace.h" instrumentation/events/lttng-module/scsi.h new file +369
-0@@ -0,0 +1,369 @@ +#undef TRACE_SYSTEM +#define TRACE_SYSTEM scsi + +#if !defined(_TRACE_SCSI_H) || defined(TRACE_HEADER_MULTI_READ ) +#define _TRACE_SCSI_H + +#include <scsi/scsi_cmnd.h> +#include <scsi/scsi_host.h> +#include <linux/tracepoint.h> +#include <linux/trace_seq.h> + +#ifndef _TRACE_SCSI_DEF +#define _TRACE_SCSI_DEF + +#define scsi_opcode_name (opcode) { opcode, #opcode } +#define show_opcode_name (val) \ + __print_symbolic(val, \ + scsi_opcode_name(TEST_UNIT_READY), \ + scsi_opcode_name(REZERO_UNIT), \ + scsi_opcode_name(REQUEST_SENSE), \ + scsi_opcode_name(FORMAT_UNIT), \ + scsi_opcode_name(READ_BLOCK_LIMITS), \ + scsi_opcode_name(REASSIGN_BLOCKS), \ + scsi_opcode_name(INITIALIZE_ELEMENT_STATUS), \ + scsi_opcode_name(READ_6), \ + scsi_opcode_name(WRITE_6), \ + scsi_opcode_name(SEEK_6), \ + scsi_opcode_name(READ_REVERSE), \ + scsi_opcode_name(WRITE_FILEMARKS), \ + scsi_opcode_name(SPACE), \ + scsi_opcode_name(INQUIRY), \ + scsi_opcode_name(RECOVER_BUFFERED_DATA), \ + scsi_opcode_name(MODE_SELECT), \ + scsi_opcode_name(RESERVE), \ + scsi_opcode_name(RELEASE), \ + scsi_opcode_name(COPY), \ + scsi_opcode_name(ERASE), \ + scsi_opcode_name(MODE_SENSE), \ + scsi_opcode_name(START_STOP), \ + scsi_opcode_name(RECEIVE_DIAGNOSTIC), \ + scsi_opcode_name(SEND_DIAGNOSTIC), \ + scsi_opcode_name(ALLOW_MEDIUM_REMOVAL), \ + scsi_opcode_name(SET_WINDOW), \ + scsi_opcode_name(READ_CAPACITY), \ + scsi_opcode_name(READ_10), \ + scsi_opcode_name(WRITE_10), \ + scsi_opcode_name(SEEK_10), \ + scsi_opcode_name(POSITION_TO_ELEMENT), \ + scsi_opcode_name(WRITE_VERIFY), \ + scsi_opcode_name(VERIFY), \ + scsi_opcode_name(SEARCH_HIGH), \ + scsi_opcode_name(SEARCH_EQUAL), \ + scsi_opcode_name(SEARCH_LOW), \ + scsi_opcode_name(SET_LIMITS), \ + scsi_opcode_name(PRE_FETCH), \ + scsi_opcode_name(READ_POSITION), \ + scsi_opcode_name(SYNCHRONIZE_CACHE), \ + scsi_opcode_name(LOCK_UNLOCK_CACHE), \ + scsi_opcode_name(READ_DEFECT_DATA), \ + scsi_opcode_name(MEDIUM_SCAN), \ + scsi_opcode_name(COMPARE), \ + scsi_opcode_name(COPY_VERIFY), \ + scsi_opcode_name(WRITE_BUFFER), \ + scsi_opcode_name(READ_BUFFER), \ + scsi_opcode_name(UPDATE_BLOCK), \ + scsi_opcode_name(READ_LONG), \ + scsi_opcode_name(WRITE_LONG), \ + scsi_opcode_name(CHANGE_DEFINITION), \ + scsi_opcode_name(WRITE_SAME), \ + scsi_opcode_name(UNMAP), \ + scsi_opcode_name(READ_TOC), \ + scsi_opcode_name(LOG_SELECT), \ + scsi_opcode_name(LOG_SENSE), \ + scsi_opcode_name(XDWRITEREAD_10), \ + scsi_opcode_name(MODE_SELECT_10), \ + scsi_opcode_name(RESERVE_10), \ + scsi_opcode_name(RELEASE_10), \ + scsi_opcode_name(MODE_SENSE_10), \ + scsi_opcode_name(PERSISTENT_RESERVE_IN), \ + scsi_opcode_name(PERSISTENT_RESERVE_OUT), \ + scsi_opcode_name(VARIABLE_LENGTH_CMD), \ + scsi_opcode_name(REPORT_LUNS), \ + scsi_opcode_name(MAINTENANCE_IN), \ + scsi_opcode_name(MAINTENANCE_OUT), \ + scsi_opcode_name(MOVE_MEDIUM), \ + scsi_opcode_name(EXCHANGE_MEDIUM), \ + scsi_opcode_name(READ_12), \ + scsi_opcode_name(WRITE_12), \ + scsi_opcode_name(WRITE_VERIFY_12), \ + scsi_opcode_name(SEARCH_HIGH_12), \ + scsi_opcode_name(SEARCH_EQUAL_12), \ + scsi_opcode_name(SEARCH_LOW_12), \ + scsi_opcode_name(READ_ELEMENT_STATUS), \ + scsi_opcode_name(SEND_VOLUME_TAG), \ + scsi_opcode_name(WRITE_LONG_2), \ + scsi_opcode_name(READ_16), \ + scsi_opcode_name(WRITE_16), \ + scsi_opcode_name(VERIFY_16), \ + scsi_opcode_name(WRITE_SAME_16), \ + scsi_opcode_name(SERVICE_ACTION_IN), \ + scsi_opcode_name(SAI_READ_CAPACITY_16), \ + scsi_opcode_name(SAI_GET_LBA_STATUS), \ + scsi_opcode_name(MI_REPORT_TARGET_PGS), \ + scsi_opcode_name(MO_SET_TARGET_PGS), \ + scsi_opcode_name(READ_32), \ + scsi_opcode_name(WRITE_32), \ + scsi_opcode_name(WRITE_SAME_32), \ + scsi_opcode_name(ATA_16), \ + scsi_opcode_name(ATA_12)) + +#define scsi_hostbyte_name (result) { result, #result } +#define show_hostbyte_name (val) \ + __print_symbolic(val, \ + scsi_hostbyte_name(DID_OK), \ + scsi_hostbyte_name(DID_NO_CONNECT), \ + scsi_hostbyte_name(DID_BUS_BUSY), \ + scsi_hostbyte_name(DID_TIME_OUT), \ + scsi_hostbyte_name(DID_BAD_TARGET), \ + scsi_hostbyte_name(DID_ABORT), \ + scsi_hostbyte_name(DID_PARITY), \ + scsi_hostbyte_name(DID_ERROR), \ + scsi_hostbyte_name(DID_RESET), \ + scsi_hostbyte_name(DID_BAD_INTR), \ + scsi_hostbyte_name(DID_PASSTHROUGH), \ + scsi_hostbyte_name(DID_SOFT_ERROR), \ + scsi_hostbyte_name(DID_IMM_RETRY), \ + scsi_hostbyte_name(DID_REQUEUE), \ + scsi_hostbyte_name(DID_TRANSPORT_DISRUPTED), \ + scsi_hostbyte_name(DID_TRANSPORT_FAILFAST)) + +#define scsi_driverbyte_name (result) { result, #result } +#define show_driverbyte_name (val) \ + __print_symbolic(val, \ + scsi_driverbyte_name(DRIVER_OK), \ + scsi_driverbyte_name(DRIVER_BUSY), \ + scsi_driverbyte_name(DRIVER_SOFT), \ + scsi_driverbyte_name(DRIVER_MEDIA), \ + scsi_driverbyte_name(DRIVER_ERROR), \ + scsi_driverbyte_name(DRIVER_INVALID), \ + scsi_driverbyte_name(DRIVER_TIMEOUT), \ + scsi_driverbyte_name(DRIVER_HARD), \ + scsi_driverbyte_name(DRIVER_SENSE)) + +#define scsi_msgbyte_name (result) { result, #result } +#define show_msgbyte_name (val) \ + __print_symbolic(val, \ + scsi_msgbyte_name(COMMAND_COMPLETE), \ + scsi_msgbyte_name(EXTENDED_MESSAGE), \ + scsi_msgbyte_name(SAVE_POINTERS), \ + scsi_msgbyte_name(RESTORE_POINTERS), \ + scsi_msgbyte_name(DISCONNECT), \ + scsi_msgbyte_name(INITIATOR_ERROR), \ + scsi_msgbyte_name(ABORT_TASK_SET), \ + scsi_msgbyte_name(MESSAGE_REJECT), \ + scsi_msgbyte_name(NOP), \ + scsi_msgbyte_name(MSG_PARITY_ERROR), \ + scsi_msgbyte_name(LINKED_CMD_COMPLETE), \ + scsi_msgbyte_name(LINKED_FLG_CMD_COMPLETE), \ + scsi_msgbyte_name(TARGET_RESET), \ + scsi_msgbyte_name(ABORT_TASK), \ + scsi_msgbyte_name(CLEAR_TASK_SET), \ + scsi_msgbyte_name(INITIATE_RECOVERY), \ + scsi_msgbyte_name(RELEASE_RECOVERY), \ + scsi_msgbyte_name(CLEAR_ACA), \ + scsi_msgbyte_name(LOGICAL_UNIT_RESET), \ + scsi_msgbyte_name(SIMPLE_QUEUE_TAG), \ + scsi_msgbyte_name(HEAD_OF_QUEUE_TAG), \ + scsi_msgbyte_name(ORDERED_QUEUE_TAG), \ + scsi_msgbyte_name(IGNORE_WIDE_RESIDUE), \ + scsi_msgbyte_name(ACA), \ + scsi_msgbyte_name(QAS_REQUEST), \ + scsi_msgbyte_name(BUS_DEVICE_RESET), \ + scsi_msgbyte_name(ABORT)) + +#define scsi_statusbyte_name (result) { result, #result } +#define show_statusbyte_name (val) \ + __print_symbolic(val, \ + scsi_statusbyte_name(SAM_STAT_GOOD), \ + scsi_statusbyte_name(SAM_STAT_CHECK_CONDITION), \ + scsi_statusbyte_name(SAM_STAT_CONDITION_MET), \ + scsi_statusbyte_name(SAM_STAT_BUSY), \ + scsi_statusbyte_name(SAM_STAT_INTERMEDIATE), \ + scsi_statusbyte_name(SAM_STAT_INTERMEDIATE_CONDITION_MET), \ + scsi_statusbyte_name(SAM_STAT_RESERVATION_CONFLICT), \ + scsi_statusbyte_name(SAM_STAT_COMMAND_TERMINATED), \ + scsi_statusbyte_name(SAM_STAT_TASK_SET_FULL), \ + scsi_statusbyte_name(SAM_STAT_ACA_ACTIVE), \ + scsi_statusbyte_name(SAM_STAT_TASK_ABORTED)) + +#define scsi_prot_op_name (result) { result, #result } +#define show_prot_op_name (val) \ + __print_symbolic(val, \ + scsi_prot_op_name(SCSI_PROT_NORMAL), \ + scsi_prot_op_name(SCSI_PROT_READ_INSERT), \ + scsi_prot_op_name(SCSI_PROT_WRITE_STRIP), \ + scsi_prot_op_name(SCSI_PROT_READ_STRIP), \ + scsi_prot_op_name(SCSI_PROT_WRITE_INSERT), \ + scsi_prot_op_name(SCSI_PROT_READ_PASS), \ + scsi_prot_op_name(SCSI_PROT_WRITE_PASS)) + +const char *scsi_trace_parse_cdb (struct trace_seq *,unsigned char *,int ); +#define __parse_cdb (cdb, len) scsi_trace_parse_cdb(p, cdb, len) +#endif + +TRACE_EVENT(scsi_dispatch_cmd_start, + + TP_PROTO(struct scsi_cmnd *cmd), + + TP_ARGS(cmd), + + TP_STRUCT__entry( + __field( unsigned int, host_no ) + __field( unsigned int, channel ) + __field( unsigned int, id ) + __field( unsigned int, lun ) + __field( unsigned int, opcode ) + __field( unsigned int, cmd_len ) + __field( unsigned int, data_sglen ) + __field( unsigned int, prot_sglen ) + __field( unsigned char, prot_op ) + __dynamic_array_hex(unsigned char, cmnd, cmd->cmd_len) + ), + + TP_fast_assign( + tp_assign(host_no, cmd->device->host->host_no); + tp_assign(channel, cmd->device->channel);Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/skb.h new file +75
-0Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/sock.h new file +68
-0Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/udp.h new file +32
-0Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/vmscan.h new file +499
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/asoc.h new file +330
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/ext3.h new file +864
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/fs_ext3.h new file +1323
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/gpio.h new file +56
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/jbd.h new file +203
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/jbd2.h new file +235
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/kmem.h new file +308
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/lock.h new file +86
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/module.h new file +131
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/napi.h new file +38
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/net.h new file +84
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/power.h new file +240
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/regulator.h new file +141
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/scsi.h new file +365
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/skb.h new file +75
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/sock.h new file +68
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/udp.h new file +32
-0Lines of this file are not shown. View the raw message.
instrumentation/events/mainline/vmscan.h new file +477
-0Lines of this file are not shown. View the raw message.
probes/lttng-probe-regulator.c new file +43
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 11 lines
1.7.10.4 From 5b1d2fa2044ba95020a12671da188fbe85967c80 Mon Sep 17 00:00:00 2001 From: Paul Woegerer <[email protected]> Date: Tue, 13 Nov 2012 16:58:22 +0100 Subject: [PATCH 2/3] Add ifdefs to net probe to support Linux 2.6.39 --- instrumentation/events/lttng-module/net.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)instrumentation/events/lttng-module/net.h +21
-0Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 27 lines
1.7.10.4 From 0f2be20124423c54865f9e45f035c75b8e7a5598 Mon Sep 17 00:00:00 2001 From: Paul Woegerer <[email protected]> Date: Wed, 14 Nov 2012 10:10:49 +0100 Subject: [PATCH 3/3] Remove semicolons in TP_fast_assign blocks. --- instrumentation/events/lttng-module/asoc.h | 54 ++--- instrumentation/events/lttng-module/ext3.h | 238 +++++++++++------------ instrumentation/events/lttng-module/gpio.h | 12 +- instrumentation/events/lttng-module/jbd.h | 44 ++--- instrumentation/events/lttng-module/jbd2.h | 42 ++-- instrumentation/events/lttng-module/kmem.h | 58 +++--- instrumentation/events/lttng-module/lock.h | 10 +- instrumentation/events/lttng-module/module.h | 18 +- instrumentation/events/lttng-module/napi.h | 4 +- instrumentation/events/lttng-module/net.h | 22 +-- instrumentation/events/lttng-module/power.h | 26 +-- instrumentation/events/lttng-module/regulator.h | 12 +- instrumentation/events/lttng-module/scsi.h | 66 +++---- instrumentation/events/lttng-module/skb.h | 12 +- instrumentation/events/lttng-module/sock.h | 14 +- instrumentation/events/lttng-module/udp.h | 4 +- instrumentation/events/lttng-module/vmscan.h | 104 +++++----- 17 files changed, 370 insertions(+), 370 deletions(-)instrumentation/events/lttng-module/asoc.h +27
-27Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/ext3.h +119
-119Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/gpio.h +6
-6Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/jbd.h +22
-22Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/jbd2.h +21
-21Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/kmem.h +29
-29Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/lock.h +5
-5Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/module.h +9
-9Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/napi.h +2
-2Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/net.h +11
-11Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/power.h +13
-13Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/regulator.h +6
-6Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/scsi.h +33
-33Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/skb.h +6
-6Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/sock.h +7
-7Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/udp.h +2
-2Lines of this file are not shown. View the raw message.
instrumentation/events/lttng-module/vmscan.h +52
-52Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.7.10.4
Signature · 4 lines
Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com
Part of the diff is not shown here. View the raw message.
Quoted 11 lines · Mathieu Desnoyers
Quoted 5 lines · * Woegerer, Paul ([email protected]) wrote:
Fixed for all probes.
See Subject: [PATCH 3/3] Remove semicolons inTP_fast_assignblocks.And now the updated patch series ...
All merged. For next time, a few nits: please send each patch in a separate email, and usually we don't put dots at the end of titles. Also, if you can put your Signed-off-by at the end of the patch header, it would follow our workflow entirely.
I'll keep this workflow info in mind for coming patches.
Thanks for merging,
Paul
Signature · 10 lines
Paul Woegerer | SW Development Engineer http://go.mentor.com/sourceryanalyzer Mentor Embedded(tm) | Prinz Eugen Straße 72/2/4, Vienna, 1040 Austria Nucleus® | Linux® | Android(tm) | Services | UI | Multi-OS Android is a trademark of Google Inc. Use of this trademark is subject to Google Permissions. Linux is the registered trademark of Linus Torvalds in the U.S. and other countries.