From: Mathieu Desnoyers Date: Sat, 25 Feb 2017 08:34:10 +0000 (+0100) Subject: Remove events/mainline unused headers X-Git-Tag: v2.10.0-rc1~23 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=17acc7d219dde75f8ac1a0925b2dba175815cffa;p=lttng-modules.git Remove events/mainline unused headers We can actually diff from Linux kernel headers directly instead of keeping stale unused copies of those headers. Signed-off-by: Mathieu Desnoyers --- diff --git a/instrumentation/events/mainline/arch/x86/kvm/mmutrace.h b/instrumentation/events/mainline/arch/x86/kvm/mmutrace.h deleted file mode 100644 index b8f6172f..00000000 --- a/instrumentation/events/mainline/arch/x86/kvm/mmutrace.h +++ /dev/null @@ -1,285 +0,0 @@ -#if !defined(_TRACE_KVMMMU_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_KVMMMU_H - -#include -#include - -#undef TRACE_SYSTEM -#define TRACE_SYSTEM kvmmmu - -#define KVM_MMU_PAGE_FIELDS \ - __field(__u64, gfn) \ - __field(__u32, role) \ - __field(__u32, root_count) \ - __field(bool, unsync) - -#define KVM_MMU_PAGE_ASSIGN(sp) \ - __entry->gfn = sp->gfn; \ - __entry->role = sp->role.word; \ - __entry->root_count = sp->root_count; \ - __entry->unsync = sp->unsync; - -#define KVM_MMU_PAGE_PRINTK() ({ \ - const char *ret = p->buffer + p->len; \ - static const char *access_str[] = { \ - "---", "--x", "w--", "w-x", "-u-", "-ux", "wu-", "wux" \ - }; \ - union kvm_mmu_page_role role; \ - \ - role.word = __entry->role; \ - \ - trace_seq_printf(p, "sp gfn %llx %u%s q%u%s %s%s" \ - " %snxe root %u %s%c", \ - __entry->gfn, role.level, \ - role.cr4_pae ? " pae" : "", \ - role.quadrant, \ - role.direct ? " direct" : "", \ - access_str[role.access], \ - role.invalid ? " invalid" : "", \ - role.nxe ? "" : "!", \ - __entry->root_count, \ - __entry->unsync ? "unsync" : "sync", 0); \ - ret; \ - }) - -#define kvm_mmu_trace_pferr_flags \ - { PFERR_PRESENT_MASK, "P" }, \ - { PFERR_WRITE_MASK, "W" }, \ - { PFERR_USER_MASK, "U" }, \ - { PFERR_RSVD_MASK, "RSVD" }, \ - { PFERR_FETCH_MASK, "F" } - -/* - * A pagetable walk has started - */ -TRACE_EVENT( - kvm_mmu_pagetable_walk, - TP_PROTO(u64 addr, u32 pferr), - TP_ARGS(addr, pferr), - - TP_STRUCT__entry( - __field(__u64, addr) - __field(__u32, pferr) - ), - - TP_fast_assign( - __entry->addr = addr; - __entry->pferr = pferr; - ), - - TP_printk("addr %llx pferr %x %s", __entry->addr, __entry->pferr, - __print_flags(__entry->pferr, "|", kvm_mmu_trace_pferr_flags)) -); - - -/* We just walked a paging element */ -TRACE_EVENT( - kvm_mmu_paging_element, - TP_PROTO(u64 pte, int level), - TP_ARGS(pte, level), - - TP_STRUCT__entry( - __field(__u64, pte) - __field(__u32, level) - ), - - TP_fast_assign( - __entry->pte = pte; - __entry->level = level; - ), - - TP_printk("pte %llx level %u", __entry->pte, __entry->level) -); - -DECLARE_EVENT_CLASS(kvm_mmu_set_bit_class, - - TP_PROTO(unsigned long table_gfn, unsigned index, unsigned size), - - TP_ARGS(table_gfn, index, size), - - TP_STRUCT__entry( - __field(__u64, gpa) - ), - - TP_fast_assign( - __entry->gpa = ((u64)table_gfn << PAGE_SHIFT) - + index * size; - ), - - TP_printk("gpa %llx", __entry->gpa) -); - -/* We set a pte accessed bit */ -DEFINE_EVENT(kvm_mmu_set_bit_class, kvm_mmu_set_accessed_bit, - - TP_PROTO(unsigned long table_gfn, unsigned index, unsigned size), - - TP_ARGS(table_gfn, index, size) -); - -/* We set a pte dirty bit */ -DEFINE_EVENT(kvm_mmu_set_bit_class, kvm_mmu_set_dirty_bit, - - TP_PROTO(unsigned long table_gfn, unsigned index, unsigned size), - - TP_ARGS(table_gfn, index, size) -); - -TRACE_EVENT( - kvm_mmu_walker_error, - TP_PROTO(u32 pferr), - TP_ARGS(pferr), - - TP_STRUCT__entry( - __field(__u32, pferr) - ), - - TP_fast_assign( - __entry->pferr = pferr; - ), - - TP_printk("pferr %x %s", __entry->pferr, - __print_flags(__entry->pferr, "|", kvm_mmu_trace_pferr_flags)) -); - -TRACE_EVENT( - kvm_mmu_get_page, - TP_PROTO(struct kvm_mmu_page *sp, bool created), - TP_ARGS(sp, created), - - TP_STRUCT__entry( - KVM_MMU_PAGE_FIELDS - __field(bool, created) - ), - - TP_fast_assign( - KVM_MMU_PAGE_ASSIGN(sp) - __entry->created = created; - ), - - TP_printk("%s %s", KVM_MMU_PAGE_PRINTK(), - __entry->created ? "new" : "existing") -); - -DECLARE_EVENT_CLASS(kvm_mmu_page_class, - - TP_PROTO(struct kvm_mmu_page *sp), - TP_ARGS(sp), - - TP_STRUCT__entry( - KVM_MMU_PAGE_FIELDS - ), - - TP_fast_assign( - KVM_MMU_PAGE_ASSIGN(sp) - ), - - TP_printk("%s", KVM_MMU_PAGE_PRINTK()) -); - -DEFINE_EVENT(kvm_mmu_page_class, kvm_mmu_sync_page, - TP_PROTO(struct kvm_mmu_page *sp), - - TP_ARGS(sp) -); - -DEFINE_EVENT(kvm_mmu_page_class, kvm_mmu_unsync_page, - TP_PROTO(struct kvm_mmu_page *sp), - - TP_ARGS(sp) -); - -DEFINE_EVENT(kvm_mmu_page_class, kvm_mmu_prepare_zap_page, - TP_PROTO(struct kvm_mmu_page *sp), - - TP_ARGS(sp) -); - -TRACE_EVENT( - mark_mmio_spte, - TP_PROTO(u64 *sptep, gfn_t gfn, unsigned access), - TP_ARGS(sptep, gfn, access), - - TP_STRUCT__entry( - __field(void *, sptep) - __field(gfn_t, gfn) - __field(unsigned, access) - ), - - TP_fast_assign( - __entry->sptep = sptep; - __entry->gfn = gfn; - __entry->access = access; - ), - - TP_printk("sptep:%p gfn %llx access %x", __entry->sptep, __entry->gfn, - __entry->access) -); - -TRACE_EVENT( - handle_mmio_page_fault, - TP_PROTO(u64 addr, gfn_t gfn, unsigned access), - TP_ARGS(addr, gfn, access), - - TP_STRUCT__entry( - __field(u64, addr) - __field(gfn_t, gfn) - __field(unsigned, access) - ), - - TP_fast_assign( - __entry->addr = addr; - __entry->gfn = gfn; - __entry->access = access; - ), - - TP_printk("addr:%llx gfn %llx access %x", __entry->addr, __entry->gfn, - __entry->access) -); - -#define __spte_satisfied(__spte) \ - (__entry->retry && is_writable_pte(__entry->__spte)) - -TRACE_EVENT( - fast_page_fault, - TP_PROTO(struct kvm_vcpu *vcpu, gva_t gva, u32 error_code, - u64 *sptep, u64 old_spte, bool retry), - TP_ARGS(vcpu, gva, error_code, sptep, old_spte, retry), - - TP_STRUCT__entry( - __field(int, vcpu_id) - __field(gva_t, gva) - __field(u32, error_code) - __field(u64 *, sptep) - __field(u64, old_spte) - __field(u64, new_spte) - __field(bool, retry) - ), - - TP_fast_assign( - __entry->vcpu_id = vcpu->vcpu_id; - __entry->gva = gva; - __entry->error_code = error_code; - __entry->sptep = sptep; - __entry->old_spte = old_spte; - __entry->new_spte = *sptep; - __entry->retry = retry; - ), - - TP_printk("vcpu %d gva %lx error_code %s sptep %p old %#llx" - " new %llx spurious %d fixed %d", __entry->vcpu_id, - __entry->gva, __print_flags(__entry->error_code, "|", - kvm_mmu_trace_pferr_flags), __entry->sptep, - __entry->old_spte, __entry->new_spte, - __spte_satisfied(old_spte), __spte_satisfied(new_spte) - ) -); -#endif /* _TRACE_KVMMMU_H */ - -#undef TRACE_INCLUDE_PATH -#define TRACE_INCLUDE_PATH . -#undef TRACE_INCLUDE_FILE -#define TRACE_INCLUDE_FILE mmutrace - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/arch/x86/kvm/trace.h b/instrumentation/events/mainline/arch/x86/kvm/trace.h deleted file mode 100644 index 545245d7..00000000 --- a/instrumentation/events/mainline/arch/x86/kvm/trace.h +++ /dev/null @@ -1,849 +0,0 @@ -#if !defined(_TRACE_KVM_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_KVM_H - -#include -#include -#include -#include - -#undef TRACE_SYSTEM -#define TRACE_SYSTEM kvm - -/* - * Tracepoint for guest mode entry. - */ -TRACE_EVENT(kvm_entry, - TP_PROTO(unsigned int vcpu_id), - TP_ARGS(vcpu_id), - - TP_STRUCT__entry( - __field( unsigned int, vcpu_id ) - ), - - TP_fast_assign( - __entry->vcpu_id = vcpu_id; - ), - - TP_printk("vcpu %u", __entry->vcpu_id) -); - -/* - * Tracepoint for hypercall. - */ -TRACE_EVENT(kvm_hypercall, - TP_PROTO(unsigned long nr, unsigned long a0, unsigned long a1, - unsigned long a2, unsigned long a3), - TP_ARGS(nr, a0, a1, a2, a3), - - TP_STRUCT__entry( - __field( unsigned long, nr ) - __field( unsigned long, a0 ) - __field( unsigned long, a1 ) - __field( unsigned long, a2 ) - __field( unsigned long, a3 ) - ), - - TP_fast_assign( - __entry->nr = nr; - __entry->a0 = a0; - __entry->a1 = a1; - __entry->a2 = a2; - __entry->a3 = a3; - ), - - TP_printk("nr 0x%lx a0 0x%lx a1 0x%lx a2 0x%lx a3 0x%lx", - __entry->nr, __entry->a0, __entry->a1, __entry->a2, - __entry->a3) -); - -/* - * Tracepoint for hypercall. - */ -TRACE_EVENT(kvm_hv_hypercall, - TP_PROTO(__u16 code, bool fast, __u16 rep_cnt, __u16 rep_idx, - __u64 ingpa, __u64 outgpa), - TP_ARGS(code, fast, rep_cnt, rep_idx, ingpa, outgpa), - - TP_STRUCT__entry( - __field( __u16, rep_cnt ) - __field( __u16, rep_idx ) - __field( __u64, ingpa ) - __field( __u64, outgpa ) - __field( __u16, code ) - __field( bool, fast ) - ), - - TP_fast_assign( - __entry->rep_cnt = rep_cnt; - __entry->rep_idx = rep_idx; - __entry->ingpa = ingpa; - __entry->outgpa = outgpa; - __entry->code = code; - __entry->fast = fast; - ), - - TP_printk("code 0x%x %s cnt 0x%x idx 0x%x in 0x%llx out 0x%llx", - __entry->code, __entry->fast ? "fast" : "slow", - __entry->rep_cnt, __entry->rep_idx, __entry->ingpa, - __entry->outgpa) -); - -/* - * Tracepoint for PIO. - */ -TRACE_EVENT(kvm_pio, - TP_PROTO(unsigned int rw, unsigned int port, unsigned int size, - unsigned int count), - TP_ARGS(rw, port, size, count), - - TP_STRUCT__entry( - __field( unsigned int, rw ) - __field( unsigned int, port ) - __field( unsigned int, size ) - __field( unsigned int, count ) - ), - - TP_fast_assign( - __entry->rw = rw; - __entry->port = port; - __entry->size = size; - __entry->count = count; - ), - - TP_printk("pio_%s at 0x%x size %d count %d", - __entry->rw ? "write" : "read", - __entry->port, __entry->size, __entry->count) -); - -/* - * Tracepoint for cpuid. - */ -TRACE_EVENT(kvm_cpuid, - TP_PROTO(unsigned int function, unsigned long rax, unsigned long rbx, - unsigned long rcx, unsigned long rdx), - TP_ARGS(function, rax, rbx, rcx, rdx), - - TP_STRUCT__entry( - __field( unsigned int, function ) - __field( unsigned long, rax ) - __field( unsigned long, rbx ) - __field( unsigned long, rcx ) - __field( unsigned long, rdx ) - ), - - TP_fast_assign( - __entry->function = function; - __entry->rax = rax; - __entry->rbx = rbx; - __entry->rcx = rcx; - __entry->rdx = rdx; - ), - - TP_printk("func %x rax %lx rbx %lx rcx %lx rdx %lx", - __entry->function, __entry->rax, - __entry->rbx, __entry->rcx, __entry->rdx) -); - -#define AREG(x) { APIC_##x, "APIC_" #x } - -#define kvm_trace_symbol_apic \ - AREG(ID), AREG(LVR), AREG(TASKPRI), AREG(ARBPRI), AREG(PROCPRI), \ - AREG(EOI), AREG(RRR), AREG(LDR), AREG(DFR), AREG(SPIV), AREG(ISR), \ - AREG(TMR), AREG(IRR), AREG(ESR), AREG(ICR), AREG(ICR2), AREG(LVTT), \ - AREG(LVTTHMR), AREG(LVTPC), AREG(LVT0), AREG(LVT1), AREG(LVTERR), \ - AREG(TMICT), AREG(TMCCT), AREG(TDCR), AREG(SELF_IPI), AREG(EFEAT), \ - AREG(ECTRL) -/* - * Tracepoint for apic access. - */ -TRACE_EVENT(kvm_apic, - TP_PROTO(unsigned int rw, unsigned int reg, unsigned int val), - TP_ARGS(rw, reg, val), - - TP_STRUCT__entry( - __field( unsigned int, rw ) - __field( unsigned int, reg ) - __field( unsigned int, val ) - ), - - TP_fast_assign( - __entry->rw = rw; - __entry->reg = reg; - __entry->val = val; - ), - - TP_printk("apic_%s %s = 0x%x", - __entry->rw ? "write" : "read", - __print_symbolic(__entry->reg, kvm_trace_symbol_apic), - __entry->val) -); - -#define trace_kvm_apic_read(reg, val) trace_kvm_apic(0, reg, val) -#define trace_kvm_apic_write(reg, val) trace_kvm_apic(1, reg, val) - -#define KVM_ISA_VMX 1 -#define KVM_ISA_SVM 2 - -/* - * Tracepoint for kvm guest exit: - */ -TRACE_EVENT(kvm_exit, - TP_PROTO(unsigned int exit_reason, struct kvm_vcpu *vcpu, u32 isa), - TP_ARGS(exit_reason, vcpu, isa), - - TP_STRUCT__entry( - __field( unsigned int, exit_reason ) - __field( unsigned long, guest_rip ) - __field( u32, isa ) - __field( u64, info1 ) - __field( u64, info2 ) - ), - - TP_fast_assign( - __entry->exit_reason = exit_reason; - __entry->guest_rip = kvm_rip_read(vcpu); - __entry->isa = isa; - kvm_x86_ops->get_exit_info(vcpu, &__entry->info1, - &__entry->info2); - ), - - TP_printk("reason %s rip 0x%lx info %llx %llx", - (__entry->isa == KVM_ISA_VMX) ? - __print_symbolic(__entry->exit_reason, VMX_EXIT_REASONS) : - __print_symbolic(__entry->exit_reason, SVM_EXIT_REASONS), - __entry->guest_rip, __entry->info1, __entry->info2) -); - -/* - * Tracepoint for kvm interrupt injection: - */ -TRACE_EVENT(kvm_inj_virq, - TP_PROTO(unsigned int irq), - TP_ARGS(irq), - - TP_STRUCT__entry( - __field( unsigned int, irq ) - ), - - TP_fast_assign( - __entry->irq = irq; - ), - - TP_printk("irq %u", __entry->irq) -); - -#define EXS(x) { x##_VECTOR, "#" #x } - -#define kvm_trace_sym_exc \ - EXS(DE), EXS(DB), EXS(BP), EXS(OF), EXS(BR), EXS(UD), EXS(NM), \ - EXS(DF), EXS(TS), EXS(NP), EXS(SS), EXS(GP), EXS(PF), \ - EXS(MF), EXS(MC) - -/* - * Tracepoint for kvm interrupt injection: - */ -TRACE_EVENT(kvm_inj_exception, - TP_PROTO(unsigned exception, bool has_error, unsigned error_code), - TP_ARGS(exception, has_error, error_code), - - TP_STRUCT__entry( - __field( u8, exception ) - __field( u8, has_error ) - __field( u32, error_code ) - ), - - TP_fast_assign( - __entry->exception = exception; - __entry->has_error = has_error; - __entry->error_code = error_code; - ), - - TP_printk("%s (0x%x)", - __print_symbolic(__entry->exception, kvm_trace_sym_exc), - /* FIXME: don't print error_code if not present */ - __entry->has_error ? __entry->error_code : 0) -); - -/* - * Tracepoint for page fault. - */ -TRACE_EVENT(kvm_page_fault, - TP_PROTO(unsigned long fault_address, unsigned int error_code), - TP_ARGS(fault_address, error_code), - - TP_STRUCT__entry( - __field( unsigned long, fault_address ) - __field( unsigned int, error_code ) - ), - - TP_fast_assign( - __entry->fault_address = fault_address; - __entry->error_code = error_code; - ), - - TP_printk("address %lx error_code %x", - __entry->fault_address, __entry->error_code) -); - -/* - * Tracepoint for guest MSR access. - */ -TRACE_EVENT(kvm_msr, - TP_PROTO(unsigned write, u32 ecx, u64 data, bool exception), - TP_ARGS(write, ecx, data, exception), - - TP_STRUCT__entry( - __field( unsigned, write ) - __field( u32, ecx ) - __field( u64, data ) - __field( u8, exception ) - ), - - TP_fast_assign( - __entry->write = write; - __entry->ecx = ecx; - __entry->data = data; - __entry->exception = exception; - ), - - TP_printk("msr_%s %x = 0x%llx%s", - __entry->write ? "write" : "read", - __entry->ecx, __entry->data, - __entry->exception ? " (#GP)" : "") -); - -#define trace_kvm_msr_read(ecx, data) trace_kvm_msr(0, ecx, data, false) -#define trace_kvm_msr_write(ecx, data) trace_kvm_msr(1, ecx, data, false) -#define trace_kvm_msr_read_ex(ecx) trace_kvm_msr(0, ecx, 0, true) -#define trace_kvm_msr_write_ex(ecx, data) trace_kvm_msr(1, ecx, data, true) - -/* - * Tracepoint for guest CR access. - */ -TRACE_EVENT(kvm_cr, - TP_PROTO(unsigned int rw, unsigned int cr, unsigned long val), - TP_ARGS(rw, cr, val), - - TP_STRUCT__entry( - __field( unsigned int, rw ) - __field( unsigned int, cr ) - __field( unsigned long, val ) - ), - - TP_fast_assign( - __entry->rw = rw; - __entry->cr = cr; - __entry->val = val; - ), - - TP_printk("cr_%s %x = 0x%lx", - __entry->rw ? "write" : "read", - __entry->cr, __entry->val) -); - -#define trace_kvm_cr_read(cr, val) trace_kvm_cr(0, cr, val) -#define trace_kvm_cr_write(cr, val) trace_kvm_cr(1, cr, val) - -TRACE_EVENT(kvm_pic_set_irq, - TP_PROTO(__u8 chip, __u8 pin, __u8 elcr, __u8 imr, bool coalesced), - TP_ARGS(chip, pin, elcr, imr, coalesced), - - TP_STRUCT__entry( - __field( __u8, chip ) - __field( __u8, pin ) - __field( __u8, elcr ) - __field( __u8, imr ) - __field( bool, coalesced ) - ), - - TP_fast_assign( - __entry->chip = chip; - __entry->pin = pin; - __entry->elcr = elcr; - __entry->imr = imr; - __entry->coalesced = coalesced; - ), - - TP_printk("chip %u pin %u (%s%s)%s", - __entry->chip, __entry->pin, - (__entry->elcr & (1 << __entry->pin)) ? "level":"edge", - (__entry->imr & (1 << __entry->pin)) ? "|masked":"", - __entry->coalesced ? " (coalesced)" : "") -); - -#define kvm_apic_dst_shorthand \ - {0x0, "dst"}, \ - {0x1, "self"}, \ - {0x2, "all"}, \ - {0x3, "all-but-self"} - -TRACE_EVENT(kvm_apic_ipi, - TP_PROTO(__u32 icr_low, __u32 dest_id), - TP_ARGS(icr_low, dest_id), - - TP_STRUCT__entry( - __field( __u32, icr_low ) - __field( __u32, dest_id ) - ), - - TP_fast_assign( - __entry->icr_low = icr_low; - __entry->dest_id = dest_id; - ), - - TP_printk("dst %x vec %u (%s|%s|%s|%s|%s)", - __entry->dest_id, (u8)__entry->icr_low, - __print_symbolic((__entry->icr_low >> 8 & 0x7), - kvm_deliver_mode), - (__entry->icr_low & (1<<11)) ? "logical" : "physical", - (__entry->icr_low & (1<<14)) ? "assert" : "de-assert", - (__entry->icr_low & (1<<15)) ? "level" : "edge", - __print_symbolic((__entry->icr_low >> 18 & 0x3), - kvm_apic_dst_shorthand)) -); - -TRACE_EVENT(kvm_apic_accept_irq, - TP_PROTO(__u32 apicid, __u16 dm, __u8 tm, __u8 vec, bool coalesced), - TP_ARGS(apicid, dm, tm, vec, coalesced), - - TP_STRUCT__entry( - __field( __u32, apicid ) - __field( __u16, dm ) - __field( __u8, tm ) - __field( __u8, vec ) - __field( bool, coalesced ) - ), - - TP_fast_assign( - __entry->apicid = apicid; - __entry->dm = dm; - __entry->tm = tm; - __entry->vec = vec; - __entry->coalesced = coalesced; - ), - - TP_printk("apicid %x vec %u (%s|%s)%s", - __entry->apicid, __entry->vec, - __print_symbolic((__entry->dm >> 8 & 0x7), kvm_deliver_mode), - __entry->tm ? "level" : "edge", - __entry->coalesced ? " (coalesced)" : "") -); - -TRACE_EVENT(kvm_eoi, - TP_PROTO(struct kvm_lapic *apic, int vector), - TP_ARGS(apic, vector), - - TP_STRUCT__entry( - __field( __u32, apicid ) - __field( int, vector ) - ), - - TP_fast_assign( - __entry->apicid = apic->vcpu->vcpu_id; - __entry->vector = vector; - ), - - TP_printk("apicid %x vector %d", __entry->apicid, __entry->vector) -); - -TRACE_EVENT(kvm_pv_eoi, - TP_PROTO(struct kvm_lapic *apic, int vector), - TP_ARGS(apic, vector), - - TP_STRUCT__entry( - __field( __u32, apicid ) - __field( int, vector ) - ), - - TP_fast_assign( - __entry->apicid = apic->vcpu->vcpu_id; - __entry->vector = vector; - ), - - TP_printk("apicid %x vector %d", __entry->apicid, __entry->vector) -); - -/* - * Tracepoint for nested VMRUN - */ -TRACE_EVENT(kvm_nested_vmrun, - TP_PROTO(__u64 rip, __u64 vmcb, __u64 nested_rip, __u32 int_ctl, - __u32 event_inj, bool npt), - TP_ARGS(rip, vmcb, nested_rip, int_ctl, event_inj, npt), - - TP_STRUCT__entry( - __field( __u64, rip ) - __field( __u64, vmcb ) - __field( __u64, nested_rip ) - __field( __u32, int_ctl ) - __field( __u32, event_inj ) - __field( bool, npt ) - ), - - TP_fast_assign( - __entry->rip = rip; - __entry->vmcb = vmcb; - __entry->nested_rip = nested_rip; - __entry->int_ctl = int_ctl; - __entry->event_inj = event_inj; - __entry->npt = npt; - ), - - TP_printk("rip: 0x%016llx vmcb: 0x%016llx nrip: 0x%016llx int_ctl: 0x%08x " - "event_inj: 0x%08x npt: %s", - __entry->rip, __entry->vmcb, __entry->nested_rip, - __entry->int_ctl, __entry->event_inj, - __entry->npt ? "on" : "off") -); - -TRACE_EVENT(kvm_nested_intercepts, - TP_PROTO(__u16 cr_read, __u16 cr_write, __u32 exceptions, __u64 intercept), - TP_ARGS(cr_read, cr_write, exceptions, intercept), - - TP_STRUCT__entry( - __field( __u16, cr_read ) - __field( __u16, cr_write ) - __field( __u32, exceptions ) - __field( __u64, intercept ) - ), - - TP_fast_assign( - __entry->cr_read = cr_read; - __entry->cr_write = cr_write; - __entry->exceptions = exceptions; - __entry->intercept = intercept; - ), - - TP_printk("cr_read: %04x cr_write: %04x excp: %08x intercept: %016llx", - __entry->cr_read, __entry->cr_write, __entry->exceptions, - __entry->intercept) -); -/* - * Tracepoint for #VMEXIT while nested - */ -TRACE_EVENT(kvm_nested_vmexit, - TP_PROTO(__u64 rip, __u32 exit_code, - __u64 exit_info1, __u64 exit_info2, - __u32 exit_int_info, __u32 exit_int_info_err, __u32 isa), - TP_ARGS(rip, exit_code, exit_info1, exit_info2, - exit_int_info, exit_int_info_err, isa), - - TP_STRUCT__entry( - __field( __u64, rip ) - __field( __u32, exit_code ) - __field( __u64, exit_info1 ) - __field( __u64, exit_info2 ) - __field( __u32, exit_int_info ) - __field( __u32, exit_int_info_err ) - __field( __u32, isa ) - ), - - TP_fast_assign( - __entry->rip = rip; - __entry->exit_code = exit_code; - __entry->exit_info1 = exit_info1; - __entry->exit_info2 = exit_info2; - __entry->exit_int_info = exit_int_info; - __entry->exit_int_info_err = exit_int_info_err; - __entry->isa = isa; - ), - TP_printk("rip: 0x%016llx reason: %s ext_inf1: 0x%016llx " - "ext_inf2: 0x%016llx ext_int: 0x%08x ext_int_err: 0x%08x", - __entry->rip, - (__entry->isa == KVM_ISA_VMX) ? - __print_symbolic(__entry->exit_code, VMX_EXIT_REASONS) : - __print_symbolic(__entry->exit_code, SVM_EXIT_REASONS), - __entry->exit_info1, __entry->exit_info2, - __entry->exit_int_info, __entry->exit_int_info_err) -); - -/* - * Tracepoint for #VMEXIT reinjected to the guest - */ -TRACE_EVENT(kvm_nested_vmexit_inject, - TP_PROTO(__u32 exit_code, - __u64 exit_info1, __u64 exit_info2, - __u32 exit_int_info, __u32 exit_int_info_err, __u32 isa), - TP_ARGS(exit_code, exit_info1, exit_info2, - exit_int_info, exit_int_info_err, isa), - - TP_STRUCT__entry( - __field( __u32, exit_code ) - __field( __u64, exit_info1 ) - __field( __u64, exit_info2 ) - __field( __u32, exit_int_info ) - __field( __u32, exit_int_info_err ) - __field( __u32, isa ) - ), - - TP_fast_assign( - __entry->exit_code = exit_code; - __entry->exit_info1 = exit_info1; - __entry->exit_info2 = exit_info2; - __entry->exit_int_info = exit_int_info; - __entry->exit_int_info_err = exit_int_info_err; - __entry->isa = isa; - ), - - TP_printk("reason: %s ext_inf1: 0x%016llx " - "ext_inf2: 0x%016llx ext_int: 0x%08x ext_int_err: 0x%08x", - (__entry->isa == KVM_ISA_VMX) ? - __print_symbolic(__entry->exit_code, VMX_EXIT_REASONS) : - __print_symbolic(__entry->exit_code, SVM_EXIT_REASONS), - __entry->exit_info1, __entry->exit_info2, - __entry->exit_int_info, __entry->exit_int_info_err) -); - -/* - * Tracepoint for nested #vmexit because of interrupt pending - */ -TRACE_EVENT(kvm_nested_intr_vmexit, - TP_PROTO(__u64 rip), - TP_ARGS(rip), - - TP_STRUCT__entry( - __field( __u64, rip ) - ), - - TP_fast_assign( - __entry->rip = rip - ), - - TP_printk("rip: 0x%016llx", __entry->rip) -); - -/* - * Tracepoint for nested #vmexit because of interrupt pending - */ -TRACE_EVENT(kvm_invlpga, - TP_PROTO(__u64 rip, int asid, u64 address), - TP_ARGS(rip, asid, address), - - TP_STRUCT__entry( - __field( __u64, rip ) - __field( int, asid ) - __field( __u64, address ) - ), - - TP_fast_assign( - __entry->rip = rip; - __entry->asid = asid; - __entry->address = address; - ), - - TP_printk("rip: 0x%016llx asid: %d address: 0x%016llx", - __entry->rip, __entry->asid, __entry->address) -); - -/* - * Tracepoint for nested #vmexit because of interrupt pending - */ -TRACE_EVENT(kvm_skinit, - TP_PROTO(__u64 rip, __u32 slb), - TP_ARGS(rip, slb), - - TP_STRUCT__entry( - __field( __u64, rip ) - __field( __u32, slb ) - ), - - TP_fast_assign( - __entry->rip = rip; - __entry->slb = slb; - ), - - TP_printk("rip: 0x%016llx slb: 0x%08x", - __entry->rip, __entry->slb) -); - -#define KVM_EMUL_INSN_F_CR0_PE (1 << 0) -#define KVM_EMUL_INSN_F_EFL_VM (1 << 1) -#define KVM_EMUL_INSN_F_CS_D (1 << 2) -#define KVM_EMUL_INSN_F_CS_L (1 << 3) - -#define kvm_trace_symbol_emul_flags \ - { 0, "real" }, \ - { KVM_EMUL_INSN_F_CR0_PE \ - | KVM_EMUL_INSN_F_EFL_VM, "vm16" }, \ - { KVM_EMUL_INSN_F_CR0_PE, "prot16" }, \ - { KVM_EMUL_INSN_F_CR0_PE \ - | KVM_EMUL_INSN_F_CS_D, "prot32" }, \ - { KVM_EMUL_INSN_F_CR0_PE \ - | KVM_EMUL_INSN_F_CS_L, "prot64" } - -#define kei_decode_mode(mode) ({ \ - u8 flags = 0xff; \ - switch (mode) { \ - case X86EMUL_MODE_REAL: \ - flags = 0; \ - break; \ - case X86EMUL_MODE_VM86: \ - flags = KVM_EMUL_INSN_F_EFL_VM; \ - break; \ - case X86EMUL_MODE_PROT16: \ - flags = KVM_EMUL_INSN_F_CR0_PE; \ - break; \ - case X86EMUL_MODE_PROT32: \ - flags = KVM_EMUL_INSN_F_CR0_PE \ - | KVM_EMUL_INSN_F_CS_D; \ - break; \ - case X86EMUL_MODE_PROT64: \ - flags = KVM_EMUL_INSN_F_CR0_PE \ - | KVM_EMUL_INSN_F_CS_L; \ - break; \ - } \ - flags; \ - }) - -TRACE_EVENT(kvm_emulate_insn, - TP_PROTO(struct kvm_vcpu *vcpu, __u8 failed), - TP_ARGS(vcpu, failed), - - TP_STRUCT__entry( - __field( __u64, rip ) - __field( __u32, csbase ) - __field( __u8, len ) - __array( __u8, insn, 15 ) - __field( __u8, flags ) - __field( __u8, failed ) - ), - - TP_fast_assign( - __entry->rip = vcpu->arch.emulate_ctxt.fetch.start; - __entry->csbase = kvm_x86_ops->get_segment_base(vcpu, VCPU_SREG_CS); - __entry->len = vcpu->arch.emulate_ctxt._eip - - vcpu->arch.emulate_ctxt.fetch.start; - memcpy(__entry->insn, - vcpu->arch.emulate_ctxt.fetch.data, - 15); - __entry->flags = kei_decode_mode(vcpu->arch.emulate_ctxt.mode); - __entry->failed = failed; - ), - - TP_printk("%x:%llx:%s (%s)%s", - __entry->csbase, __entry->rip, - __print_hex(__entry->insn, __entry->len), - __print_symbolic(__entry->flags, - kvm_trace_symbol_emul_flags), - __entry->failed ? " failed" : "" - ) - ); - -#define trace_kvm_emulate_insn_start(vcpu) trace_kvm_emulate_insn(vcpu, 0) -#define trace_kvm_emulate_insn_failed(vcpu) trace_kvm_emulate_insn(vcpu, 1) - -TRACE_EVENT( - vcpu_match_mmio, - TP_PROTO(gva_t gva, gpa_t gpa, bool write, bool gpa_match), - TP_ARGS(gva, gpa, write, gpa_match), - - TP_STRUCT__entry( - __field(gva_t, gva) - __field(gpa_t, gpa) - __field(bool, write) - __field(bool, gpa_match) - ), - - TP_fast_assign( - __entry->gva = gva; - __entry->gpa = gpa; - __entry->write = write; - __entry->gpa_match = gpa_match - ), - - TP_printk("gva %#lx gpa %#llx %s %s", __entry->gva, __entry->gpa, - __entry->write ? "Write" : "Read", - __entry->gpa_match ? "GPA" : "GVA") -); - -TRACE_EVENT(kvm_write_tsc_offset, - TP_PROTO(unsigned int vcpu_id, __u64 previous_tsc_offset, - __u64 next_tsc_offset), - TP_ARGS(vcpu_id, previous_tsc_offset, next_tsc_offset), - - TP_STRUCT__entry( - __field( unsigned int, vcpu_id ) - __field( __u64, previous_tsc_offset ) - __field( __u64, next_tsc_offset ) - ), - - TP_fast_assign( - __entry->vcpu_id = vcpu_id; - __entry->previous_tsc_offset = previous_tsc_offset; - __entry->next_tsc_offset = next_tsc_offset; - ), - - TP_printk("vcpu=%u prev=%llu next=%llu", __entry->vcpu_id, - __entry->previous_tsc_offset, __entry->next_tsc_offset) -); - -#ifdef CONFIG_X86_64 - -#define host_clocks \ - {VCLOCK_NONE, "none"}, \ - {VCLOCK_TSC, "tsc"}, \ - {VCLOCK_HPET, "hpet"} \ - -TRACE_EVENT(kvm_update_master_clock, - TP_PROTO(bool use_master_clock, unsigned int host_clock, bool offset_matched), - TP_ARGS(use_master_clock, host_clock, offset_matched), - - TP_STRUCT__entry( - __field( bool, use_master_clock ) - __field( unsigned int, host_clock ) - __field( bool, offset_matched ) - ), - - TP_fast_assign( - __entry->use_master_clock = use_master_clock; - __entry->host_clock = host_clock; - __entry->offset_matched = offset_matched; - ), - - TP_printk("masterclock %d hostclock %s offsetmatched %u", - __entry->use_master_clock, - __print_symbolic(__entry->host_clock, host_clocks), - __entry->offset_matched) -); - -TRACE_EVENT(kvm_track_tsc, - TP_PROTO(unsigned int vcpu_id, unsigned int nr_matched, - unsigned int online_vcpus, bool use_master_clock, - unsigned int host_clock), - TP_ARGS(vcpu_id, nr_matched, online_vcpus, use_master_clock, - host_clock), - - TP_STRUCT__entry( - __field( unsigned int, vcpu_id ) - __field( unsigned int, nr_vcpus_matched_tsc ) - __field( unsigned int, online_vcpus ) - __field( bool, use_master_clock ) - __field( unsigned int, host_clock ) - ), - - TP_fast_assign( - __entry->vcpu_id = vcpu_id; - __entry->nr_vcpus_matched_tsc = nr_matched; - __entry->online_vcpus = online_vcpus; - __entry->use_master_clock = use_master_clock; - __entry->host_clock = host_clock; - ), - - TP_printk("vcpu_id %u masterclock %u offsetmatched %u nr_online %u" - " hostclock %s", - __entry->vcpu_id, __entry->use_master_clock, - __entry->nr_vcpus_matched_tsc, __entry->online_vcpus, - __print_symbolic(__entry->host_clock, host_clocks)) -); - -#endif /* CONFIG_X86_64 */ - -#endif /* _TRACE_KVM_H */ - -#undef TRACE_INCLUDE_PATH -#define TRACE_INCLUDE_PATH arch/x86/kvm -#undef TRACE_INCLUDE_FILE -#define TRACE_INCLUDE_FILE trace - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/asoc.h b/instrumentation/events/mainline/asoc.h deleted file mode 100644 index 5fc2dcdd..00000000 --- a/instrumentation/events/mainline/asoc.h +++ /dev/null @@ -1,410 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM asoc - -#if !defined(_TRACE_ASOC_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_ASOC_H - -#include -#include - -#define DAPM_DIRECT "(direct)" - -struct snd_soc_jack; -struct snd_soc_codec; -struct snd_soc_platform; -struct snd_soc_card; -struct snd_soc_dapm_widget; - -/* - * 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( - __assign_str(name, codec->name); - __entry->id = codec->id; - __entry->reg = reg; - __entry->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) - -); - -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( - __assign_str(name, platform->name); - __entry->id = platform->id; - __entry->reg = reg; - __entry->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) - -); - -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( - __assign_str(name, card->name); - __entry->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( - __assign_str(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( - __assign_str(name, w->name); - __entry->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) - -); - -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( - __assign_str(name, card->name); - __entry->power_checks = card->dapm_stats.power_checks; - __entry->path_checks = card->dapm_stats.path_checks; - __entry->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) -); - -TRACE_EVENT(snd_soc_dapm_output_path, - - TP_PROTO(struct snd_soc_dapm_widget *widget, - struct snd_soc_dapm_path *path), - - TP_ARGS(widget, path), - - TP_STRUCT__entry( - __string( wname, widget->name ) - __string( pname, path->name ? path->name : DAPM_DIRECT) - __string( psname, path->sink->name ) - __field( int, path_sink ) - __field( int, path_connect ) - ), - - TP_fast_assign( - __assign_str(wname, widget->name); - __assign_str(pname, path->name ? path->name : DAPM_DIRECT); - __assign_str(psname, path->sink->name); - __entry->path_connect = path->connect; - __entry->path_sink = (long)path->sink; - ), - - TP_printk("%c%s -> %s -> %s\n", - (int) __entry->path_sink && - (int) __entry->path_connect ? '*' : ' ', - __get_str(wname), __get_str(pname), __get_str(psname)) -); - -TRACE_EVENT(snd_soc_dapm_input_path, - - TP_PROTO(struct snd_soc_dapm_widget *widget, - struct snd_soc_dapm_path *path), - - TP_ARGS(widget, path), - - TP_STRUCT__entry( - __string( wname, widget->name ) - __string( pname, path->name ? path->name : DAPM_DIRECT) - __string( psname, path->source->name ) - __field( int, path_source ) - __field( int, path_connect ) - ), - - TP_fast_assign( - __assign_str(wname, widget->name); - __assign_str(pname, path->name ? path->name : DAPM_DIRECT); - __assign_str(psname, path->source->name); - __entry->path_connect = path->connect; - __entry->path_source = (long)path->source; - ), - - TP_printk("%c%s <- %s <- %s\n", - (int) __entry->path_source && - (int) __entry->path_connect ? '*' : ' ', - __get_str(wname), __get_str(pname), __get_str(psname)) -); - -TRACE_EVENT(snd_soc_dapm_connected, - - TP_PROTO(int paths, int stream), - - TP_ARGS(paths, stream), - - TP_STRUCT__entry( - __field( int, paths ) - __field( int, stream ) - ), - - TP_fast_assign( - __entry->paths = paths; - __entry->stream = stream; - ), - - TP_printk("%s: found %d paths\n", - __entry->stream ? "capture" : "playback", __entry->paths) -); - -TRACE_EVENT(snd_soc_jack_irq, - - TP_PROTO(const char *name), - - TP_ARGS(name), - - TP_STRUCT__entry( - __string( name, name ) - ), - - TP_fast_assign( - __assign_str(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( - __assign_str(name, jack->jack->name); - __entry->mask = mask; - __entry->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( - __assign_str(name, jack->jack->name); - __entry->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( - __assign_str(name, codec->name); - __assign_str(status, status); - __assign_str(type, type); - __entry->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 diff --git a/instrumentation/events/mainline/block.h b/instrumentation/events/mainline/block.h deleted file mode 100644 index 05c5e61f..00000000 --- a/instrumentation/events/mainline/block.h +++ /dev/null @@ -1,571 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM block - -#if !defined(_TRACE_BLOCK_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_BLOCK_H - -#include -#include -#include - -#define RWBS_LEN 8 - -DECLARE_EVENT_CLASS(block_rq_with_error, - - TP_PROTO(struct request_queue *q, struct request *rq), - - TP_ARGS(q, rq), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( sector_t, sector ) - __field( unsigned int, nr_sector ) - __field( int, errors ) - __array( char, rwbs, RWBS_LEN ) - __dynamic_array( char, cmd, blk_cmd_buf_len(rq) ) - ), - - TP_fast_assign( - __entry->dev = rq->rq_disk ? disk_devt(rq->rq_disk) : 0; - __entry->sector = (rq->cmd_type == REQ_TYPE_BLOCK_PC) ? - 0 : blk_rq_pos(rq); - __entry->nr_sector = (rq->cmd_type == REQ_TYPE_BLOCK_PC) ? - 0 : blk_rq_sectors(rq); - __entry->errors = rq->errors; - - blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq)); - blk_dump_cmd(__get_str(cmd), rq); - ), - - TP_printk("%d,%d %s (%s) %llu + %u [%d]", - MAJOR(__entry->dev), MINOR(__entry->dev), - __entry->rwbs, __get_str(cmd), - (unsigned long long)__entry->sector, - __entry->nr_sector, __entry->errors) -); - -/** - * block_rq_abort - abort block operation request - * @q: queue containing the block operation request - * @rq: block IO operation request - * - * Called immediately after pending block IO operation request @rq in - * queue @q is aborted. The fields in the operation request @rq - * can be examined to determine which device and sectors the pending - * operation would access. - */ -DEFINE_EVENT(block_rq_with_error, block_rq_abort, - - TP_PROTO(struct request_queue *q, struct request *rq), - - TP_ARGS(q, rq) -); - -/** - * block_rq_requeue - place block IO request back on a queue - * @q: queue holding operation - * @rq: block IO operation request - * - * The block operation request @rq is being placed back into queue - * @q. For some reason the request was not completed and needs to be - * put back in the queue. - */ -DEFINE_EVENT(block_rq_with_error, block_rq_requeue, - - TP_PROTO(struct request_queue *q, struct request *rq), - - TP_ARGS(q, rq) -); - -/** - * block_rq_complete - block IO operation completed by device driver - * @q: queue containing the block operation request - * @rq: block operations request - * - * The block_rq_complete tracepoint event indicates that some portion - * of operation request has been completed by the device driver. If - * the @rq->bio is %NULL, then there is absolutely no additional work to - * do for the request. If @rq->bio is non-NULL then there is - * additional work required to complete the request. - */ -DEFINE_EVENT(block_rq_with_error, block_rq_complete, - - TP_PROTO(struct request_queue *q, struct request *rq), - - TP_ARGS(q, rq) -); - -DECLARE_EVENT_CLASS(block_rq, - - TP_PROTO(struct request_queue *q, struct request *rq), - - TP_ARGS(q, rq), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( sector_t, sector ) - __field( unsigned int, nr_sector ) - __field( unsigned int, bytes ) - __array( char, rwbs, RWBS_LEN ) - __array( char, comm, TASK_COMM_LEN ) - __dynamic_array( char, cmd, blk_cmd_buf_len(rq) ) - ), - - TP_fast_assign( - __entry->dev = rq->rq_disk ? disk_devt(rq->rq_disk) : 0; - __entry->sector = (rq->cmd_type == REQ_TYPE_BLOCK_PC) ? - 0 : blk_rq_pos(rq); - __entry->nr_sector = (rq->cmd_type == REQ_TYPE_BLOCK_PC) ? - 0 : blk_rq_sectors(rq); - __entry->bytes = (rq->cmd_type == REQ_TYPE_BLOCK_PC) ? - blk_rq_bytes(rq) : 0; - - blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq)); - blk_dump_cmd(__get_str(cmd), rq); - memcpy(__entry->comm, current->comm, TASK_COMM_LEN); - ), - - TP_printk("%d,%d %s %u (%s) %llu + %u [%s]", - MAJOR(__entry->dev), MINOR(__entry->dev), - __entry->rwbs, __entry->bytes, __get_str(cmd), - (unsigned long long)__entry->sector, - __entry->nr_sector, __entry->comm) -); - -/** - * block_rq_insert - insert block operation request into queue - * @q: target queue - * @rq: block IO operation request - * - * Called immediately before block operation request @rq is inserted - * into queue @q. The fields in the operation request @rq struct can - * be examined to determine which device and sectors the pending - * operation would access. - */ -DEFINE_EVENT(block_rq, block_rq_insert, - - TP_PROTO(struct request_queue *q, struct request *rq), - - TP_ARGS(q, rq) -); - -/** - * block_rq_issue - issue pending block IO request operation to device driver - * @q: queue holding operation - * @rq: block IO operation operation request - * - * Called when block operation request @rq from queue @q is sent to a - * device driver for processing. - */ -DEFINE_EVENT(block_rq, block_rq_issue, - - TP_PROTO(struct request_queue *q, struct request *rq), - - TP_ARGS(q, rq) -); - -/** - * block_bio_bounce - used bounce buffer when processing block operation - * @q: queue holding the block operation - * @bio: block operation - * - * A bounce buffer was used to handle the block operation @bio in @q. - * This occurs when hardware limitations prevent a direct transfer of - * data between the @bio data memory area and the IO device. Use of a - * bounce buffer requires extra copying of data and decreases - * performance. - */ -TRACE_EVENT(block_bio_bounce, - - TP_PROTO(struct request_queue *q, struct bio *bio), - - TP_ARGS(q, bio), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( sector_t, sector ) - __field( unsigned int, nr_sector ) - __array( char, rwbs, RWBS_LEN ) - __array( char, comm, TASK_COMM_LEN ) - ), - - TP_fast_assign( - __entry->dev = bio->bi_bdev ? - bio->bi_bdev->bd_dev : 0; - __entry->sector = bio->bi_sector; - __entry->nr_sector = bio->bi_size >> 9; - blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); - memcpy(__entry->comm, current->comm, TASK_COMM_LEN); - ), - - TP_printk("%d,%d %s %llu + %u [%s]", - MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs, - (unsigned long long)__entry->sector, - __entry->nr_sector, __entry->comm) -); - -/** - * block_bio_complete - completed all work on the block operation - * @q: queue holding the block operation - * @bio: block operation completed - * @error: io error value - * - * This tracepoint indicates there is no further work to do on this - * block IO operation @bio. - */ -TRACE_EVENT(block_bio_complete, - - TP_PROTO(struct request_queue *q, struct bio *bio, int error), - - TP_ARGS(q, bio, error), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( sector_t, sector ) - __field( unsigned, nr_sector ) - __field( int, error ) - __array( char, rwbs, RWBS_LEN) - ), - - TP_fast_assign( - __entry->dev = bio->bi_bdev->bd_dev; - __entry->sector = bio->bi_sector; - __entry->nr_sector = bio->bi_size >> 9; - __entry->error = error; - blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); - ), - - TP_printk("%d,%d %s %llu + %u [%d]", - MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs, - (unsigned long long)__entry->sector, - __entry->nr_sector, __entry->error) -); - -DECLARE_EVENT_CLASS(block_bio, - - TP_PROTO(struct request_queue *q, struct bio *bio), - - TP_ARGS(q, bio), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( sector_t, sector ) - __field( unsigned int, nr_sector ) - __array( char, rwbs, RWBS_LEN ) - __array( char, comm, TASK_COMM_LEN ) - ), - - TP_fast_assign( - __entry->dev = bio->bi_bdev->bd_dev; - __entry->sector = bio->bi_sector; - __entry->nr_sector = bio->bi_size >> 9; - blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); - memcpy(__entry->comm, current->comm, TASK_COMM_LEN); - ), - - TP_printk("%d,%d %s %llu + %u [%s]", - MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs, - (unsigned long long)__entry->sector, - __entry->nr_sector, __entry->comm) -); - -/** - * block_bio_backmerge - merging block operation to the end of an existing operation - * @q: queue holding operation - * @bio: new block operation to merge - * - * Merging block request @bio to the end of an existing block request - * in queue @q. - */ -DEFINE_EVENT(block_bio, block_bio_backmerge, - - TP_PROTO(struct request_queue *q, struct bio *bio), - - TP_ARGS(q, bio) -); - -/** - * block_bio_frontmerge - merging block operation to the beginning of an existing operation - * @q: queue holding operation - * @bio: new block operation to merge - * - * Merging block IO operation @bio to the beginning of an existing block - * operation in queue @q. - */ -DEFINE_EVENT(block_bio, block_bio_frontmerge, - - TP_PROTO(struct request_queue *q, struct bio *bio), - - TP_ARGS(q, bio) -); - -/** - * block_bio_queue - putting new block IO operation in queue - * @q: queue holding operation - * @bio: new block operation - * - * About to place the block IO operation @bio into queue @q. - */ -DEFINE_EVENT(block_bio, block_bio_queue, - - TP_PROTO(struct request_queue *q, struct bio *bio), - - TP_ARGS(q, bio) -); - -DECLARE_EVENT_CLASS(block_get_rq, - - TP_PROTO(struct request_queue *q, struct bio *bio, int rw), - - TP_ARGS(q, bio, rw), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( sector_t, sector ) - __field( unsigned int, nr_sector ) - __array( char, rwbs, RWBS_LEN ) - __array( char, comm, TASK_COMM_LEN ) - ), - - TP_fast_assign( - __entry->dev = bio ? bio->bi_bdev->bd_dev : 0; - __entry->sector = bio ? bio->bi_sector : 0; - __entry->nr_sector = bio ? bio->bi_size >> 9 : 0; - blk_fill_rwbs(__entry->rwbs, - bio ? bio->bi_rw : 0, __entry->nr_sector); - memcpy(__entry->comm, current->comm, TASK_COMM_LEN); - ), - - TP_printk("%d,%d %s %llu + %u [%s]", - MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs, - (unsigned long long)__entry->sector, - __entry->nr_sector, __entry->comm) -); - -/** - * block_getrq - get a free request entry in queue for block IO operations - * @q: queue for operations - * @bio: pending block IO operation - * @rw: low bit indicates a read (%0) or a write (%1) - * - * A request struct for queue @q has been allocated to handle the - * block IO operation @bio. - */ -DEFINE_EVENT(block_get_rq, block_getrq, - - TP_PROTO(struct request_queue *q, struct bio *bio, int rw), - - TP_ARGS(q, bio, rw) -); - -/** - * block_sleeprq - waiting to get a free request entry in queue for block IO operation - * @q: queue for operation - * @bio: pending block IO operation - * @rw: low bit indicates a read (%0) or a write (%1) - * - * In the case where a request struct cannot be provided for queue @q - * the process needs to wait for an request struct to become - * available. This tracepoint event is generated each time the - * process goes to sleep waiting for request struct become available. - */ -DEFINE_EVENT(block_get_rq, block_sleeprq, - - TP_PROTO(struct request_queue *q, struct bio *bio, int rw), - - TP_ARGS(q, bio, rw) -); - -/** - * block_plug - keep operations requests in request queue - * @q: request queue to plug - * - * Plug the request queue @q. Do not allow block operation requests - * to be sent to the device driver. Instead, accumulate requests in - * the queue to improve throughput performance of the block device. - */ -TRACE_EVENT(block_plug, - - TP_PROTO(struct request_queue *q), - - TP_ARGS(q), - - TP_STRUCT__entry( - __array( char, comm, TASK_COMM_LEN ) - ), - - TP_fast_assign( - memcpy(__entry->comm, current->comm, TASK_COMM_LEN); - ), - - TP_printk("[%s]", __entry->comm) -); - -DECLARE_EVENT_CLASS(block_unplug, - - TP_PROTO(struct request_queue *q, unsigned int depth, bool explicit), - - TP_ARGS(q, depth, explicit), - - TP_STRUCT__entry( - __field( int, nr_rq ) - __array( char, comm, TASK_COMM_LEN ) - ), - - TP_fast_assign( - __entry->nr_rq = depth; - memcpy(__entry->comm, current->comm, TASK_COMM_LEN); - ), - - TP_printk("[%s] %d", __entry->comm, __entry->nr_rq) -); - -/** - * block_unplug - release of operations requests in request queue - * @q: request queue to unplug - * @depth: number of requests just added to the queue - * @explicit: whether this was an explicit unplug, or one from schedule() - * - * Unplug request queue @q because device driver is scheduled to work - * on elements in the request queue. - */ -DEFINE_EVENT(block_unplug, block_unplug, - - TP_PROTO(struct request_queue *q, unsigned int depth, bool explicit), - - TP_ARGS(q, depth, explicit) -); - -/** - * block_split - split a single bio struct into two bio structs - * @q: queue containing the bio - * @bio: block operation being split - * @new_sector: The starting sector for the new bio - * - * The bio request @bio in request queue @q needs to be split into two - * bio requests. The newly created @bio request starts at - * @new_sector. This split may be required due to hardware limitation - * such as operation crossing device boundaries in a RAID system. - */ -TRACE_EVENT(block_split, - - TP_PROTO(struct request_queue *q, struct bio *bio, - unsigned int new_sector), - - TP_ARGS(q, bio, new_sector), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( sector_t, sector ) - __field( sector_t, new_sector ) - __array( char, rwbs, RWBS_LEN ) - __array( char, comm, TASK_COMM_LEN ) - ), - - TP_fast_assign( - __entry->dev = bio->bi_bdev->bd_dev; - __entry->sector = bio->bi_sector; - __entry->new_sector = new_sector; - blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); - memcpy(__entry->comm, current->comm, TASK_COMM_LEN); - ), - - TP_printk("%d,%d %s %llu / %llu [%s]", - MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs, - (unsigned long long)__entry->sector, - (unsigned long long)__entry->new_sector, - __entry->comm) -); - -/** - * block_bio_remap - map request for a logical device to the raw device - * @q: queue holding the operation - * @bio: revised operation - * @dev: device for the operation - * @from: original sector for the operation - * - * An operation for a logical device has been mapped to the - * raw block device. - */ -TRACE_EVENT(block_bio_remap, - - TP_PROTO(struct request_queue *q, struct bio *bio, dev_t dev, - sector_t from), - - TP_ARGS(q, bio, dev, from), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( sector_t, sector ) - __field( unsigned int, nr_sector ) - __field( dev_t, old_dev ) - __field( sector_t, old_sector ) - __array( char, rwbs, RWBS_LEN) - ), - - TP_fast_assign( - __entry->dev = bio->bi_bdev->bd_dev; - __entry->sector = bio->bi_sector; - __entry->nr_sector = bio->bi_size >> 9; - __entry->old_dev = dev; - __entry->old_sector = from; - blk_fill_rwbs(__entry->rwbs, bio->bi_rw, bio->bi_size); - ), - - TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu", - MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs, - (unsigned long long)__entry->sector, - __entry->nr_sector, - MAJOR(__entry->old_dev), MINOR(__entry->old_dev), - (unsigned long long)__entry->old_sector) -); - -/** - * block_rq_remap - map request for a block operation request - * @q: queue holding the operation - * @rq: block IO operation request - * @dev: device for the operation - * @from: original sector for the operation - * - * The block operation request @rq in @q has been remapped. The block - * operation request @rq holds the current information and @from hold - * the original sector. - */ -TRACE_EVENT(block_rq_remap, - - TP_PROTO(struct request_queue *q, struct request *rq, dev_t dev, - sector_t from), - - TP_ARGS(q, rq, dev, from), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( sector_t, sector ) - __field( unsigned int, nr_sector ) - __field( dev_t, old_dev ) - __field( sector_t, old_sector ) - __array( char, rwbs, RWBS_LEN) - ), - - TP_fast_assign( - __entry->dev = disk_devt(rq->rq_disk); - __entry->sector = blk_rq_pos(rq); - __entry->nr_sector = blk_rq_sectors(rq); - __entry->old_dev = dev; - __entry->old_sector = from; - blk_fill_rwbs(__entry->rwbs, rq->cmd_flags, blk_rq_bytes(rq)); - ), - - TP_printk("%d,%d %s %llu + %u <- (%d,%d) %llu", - MAJOR(__entry->dev), MINOR(__entry->dev), __entry->rwbs, - (unsigned long long)__entry->sector, - __entry->nr_sector, - MAJOR(__entry->old_dev), MINOR(__entry->old_dev), - (unsigned long long)__entry->old_sector) -); - -#endif /* _TRACE_BLOCK_H */ - -/* This part must be outside protection */ -#include - diff --git a/instrumentation/events/mainline/btrfs.h b/instrumentation/events/mainline/btrfs.h deleted file mode 100644 index 54fab041..00000000 --- a/instrumentation/events/mainline/btrfs.h +++ /dev/null @@ -1,918 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM btrfs - -#if !defined(_TRACE_BTRFS_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_BTRFS_H - -#include -#include -#include - -struct btrfs_root; -struct btrfs_fs_info; -struct btrfs_inode; -struct extent_map; -struct btrfs_ordered_extent; -struct btrfs_delayed_ref_node; -struct btrfs_delayed_tree_ref; -struct btrfs_delayed_data_ref; -struct btrfs_delayed_ref_head; -struct btrfs_block_group_cache; -struct btrfs_free_cluster; -struct map_lookup; -struct extent_buffer; - -#define show_ref_type(type) \ - __print_symbolic(type, \ - { BTRFS_TREE_BLOCK_REF_KEY, "TREE_BLOCK_REF" }, \ - { BTRFS_EXTENT_DATA_REF_KEY, "EXTENT_DATA_REF" }, \ - { BTRFS_EXTENT_REF_V0_KEY, "EXTENT_REF_V0" }, \ - { BTRFS_SHARED_BLOCK_REF_KEY, "SHARED_BLOCK_REF" }, \ - { BTRFS_SHARED_DATA_REF_KEY, "SHARED_DATA_REF" }) - -#define __show_root_type(obj) \ - __print_symbolic_u64(obj, \ - { BTRFS_ROOT_TREE_OBJECTID, "ROOT_TREE" }, \ - { BTRFS_EXTENT_TREE_OBJECTID, "EXTENT_TREE" }, \ - { BTRFS_CHUNK_TREE_OBJECTID, "CHUNK_TREE" }, \ - { BTRFS_DEV_TREE_OBJECTID, "DEV_TREE" }, \ - { BTRFS_FS_TREE_OBJECTID, "FS_TREE" }, \ - { BTRFS_ROOT_TREE_DIR_OBJECTID, "ROOT_TREE_DIR" }, \ - { BTRFS_CSUM_TREE_OBJECTID, "CSUM_TREE" }, \ - { BTRFS_TREE_LOG_OBJECTID, "TREE_LOG" }, \ - { BTRFS_TREE_RELOC_OBJECTID, "TREE_RELOC" }, \ - { BTRFS_DATA_RELOC_TREE_OBJECTID, "DATA_RELOC_TREE" }) - -#define show_root_type(obj) \ - obj, ((obj >= BTRFS_DATA_RELOC_TREE_OBJECTID) || \ - (obj <= BTRFS_CSUM_TREE_OBJECTID )) ? __show_root_type(obj) : "-" - -#define BTRFS_GROUP_FLAGS \ - { BTRFS_BLOCK_GROUP_DATA, "DATA"}, \ - { BTRFS_BLOCK_GROUP_SYSTEM, "SYSTEM"}, \ - { BTRFS_BLOCK_GROUP_METADATA, "METADATA"}, \ - { BTRFS_BLOCK_GROUP_RAID0, "RAID0"}, \ - { BTRFS_BLOCK_GROUP_RAID1, "RAID1"}, \ - { BTRFS_BLOCK_GROUP_DUP, "DUP"}, \ - { BTRFS_BLOCK_GROUP_RAID10, "RAID10"} - -#define BTRFS_UUID_SIZE 16 - -TRACE_EVENT(btrfs_transaction_commit, - - TP_PROTO(struct btrfs_root *root), - - TP_ARGS(root), - - TP_STRUCT__entry( - __field( u64, generation ) - __field( u64, root_objectid ) - ), - - TP_fast_assign( - __entry->generation = root->fs_info->generation; - __entry->root_objectid = root->root_key.objectid; - ), - - TP_printk("root = %llu(%s), gen = %llu", - show_root_type(__entry->root_objectid), - (unsigned long long)__entry->generation) -); - -DECLARE_EVENT_CLASS(btrfs__inode, - - TP_PROTO(struct inode *inode), - - TP_ARGS(inode), - - TP_STRUCT__entry( - __field( ino_t, ino ) - __field( blkcnt_t, blocks ) - __field( u64, disk_i_size ) - __field( u64, generation ) - __field( u64, last_trans ) - __field( u64, logged_trans ) - __field( u64, root_objectid ) - ), - - TP_fast_assign( - __entry->ino = inode->i_ino; - __entry->blocks = inode->i_blocks; - __entry->disk_i_size = BTRFS_I(inode)->disk_i_size; - __entry->generation = BTRFS_I(inode)->generation; - __entry->last_trans = BTRFS_I(inode)->last_trans; - __entry->logged_trans = BTRFS_I(inode)->logged_trans; - __entry->root_objectid = - BTRFS_I(inode)->root->root_key.objectid; - ), - - TP_printk("root = %llu(%s), gen = %llu, ino = %lu, blocks = %llu, " - "disk_i_size = %llu, last_trans = %llu, logged_trans = %llu", - show_root_type(__entry->root_objectid), - (unsigned long long)__entry->generation, - (unsigned long)__entry->ino, - (unsigned long long)__entry->blocks, - (unsigned long long)__entry->disk_i_size, - (unsigned long long)__entry->last_trans, - (unsigned long long)__entry->logged_trans) -); - -DEFINE_EVENT(btrfs__inode, btrfs_inode_new, - - TP_PROTO(struct inode *inode), - - TP_ARGS(inode) -); - -DEFINE_EVENT(btrfs__inode, btrfs_inode_request, - - TP_PROTO(struct inode *inode), - - TP_ARGS(inode) -); - -DEFINE_EVENT(btrfs__inode, btrfs_inode_evict, - - TP_PROTO(struct inode *inode), - - TP_ARGS(inode) -); - -#define __show_map_type(type) \ - __print_symbolic_u64(type, \ - { EXTENT_MAP_LAST_BYTE, "LAST_BYTE" }, \ - { EXTENT_MAP_HOLE, "HOLE" }, \ - { EXTENT_MAP_INLINE, "INLINE" }, \ - { EXTENT_MAP_DELALLOC, "DELALLOC" }) - -#define show_map_type(type) \ - type, (type >= EXTENT_MAP_LAST_BYTE) ? "-" : __show_map_type(type) - -#define show_map_flags(flag) \ - __print_flags(flag, "|", \ - { EXTENT_FLAG_PINNED, "PINNED" }, \ - { EXTENT_FLAG_COMPRESSED, "COMPRESSED" }, \ - { EXTENT_FLAG_VACANCY, "VACANCY" }, \ - { EXTENT_FLAG_PREALLOC, "PREALLOC" }) - -TRACE_EVENT(btrfs_get_extent, - - TP_PROTO(struct btrfs_root *root, struct extent_map *map), - - TP_ARGS(root, map), - - TP_STRUCT__entry( - __field( u64, root_objectid ) - __field( u64, start ) - __field( u64, len ) - __field( u64, orig_start ) - __field( u64, block_start ) - __field( u64, block_len ) - __field( unsigned long, flags ) - __field( int, refs ) - __field( unsigned int, compress_type ) - ), - - TP_fast_assign( - __entry->root_objectid = root->root_key.objectid; - __entry->start = map->start; - __entry->len = map->len; - __entry->orig_start = map->orig_start; - __entry->block_start = map->block_start; - __entry->block_len = map->block_len; - __entry->flags = map->flags; - __entry->refs = atomic_read(&map->refs); - __entry->compress_type = map->compress_type; - ), - - TP_printk("root = %llu(%s), start = %llu, len = %llu, " - "orig_start = %llu, block_start = %llu(%s), " - "block_len = %llu, flags = %s, refs = %u, " - "compress_type = %u", - show_root_type(__entry->root_objectid), - (unsigned long long)__entry->start, - (unsigned long long)__entry->len, - (unsigned long long)__entry->orig_start, - show_map_type(__entry->block_start), - (unsigned long long)__entry->block_len, - show_map_flags(__entry->flags), - __entry->refs, __entry->compress_type) -); - -#define show_ordered_flags(flags) \ - __print_symbolic(flags, \ - { BTRFS_ORDERED_IO_DONE, "IO_DONE" }, \ - { BTRFS_ORDERED_COMPLETE, "COMPLETE" }, \ - { BTRFS_ORDERED_NOCOW, "NOCOW" }, \ - { BTRFS_ORDERED_COMPRESSED, "COMPRESSED" }, \ - { BTRFS_ORDERED_PREALLOC, "PREALLOC" }, \ - { BTRFS_ORDERED_DIRECT, "DIRECT" }) - -DECLARE_EVENT_CLASS(btrfs__ordered_extent, - - TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), - - TP_ARGS(inode, ordered), - - TP_STRUCT__entry( - __field( ino_t, ino ) - __field( u64, file_offset ) - __field( u64, start ) - __field( u64, len ) - __field( u64, disk_len ) - __field( u64, bytes_left ) - __field( unsigned long, flags ) - __field( int, compress_type ) - __field( int, refs ) - __field( u64, root_objectid ) - ), - - TP_fast_assign( - __entry->ino = inode->i_ino; - __entry->file_offset = ordered->file_offset; - __entry->start = ordered->start; - __entry->len = ordered->len; - __entry->disk_len = ordered->disk_len; - __entry->bytes_left = ordered->bytes_left; - __entry->flags = ordered->flags; - __entry->compress_type = ordered->compress_type; - __entry->refs = atomic_read(&ordered->refs); - __entry->root_objectid = - BTRFS_I(inode)->root->root_key.objectid; - ), - - TP_printk("root = %llu(%s), ino = %llu, file_offset = %llu, " - "start = %llu, len = %llu, disk_len = %llu, " - "bytes_left = %llu, flags = %s, compress_type = %d, " - "refs = %d", - show_root_type(__entry->root_objectid), - (unsigned long long)__entry->ino, - (unsigned long long)__entry->file_offset, - (unsigned long long)__entry->start, - (unsigned long long)__entry->len, - (unsigned long long)__entry->disk_len, - (unsigned long long)__entry->bytes_left, - show_ordered_flags(__entry->flags), - __entry->compress_type, __entry->refs) -); - -DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_add, - - TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), - - TP_ARGS(inode, ordered) -); - -DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_remove, - - TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), - - TP_ARGS(inode, ordered) -); - -DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_start, - - TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), - - TP_ARGS(inode, ordered) -); - -DEFINE_EVENT(btrfs__ordered_extent, btrfs_ordered_extent_put, - - TP_PROTO(struct inode *inode, struct btrfs_ordered_extent *ordered), - - TP_ARGS(inode, ordered) -); - -DECLARE_EVENT_CLASS(btrfs__writepage, - - TP_PROTO(struct page *page, struct inode *inode, - struct writeback_control *wbc), - - TP_ARGS(page, inode, wbc), - - TP_STRUCT__entry( - __field( ino_t, ino ) - __field( pgoff_t, index ) - __field( long, nr_to_write ) - __field( long, pages_skipped ) - __field( loff_t, range_start ) - __field( loff_t, range_end ) - __field( char, for_kupdate ) - __field( char, for_reclaim ) - __field( char, range_cyclic ) - __field( pgoff_t, writeback_index ) - __field( u64, root_objectid ) - ), - - TP_fast_assign( - __entry->ino = inode->i_ino; - __entry->index = page->index; - __entry->nr_to_write = wbc->nr_to_write; - __entry->pages_skipped = wbc->pages_skipped; - __entry->range_start = wbc->range_start; - __entry->range_end = wbc->range_end; - __entry->for_kupdate = wbc->for_kupdate; - __entry->for_reclaim = wbc->for_reclaim; - __entry->range_cyclic = wbc->range_cyclic; - __entry->writeback_index = inode->i_mapping->writeback_index; - __entry->root_objectid = - BTRFS_I(inode)->root->root_key.objectid; - ), - - TP_printk("root = %llu(%s), ino = %lu, page_index = %lu, " - "nr_to_write = %ld, pages_skipped = %ld, range_start = %llu, " - "range_end = %llu, for_kupdate = %d, " - "for_reclaim = %d, range_cyclic = %d, writeback_index = %lu", - show_root_type(__entry->root_objectid), - (unsigned long)__entry->ino, __entry->index, - __entry->nr_to_write, __entry->pages_skipped, - __entry->range_start, __entry->range_end, - __entry->for_kupdate, - __entry->for_reclaim, __entry->range_cyclic, - (unsigned long)__entry->writeback_index) -); - -DEFINE_EVENT(btrfs__writepage, __extent_writepage, - - TP_PROTO(struct page *page, struct inode *inode, - struct writeback_control *wbc), - - TP_ARGS(page, inode, wbc) -); - -TRACE_EVENT(btrfs_writepage_end_io_hook, - - TP_PROTO(struct page *page, u64 start, u64 end, int uptodate), - - TP_ARGS(page, start, end, uptodate), - - TP_STRUCT__entry( - __field( ino_t, ino ) - __field( pgoff_t, index ) - __field( u64, start ) - __field( u64, end ) - __field( int, uptodate ) - __field( u64, root_objectid ) - ), - - TP_fast_assign( - __entry->ino = page->mapping->host->i_ino; - __entry->index = page->index; - __entry->start = start; - __entry->end = end; - __entry->uptodate = uptodate; - __entry->root_objectid = - BTRFS_I(page->mapping->host)->root->root_key.objectid; - ), - - TP_printk("root = %llu(%s), ino = %lu, page_index = %lu, start = %llu, " - "end = %llu, uptodate = %d", - show_root_type(__entry->root_objectid), - (unsigned long)__entry->ino, (unsigned long)__entry->index, - (unsigned long long)__entry->start, - (unsigned long long)__entry->end, __entry->uptodate) -); - -TRACE_EVENT(btrfs_sync_file, - - TP_PROTO(struct file *file, int datasync), - - TP_ARGS(file, datasync), - - TP_STRUCT__entry( - __field( ino_t, ino ) - __field( ino_t, parent ) - __field( int, datasync ) - __field( u64, root_objectid ) - ), - - TP_fast_assign( - struct dentry *dentry = file->f_path.dentry; - struct inode *inode = dentry->d_inode; - - __entry->ino = inode->i_ino; - __entry->parent = dentry->d_parent->d_inode->i_ino; - __entry->datasync = datasync; - __entry->root_objectid = - BTRFS_I(inode)->root->root_key.objectid; - ), - - TP_printk("root = %llu(%s), ino = %ld, parent = %ld, datasync = %d", - show_root_type(__entry->root_objectid), - (unsigned long)__entry->ino, (unsigned long)__entry->parent, - __entry->datasync) -); - -TRACE_EVENT(btrfs_sync_fs, - - TP_PROTO(int wait), - - TP_ARGS(wait), - - TP_STRUCT__entry( - __field( int, wait ) - ), - - TP_fast_assign( - __entry->wait = wait; - ), - - TP_printk("wait = %d", __entry->wait) -); - -#define show_ref_action(action) \ - __print_symbolic(action, \ - { BTRFS_ADD_DELAYED_REF, "ADD_DELAYED_REF" }, \ - { BTRFS_DROP_DELAYED_REF, "DROP_DELAYED_REF" }, \ - { BTRFS_ADD_DELAYED_EXTENT, "ADD_DELAYED_EXTENT" }, \ - { BTRFS_UPDATE_DELAYED_HEAD, "UPDATE_DELAYED_HEAD" }) - - -TRACE_EVENT(btrfs_delayed_tree_ref, - - TP_PROTO(struct btrfs_delayed_ref_node *ref, - struct btrfs_delayed_tree_ref *full_ref, - int action), - - TP_ARGS(ref, full_ref, action), - - TP_STRUCT__entry( - __field( u64, bytenr ) - __field( u64, num_bytes ) - __field( int, action ) - __field( u64, parent ) - __field( u64, ref_root ) - __field( int, level ) - __field( int, type ) - __field( u64, seq ) - ), - - TP_fast_assign( - __entry->bytenr = ref->bytenr; - __entry->num_bytes = ref->num_bytes; - __entry->action = action; - __entry->parent = full_ref->parent; - __entry->ref_root = full_ref->root; - __entry->level = full_ref->level; - __entry->type = ref->type; - __entry->seq = ref->seq; - ), - - TP_printk("bytenr = %llu, num_bytes = %llu, action = %s, " - "parent = %llu(%s), ref_root = %llu(%s), level = %d, " - "type = %s, seq = %llu", - (unsigned long long)__entry->bytenr, - (unsigned long long)__entry->num_bytes, - show_ref_action(__entry->action), - show_root_type(__entry->parent), - show_root_type(__entry->ref_root), - __entry->level, show_ref_type(__entry->type), - (unsigned long long)__entry->seq) -); - -TRACE_EVENT(btrfs_delayed_data_ref, - - TP_PROTO(struct btrfs_delayed_ref_node *ref, - struct btrfs_delayed_data_ref *full_ref, - int action), - - TP_ARGS(ref, full_ref, action), - - TP_STRUCT__entry( - __field( u64, bytenr ) - __field( u64, num_bytes ) - __field( int, action ) - __field( u64, parent ) - __field( u64, ref_root ) - __field( u64, owner ) - __field( u64, offset ) - __field( int, type ) - __field( u64, seq ) - ), - - TP_fast_assign( - __entry->bytenr = ref->bytenr; - __entry->num_bytes = ref->num_bytes; - __entry->action = action; - __entry->parent = full_ref->parent; - __entry->ref_root = full_ref->root; - __entry->owner = full_ref->objectid; - __entry->offset = full_ref->offset; - __entry->type = ref->type; - __entry->seq = ref->seq; - ), - - TP_printk("bytenr = %llu, num_bytes = %llu, action = %s, " - "parent = %llu(%s), ref_root = %llu(%s), owner = %llu, " - "offset = %llu, type = %s, seq = %llu", - (unsigned long long)__entry->bytenr, - (unsigned long long)__entry->num_bytes, - show_ref_action(__entry->action), - show_root_type(__entry->parent), - show_root_type(__entry->ref_root), - (unsigned long long)__entry->owner, - (unsigned long long)__entry->offset, - show_ref_type(__entry->type), - (unsigned long long)__entry->seq) -); - -TRACE_EVENT(btrfs_delayed_ref_head, - - TP_PROTO(struct btrfs_delayed_ref_node *ref, - struct btrfs_delayed_ref_head *head_ref, - int action), - - TP_ARGS(ref, head_ref, action), - - TP_STRUCT__entry( - __field( u64, bytenr ) - __field( u64, num_bytes ) - __field( int, action ) - __field( int, is_data ) - ), - - TP_fast_assign( - __entry->bytenr = ref->bytenr; - __entry->num_bytes = ref->num_bytes; - __entry->action = action; - __entry->is_data = head_ref->is_data; - ), - - TP_printk("bytenr = %llu, num_bytes = %llu, action = %s, is_data = %d", - (unsigned long long)__entry->bytenr, - (unsigned long long)__entry->num_bytes, - show_ref_action(__entry->action), - __entry->is_data) -); - -#define show_chunk_type(type) \ - __print_flags(type, "|", \ - { BTRFS_BLOCK_GROUP_DATA, "DATA" }, \ - { BTRFS_BLOCK_GROUP_SYSTEM, "SYSTEM"}, \ - { BTRFS_BLOCK_GROUP_METADATA, "METADATA"}, \ - { BTRFS_BLOCK_GROUP_RAID0, "RAID0" }, \ - { BTRFS_BLOCK_GROUP_RAID1, "RAID1" }, \ - { BTRFS_BLOCK_GROUP_DUP, "DUP" }, \ - { BTRFS_BLOCK_GROUP_RAID10, "RAID10"}) - -DECLARE_EVENT_CLASS(btrfs__chunk, - - TP_PROTO(struct btrfs_root *root, struct map_lookup *map, - u64 offset, u64 size), - - TP_ARGS(root, map, offset, size), - - TP_STRUCT__entry( - __field( int, num_stripes ) - __field( u64, type ) - __field( int, sub_stripes ) - __field( u64, offset ) - __field( u64, size ) - __field( u64, root_objectid ) - ), - - TP_fast_assign( - __entry->num_stripes = map->num_stripes; - __entry->type = map->type; - __entry->sub_stripes = map->sub_stripes; - __entry->offset = offset; - __entry->size = size; - __entry->root_objectid = root->root_key.objectid; - ), - - TP_printk("root = %llu(%s), offset = %llu, size = %llu, " - "num_stripes = %d, sub_stripes = %d, type = %s", - show_root_type(__entry->root_objectid), - (unsigned long long)__entry->offset, - (unsigned long long)__entry->size, - __entry->num_stripes, __entry->sub_stripes, - show_chunk_type(__entry->type)) -); - -DEFINE_EVENT(btrfs__chunk, btrfs_chunk_alloc, - - TP_PROTO(struct btrfs_root *root, struct map_lookup *map, - u64 offset, u64 size), - - TP_ARGS(root, map, offset, size) -); - -DEFINE_EVENT(btrfs__chunk, btrfs_chunk_free, - - TP_PROTO(struct btrfs_root *root, struct map_lookup *map, - u64 offset, u64 size), - - TP_ARGS(root, map, offset, size) -); - -TRACE_EVENT(btrfs_cow_block, - - TP_PROTO(struct btrfs_root *root, struct extent_buffer *buf, - struct extent_buffer *cow), - - TP_ARGS(root, buf, cow), - - TP_STRUCT__entry( - __field( u64, root_objectid ) - __field( u64, buf_start ) - __field( int, refs ) - __field( u64, cow_start ) - __field( int, buf_level ) - __field( int, cow_level ) - ), - - TP_fast_assign( - __entry->root_objectid = root->root_key.objectid; - __entry->buf_start = buf->start; - __entry->refs = atomic_read(&buf->refs); - __entry->cow_start = cow->start; - __entry->buf_level = btrfs_header_level(buf); - __entry->cow_level = btrfs_header_level(cow); - ), - - TP_printk("root = %llu(%s), refs = %d, orig_buf = %llu " - "(orig_level = %d), cow_buf = %llu (cow_level = %d)", - show_root_type(__entry->root_objectid), - __entry->refs, - (unsigned long long)__entry->buf_start, - __entry->buf_level, - (unsigned long long)__entry->cow_start, - __entry->cow_level) -); - -TRACE_EVENT(btrfs_space_reservation, - - TP_PROTO(struct btrfs_fs_info *fs_info, char *type, u64 val, - u64 bytes, int reserve), - - TP_ARGS(fs_info, type, val, bytes, reserve), - - TP_STRUCT__entry( - __array( u8, fsid, BTRFS_UUID_SIZE ) - __string( type, type ) - __field( u64, val ) - __field( u64, bytes ) - __field( int, reserve ) - ), - - TP_fast_assign( - memcpy(__entry->fsid, fs_info->fsid, BTRFS_UUID_SIZE); - __assign_str(type, type); - __entry->val = val; - __entry->bytes = bytes; - __entry->reserve = reserve; - ), - - TP_printk("%pU: %s: %Lu %s %Lu", __entry->fsid, __get_str(type), - __entry->val, __entry->reserve ? "reserve" : "release", - __entry->bytes) -); - -DECLARE_EVENT_CLASS(btrfs__reserved_extent, - - TP_PROTO(struct btrfs_root *root, u64 start, u64 len), - - TP_ARGS(root, start, len), - - TP_STRUCT__entry( - __field( u64, root_objectid ) - __field( u64, start ) - __field( u64, len ) - ), - - TP_fast_assign( - __entry->root_objectid = root->root_key.objectid; - __entry->start = start; - __entry->len = len; - ), - - TP_printk("root = %llu(%s), start = %llu, len = %llu", - show_root_type(__entry->root_objectid), - (unsigned long long)__entry->start, - (unsigned long long)__entry->len) -); - -DEFINE_EVENT(btrfs__reserved_extent, btrfs_reserved_extent_alloc, - - TP_PROTO(struct btrfs_root *root, u64 start, u64 len), - - TP_ARGS(root, start, len) -); - -DEFINE_EVENT(btrfs__reserved_extent, btrfs_reserved_extent_free, - - TP_PROTO(struct btrfs_root *root, u64 start, u64 len), - - TP_ARGS(root, start, len) -); - -TRACE_EVENT(find_free_extent, - - TP_PROTO(struct btrfs_root *root, u64 num_bytes, u64 empty_size, - u64 data), - - TP_ARGS(root, num_bytes, empty_size, data), - - TP_STRUCT__entry( - __field( u64, root_objectid ) - __field( u64, num_bytes ) - __field( u64, empty_size ) - __field( u64, data ) - ), - - TP_fast_assign( - __entry->root_objectid = root->root_key.objectid; - __entry->num_bytes = num_bytes; - __entry->empty_size = empty_size; - __entry->data = data; - ), - - TP_printk("root = %Lu(%s), len = %Lu, empty_size = %Lu, " - "flags = %Lu(%s)", show_root_type(__entry->root_objectid), - __entry->num_bytes, __entry->empty_size, __entry->data, - __print_flags((unsigned long)__entry->data, "|", - BTRFS_GROUP_FLAGS)) -); - -DECLARE_EVENT_CLASS(btrfs__reserve_extent, - - TP_PROTO(struct btrfs_root *root, - struct btrfs_block_group_cache *block_group, u64 start, - u64 len), - - TP_ARGS(root, block_group, start, len), - - TP_STRUCT__entry( - __field( u64, root_objectid ) - __field( u64, bg_objectid ) - __field( u64, flags ) - __field( u64, start ) - __field( u64, len ) - ), - - TP_fast_assign( - __entry->root_objectid = root->root_key.objectid; - __entry->bg_objectid = block_group->key.objectid; - __entry->flags = block_group->flags; - __entry->start = start; - __entry->len = len; - ), - - TP_printk("root = %Lu(%s), block_group = %Lu, flags = %Lu(%s), " - "start = %Lu, len = %Lu", - show_root_type(__entry->root_objectid), __entry->bg_objectid, - __entry->flags, __print_flags((unsigned long)__entry->flags, - "|", BTRFS_GROUP_FLAGS), - __entry->start, __entry->len) -); - -DEFINE_EVENT(btrfs__reserve_extent, btrfs_reserve_extent, - - TP_PROTO(struct btrfs_root *root, - struct btrfs_block_group_cache *block_group, u64 start, - u64 len), - - TP_ARGS(root, block_group, start, len) -); - -DEFINE_EVENT(btrfs__reserve_extent, btrfs_reserve_extent_cluster, - - TP_PROTO(struct btrfs_root *root, - struct btrfs_block_group_cache *block_group, u64 start, - u64 len), - - TP_ARGS(root, block_group, start, len) -); - -TRACE_EVENT(btrfs_find_cluster, - - TP_PROTO(struct btrfs_block_group_cache *block_group, u64 start, - u64 bytes, u64 empty_size, u64 min_bytes), - - TP_ARGS(block_group, start, bytes, empty_size, min_bytes), - - TP_STRUCT__entry( - __field( u64, bg_objectid ) - __field( u64, flags ) - __field( u64, start ) - __field( u64, bytes ) - __field( u64, empty_size ) - __field( u64, min_bytes ) - ), - - TP_fast_assign( - __entry->bg_objectid = block_group->key.objectid; - __entry->flags = block_group->flags; - __entry->start = start; - __entry->bytes = bytes; - __entry->empty_size = empty_size; - __entry->min_bytes = min_bytes; - ), - - TP_printk("block_group = %Lu, flags = %Lu(%s), start = %Lu, len = %Lu," - " empty_size = %Lu, min_bytes = %Lu", __entry->bg_objectid, - __entry->flags, - __print_flags((unsigned long)__entry->flags, "|", - BTRFS_GROUP_FLAGS), __entry->start, - __entry->bytes, __entry->empty_size, __entry->min_bytes) -); - -TRACE_EVENT(btrfs_failed_cluster_setup, - - TP_PROTO(struct btrfs_block_group_cache *block_group), - - TP_ARGS(block_group), - - TP_STRUCT__entry( - __field( u64, bg_objectid ) - ), - - TP_fast_assign( - __entry->bg_objectid = block_group->key.objectid; - ), - - TP_printk("block_group = %Lu", __entry->bg_objectid) -); - -TRACE_EVENT(btrfs_setup_cluster, - - TP_PROTO(struct btrfs_block_group_cache *block_group, - struct btrfs_free_cluster *cluster, u64 size, int bitmap), - - TP_ARGS(block_group, cluster, size, bitmap), - - TP_STRUCT__entry( - __field( u64, bg_objectid ) - __field( u64, flags ) - __field( u64, start ) - __field( u64, max_size ) - __field( u64, size ) - __field( int, bitmap ) - ), - - TP_fast_assign( - __entry->bg_objectid = block_group->key.objectid; - __entry->flags = block_group->flags; - __entry->start = cluster->window_start; - __entry->max_size = cluster->max_size; - __entry->size = size; - __entry->bitmap = bitmap; - ), - - TP_printk("block_group = %Lu, flags = %Lu(%s), window_start = %Lu, " - "size = %Lu, max_size = %Lu, bitmap = %d", - __entry->bg_objectid, - __entry->flags, - __print_flags((unsigned long)__entry->flags, "|", - BTRFS_GROUP_FLAGS), __entry->start, - __entry->size, __entry->max_size, __entry->bitmap) -); - -struct extent_state; -TRACE_EVENT(alloc_extent_state, - - TP_PROTO(struct extent_state *state, gfp_t mask, unsigned long IP), - - TP_ARGS(state, mask, IP), - - TP_STRUCT__entry( - __field(struct extent_state *, state) - __field(gfp_t, mask) - __field(unsigned long, ip) - ), - - TP_fast_assign( - __entry->state = state, - __entry->mask = mask, - __entry->ip = IP - ), - - TP_printk("state=%p; mask = %s; caller = %pF", __entry->state, - show_gfp_flags(__entry->mask), (void *)__entry->ip) -); - -TRACE_EVENT(free_extent_state, - - TP_PROTO(struct extent_state *state, unsigned long IP), - - TP_ARGS(state, IP), - - TP_STRUCT__entry( - __field(struct extent_state *, state) - __field(unsigned long, ip) - ), - - TP_fast_assign( - __entry->state = state, - __entry->ip = IP - ), - - TP_printk(" state=%p; caller = %pF", __entry->state, - (void *)__entry->ip) -); - -#endif /* _TRACE_BTRFS_H */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/compaction.h b/instrumentation/events/mainline/compaction.h deleted file mode 100644 index fde1b3e9..00000000 --- a/instrumentation/events/mainline/compaction.h +++ /dev/null @@ -1,74 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM compaction - -#if !defined(_TRACE_COMPACTION_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_COMPACTION_H - -#include -#include -#include - -DECLARE_EVENT_CLASS(mm_compaction_isolate_template, - - TP_PROTO(unsigned long nr_scanned, - unsigned long nr_taken), - - TP_ARGS(nr_scanned, nr_taken), - - TP_STRUCT__entry( - __field(unsigned long, nr_scanned) - __field(unsigned long, nr_taken) - ), - - TP_fast_assign( - __entry->nr_scanned = nr_scanned; - __entry->nr_taken = nr_taken; - ), - - TP_printk("nr_scanned=%lu nr_taken=%lu", - __entry->nr_scanned, - __entry->nr_taken) -); - -DEFINE_EVENT(mm_compaction_isolate_template, mm_compaction_isolate_migratepages, - - TP_PROTO(unsigned long nr_scanned, - unsigned long nr_taken), - - TP_ARGS(nr_scanned, nr_taken) -); - -DEFINE_EVENT(mm_compaction_isolate_template, mm_compaction_isolate_freepages, - TP_PROTO(unsigned long nr_scanned, - unsigned long nr_taken), - - TP_ARGS(nr_scanned, nr_taken) -); - -TRACE_EVENT(mm_compaction_migratepages, - - TP_PROTO(unsigned long nr_migrated, - unsigned long nr_failed), - - TP_ARGS(nr_migrated, nr_failed), - - TP_STRUCT__entry( - __field(unsigned long, nr_migrated) - __field(unsigned long, nr_failed) - ), - - TP_fast_assign( - __entry->nr_migrated = nr_migrated; - __entry->nr_failed = nr_failed; - ), - - TP_printk("nr_migrated=%lu nr_failed=%lu", - __entry->nr_migrated, - __entry->nr_failed) -); - - -#endif /* _TRACE_COMPACTION_H */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/ext3.h b/instrumentation/events/mainline/ext3.h deleted file mode 100644 index 15d11a39..00000000 --- a/instrumentation/events/mainline/ext3.h +++ /dev/null @@ -1,864 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM ext3 - -#if !defined(_TRACE_EXT3_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_EXT3_H - -#include - -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( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->mode = inode->i_mode; - __entry->uid = i_uid_read(inode); - __entry->gid = i_gid_read(inode); - __entry->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( - __entry->dev = dir->i_sb->s_dev; - __entry->dir = dir->i_ino; - __entry->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( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->dir = dir->i_ino; - __entry->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( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->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( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->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( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->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( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->pos = pos; - __entry->len = len; - __entry->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( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->pos = pos; - __entry->len = len; - __entry->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( - __entry->index = page->index; - __entry->ino = page->mapping->host->i_ino; - __entry->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( - __entry->index = page->index; - __entry->offset = offset; - __entry->ino = page->mapping->host->i_ino; - __entry->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( - __entry->dev = sb->s_dev; - __entry->blk = blk; - __entry->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( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->count = count; - __entry->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( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->block = block; - __entry->count = count; - __entry->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( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->mode = inode->i_mode; - __entry->block = block; - __entry->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( - struct dentry *dentry = file->f_path.dentry; - - __entry->dev = dentry->d_inode->i_sb->s_dev; - __entry->ino = dentry->d_inode->i_ino; - __entry->datasync = datasync; - __entry->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( - __entry->ret = ret; - __entry->ino = inode->i_ino; - __entry->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( - __entry->dev = sb->s_dev; - __entry->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( - __entry->dev = sb->s_dev; - __entry->start = rsv_node->rsv_window._rsv_start; - __entry->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( - __entry->start = rsv_node->rsv_window._rsv_start; - __entry->end = rsv_node->rsv_window._rsv_end; - __entry->ino = inode->i_ino; - __entry->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( - __entry->dev = sb->s_dev; - __entry->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( - __entry->block = block; - __entry->start = rsv_node->rsv_window._rsv_start; - __entry->end = rsv_node->rsv_window._rsv_end; - __entry->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( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->mode = inode->i_mode; - __entry->is_metadata = is_metadata; - __entry->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( - __entry->dev = sb->s_dev; - __entry->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( - __entry->ino = inode->i_ino; - __entry->dev = inode->i_sb->s_dev; - __entry->pos = offset; - __entry->len = len; - __entry->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( - __entry->ino = inode->i_ino; - __entry->dev = inode->i_sb->s_dev; - __entry->pos = offset; - __entry->len = len; - __entry->rw = rw; - __entry->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( - __entry->parent = parent->i_ino; - __entry->ino = dentry->d_inode->i_ino; - __entry->size = dentry->d_inode->i_size; - __entry->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( - __entry->ino = dentry->d_inode->i_ino; - __entry->dev = dentry->d_inode->i_sb->s_dev; - __entry->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( - __entry->ino = inode->i_ino; - __entry->dev = inode->i_sb->s_dev; - __entry->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( - __entry->ino = inode->i_ino; - __entry->dev = inode->i_sb->s_dev; - __entry->lblk = lblk; - __entry->len = len; - __entry->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( - __entry->ino = inode->i_ino; - __entry->dev = inode->i_sb->s_dev; - __entry->lblk = lblk; - __entry->pblk = pblk; - __entry->len = len; - __entry->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( - __entry->ino = inode->i_ino; - __entry->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 diff --git a/instrumentation/events/mainline/ext4.h b/instrumentation/events/mainline/ext4.h deleted file mode 100644 index d49b2853..00000000 --- a/instrumentation/events/mainline/ext4.h +++ /dev/null @@ -1,2061 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM ext4 - -#if !defined(_TRACE_EXT4_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_EXT4_H - -#include -#include - -struct ext4_allocation_context; -struct ext4_allocation_request; -struct ext4_extent; -struct ext4_prealloc_space; -struct ext4_inode_info; -struct mpage_da_data; -struct ext4_map_blocks; -struct ext4_extent; - -#define EXT4_I(inode) (container_of(inode, struct ext4_inode_info, vfs_inode)) - -TRACE_EVENT(ext4_free_inode, - TP_PROTO(struct inode *inode), - - TP_ARGS(inode), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( uid_t, uid ) - __field( gid_t, gid ) - __field( __u64, blocks ) - __field( __u16, mode ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->uid = i_uid_read(inode); - __entry->gid = i_gid_read(inode); - __entry->blocks = inode->i_blocks; - __entry->mode = inode->i_mode; - ), - - TP_printk("dev %d,%d ino %lu mode 0%o uid %u gid %u blocks %llu", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, __entry->mode, - __entry->uid, __entry->gid, __entry->blocks) -); - -TRACE_EVENT(ext4_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( __u16, mode ) - ), - - TP_fast_assign( - __entry->dev = dir->i_sb->s_dev; - __entry->dir = dir->i_ino; - __entry->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(ext4_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( __u16, mode ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->dir = dir->i_ino; - __entry->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(ext4_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( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->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(ext4_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( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->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(ext4_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( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->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(ext4_begin_ordered_truncate, - TP_PROTO(struct inode *inode, loff_t new_size), - - TP_ARGS(inode, new_size), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( loff_t, new_size ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->new_size = new_size; - ), - - TP_printk("dev %d,%d ino %lu new_size %lld", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->new_size) -); - -DECLARE_EVENT_CLASS(ext4__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( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->pos = pos; - __entry->len = len; - __entry->flags = flags; - ), - - TP_printk("dev %d,%d ino %lu pos %lld len %u flags %u", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->pos, __entry->len, __entry->flags) -); - -DEFINE_EVENT(ext4__write_begin, ext4_write_begin, - - TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, - unsigned int flags), - - TP_ARGS(inode, pos, len, flags) -); - -DEFINE_EVENT(ext4__write_begin, ext4_da_write_begin, - - TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, - unsigned int flags), - - TP_ARGS(inode, pos, len, flags) -); - -DECLARE_EVENT_CLASS(ext4__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( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->pos = pos; - __entry->len = len; - __entry->copied = copied; - ), - - TP_printk("dev %d,%d ino %lu pos %lld len %u copied %u", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->pos, __entry->len, __entry->copied) -); - -DEFINE_EVENT(ext4__write_end, ext4_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(ext4__write_end, ext4_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(ext4__write_end, ext4_journalled_write_end, - - TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, - unsigned int copied), - - TP_ARGS(inode, pos, len, copied) -); - -DEFINE_EVENT(ext4__write_end, ext4_da_write_end, - - TP_PROTO(struct inode *inode, loff_t pos, unsigned int len, - unsigned int copied), - - TP_ARGS(inode, pos, len, copied) -); - -TRACE_EVENT(ext4_da_writepages, - TP_PROTO(struct inode *inode, struct writeback_control *wbc), - - TP_ARGS(inode, wbc), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( long, nr_to_write ) - __field( long, pages_skipped ) - __field( loff_t, range_start ) - __field( loff_t, range_end ) - __field( pgoff_t, writeback_index ) - __field( int, sync_mode ) - __field( char, for_kupdate ) - __field( char, range_cyclic ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->nr_to_write = wbc->nr_to_write; - __entry->pages_skipped = wbc->pages_skipped; - __entry->range_start = wbc->range_start; - __entry->range_end = wbc->range_end; - __entry->writeback_index = inode->i_mapping->writeback_index; - __entry->sync_mode = wbc->sync_mode; - __entry->for_kupdate = wbc->for_kupdate; - __entry->range_cyclic = wbc->range_cyclic; - ), - - TP_printk("dev %d,%d ino %lu nr_to_write %ld pages_skipped %ld " - "range_start %lld range_end %lld sync_mode %d " - "for_kupdate %d range_cyclic %d writeback_index %lu", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, __entry->nr_to_write, - __entry->pages_skipped, __entry->range_start, - __entry->range_end, __entry->sync_mode, - __entry->for_kupdate, __entry->range_cyclic, - (unsigned long) __entry->writeback_index) -); - -TRACE_EVENT(ext4_da_write_pages, - TP_PROTO(struct inode *inode, struct mpage_da_data *mpd), - - TP_ARGS(inode, mpd), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( __u64, b_blocknr ) - __field( __u32, b_size ) - __field( __u32, b_state ) - __field( unsigned long, first_page ) - __field( int, io_done ) - __field( int, pages_written ) - __field( int, sync_mode ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->b_blocknr = mpd->b_blocknr; - __entry->b_size = mpd->b_size; - __entry->b_state = mpd->b_state; - __entry->first_page = mpd->first_page; - __entry->io_done = mpd->io_done; - __entry->pages_written = mpd->pages_written; - __entry->sync_mode = mpd->wbc->sync_mode; - ), - - TP_printk("dev %d,%d ino %lu b_blocknr %llu b_size %u b_state 0x%04x " - "first_page %lu io_done %d pages_written %d sync_mode %d", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->b_blocknr, __entry->b_size, - __entry->b_state, __entry->first_page, - __entry->io_done, __entry->pages_written, - __entry->sync_mode - ) -); - -TRACE_EVENT(ext4_da_writepages_result, - TP_PROTO(struct inode *inode, struct writeback_control *wbc, - int ret, int pages_written), - - TP_ARGS(inode, wbc, ret, pages_written), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( int, ret ) - __field( int, pages_written ) - __field( long, pages_skipped ) - __field( pgoff_t, writeback_index ) - __field( int, sync_mode ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->ret = ret; - __entry->pages_written = pages_written; - __entry->pages_skipped = wbc->pages_skipped; - __entry->writeback_index = inode->i_mapping->writeback_index; - __entry->sync_mode = wbc->sync_mode; - ), - - TP_printk("dev %d,%d ino %lu ret %d pages_written %d pages_skipped %ld " - "sync_mode %d writeback_index %lu", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, __entry->ret, - __entry->pages_written, __entry->pages_skipped, - __entry->sync_mode, - (unsigned long) __entry->writeback_index) -); - -DECLARE_EVENT_CLASS(ext4__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( - __entry->dev = page->mapping->host->i_sb->s_dev; - __entry->ino = page->mapping->host->i_ino; - __entry->index = page->index; - ), - - TP_printk("dev %d,%d ino %lu page_index %lu", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - (unsigned long) __entry->index) -); - -DEFINE_EVENT(ext4__page_op, ext4_writepage, - - TP_PROTO(struct page *page), - - TP_ARGS(page) -); - -DEFINE_EVENT(ext4__page_op, ext4_readpage, - - TP_PROTO(struct page *page), - - TP_ARGS(page) -); - -DEFINE_EVENT(ext4__page_op, ext4_releasepage, - - TP_PROTO(struct page *page), - - TP_ARGS(page) -); - -TRACE_EVENT(ext4_invalidatepage, - TP_PROTO(struct page *page, unsigned long offset), - - TP_ARGS(page, offset), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( pgoff_t, index ) - __field( unsigned long, offset ) - - ), - - TP_fast_assign( - __entry->dev = page->mapping->host->i_sb->s_dev; - __entry->ino = page->mapping->host->i_ino; - __entry->index = page->index; - __entry->offset = offset; - ), - - TP_printk("dev %d,%d ino %lu page_index %lu offset %lu", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - (unsigned long) __entry->index, __entry->offset) -); - -TRACE_EVENT(ext4_discard_blocks, - TP_PROTO(struct super_block *sb, unsigned long long blk, - unsigned long long count), - - TP_ARGS(sb, blk, count), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( __u64, blk ) - __field( __u64, count ) - - ), - - TP_fast_assign( - __entry->dev = sb->s_dev; - __entry->blk = blk; - __entry->count = count; - ), - - TP_printk("dev %d,%d blk %llu count %llu", - MAJOR(__entry->dev), MINOR(__entry->dev), - __entry->blk, __entry->count) -); - -DECLARE_EVENT_CLASS(ext4__mb_new_pa, - TP_PROTO(struct ext4_allocation_context *ac, - struct ext4_prealloc_space *pa), - - TP_ARGS(ac, pa), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( __u64, pa_pstart ) - __field( __u64, pa_lstart ) - __field( __u32, pa_len ) - - ), - - TP_fast_assign( - __entry->dev = ac->ac_sb->s_dev; - __entry->ino = ac->ac_inode->i_ino; - __entry->pa_pstart = pa->pa_pstart; - __entry->pa_lstart = pa->pa_lstart; - __entry->pa_len = pa->pa_len; - ), - - TP_printk("dev %d,%d ino %lu pstart %llu len %u lstart %llu", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->pa_pstart, __entry->pa_len, __entry->pa_lstart) -); - -DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_inode_pa, - - TP_PROTO(struct ext4_allocation_context *ac, - struct ext4_prealloc_space *pa), - - TP_ARGS(ac, pa) -); - -DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_group_pa, - - TP_PROTO(struct ext4_allocation_context *ac, - struct ext4_prealloc_space *pa), - - TP_ARGS(ac, pa) -); - -TRACE_EVENT(ext4_mb_release_inode_pa, - TP_PROTO(struct ext4_prealloc_space *pa, - unsigned long long block, unsigned int count), - - TP_ARGS(pa, block, count), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( __u64, block ) - __field( __u32, count ) - - ), - - TP_fast_assign( - __entry->dev = pa->pa_inode->i_sb->s_dev; - __entry->ino = pa->pa_inode->i_ino; - __entry->block = block; - __entry->count = count; - ), - - TP_printk("dev %d,%d ino %lu block %llu count %u", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->block, __entry->count) -); - -TRACE_EVENT(ext4_mb_release_group_pa, - TP_PROTO(struct super_block *sb, struct ext4_prealloc_space *pa), - - TP_ARGS(sb, pa), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( __u64, pa_pstart ) - __field( __u32, pa_len ) - - ), - - TP_fast_assign( - __entry->dev = sb->s_dev; - __entry->pa_pstart = pa->pa_pstart; - __entry->pa_len = pa->pa_len; - ), - - TP_printk("dev %d,%d pstart %llu len %u", - MAJOR(__entry->dev), MINOR(__entry->dev), - __entry->pa_pstart, __entry->pa_len) -); - -TRACE_EVENT(ext4_discard_preallocations, - TP_PROTO(struct inode *inode), - - TP_ARGS(inode), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - ), - - TP_printk("dev %d,%d ino %lu", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino) -); - -TRACE_EVENT(ext4_mb_discard_preallocations, - TP_PROTO(struct super_block *sb, int needed), - - TP_ARGS(sb, needed), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( int, needed ) - - ), - - TP_fast_assign( - __entry->dev = sb->s_dev; - __entry->needed = needed; - ), - - TP_printk("dev %d,%d needed %d", - MAJOR(__entry->dev), MINOR(__entry->dev), - __entry->needed) -); - -TRACE_EVENT(ext4_request_blocks, - TP_PROTO(struct ext4_allocation_request *ar), - - TP_ARGS(ar), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( unsigned int, len ) - __field( __u32, logical ) - __field( __u32, lleft ) - __field( __u32, lright ) - __field( __u64, goal ) - __field( __u64, pleft ) - __field( __u64, pright ) - __field( unsigned int, flags ) - ), - - TP_fast_assign( - __entry->dev = ar->inode->i_sb->s_dev; - __entry->ino = ar->inode->i_ino; - __entry->len = ar->len; - __entry->logical = ar->logical; - __entry->goal = ar->goal; - __entry->lleft = ar->lleft; - __entry->lright = ar->lright; - __entry->pleft = ar->pleft; - __entry->pright = ar->pright; - __entry->flags = ar->flags; - ), - - TP_printk("dev %d,%d ino %lu flags %u len %u lblk %u goal %llu " - "lleft %u lright %u pleft %llu pright %llu ", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, __entry->flags, - __entry->len, __entry->logical, __entry->goal, - __entry->lleft, __entry->lright, __entry->pleft, - __entry->pright) -); - -TRACE_EVENT(ext4_allocate_blocks, - TP_PROTO(struct ext4_allocation_request *ar, unsigned long long block), - - TP_ARGS(ar, block), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( __u64, block ) - __field( unsigned int, len ) - __field( __u32, logical ) - __field( __u32, lleft ) - __field( __u32, lright ) - __field( __u64, goal ) - __field( __u64, pleft ) - __field( __u64, pright ) - __field( unsigned int, flags ) - ), - - TP_fast_assign( - __entry->dev = ar->inode->i_sb->s_dev; - __entry->ino = ar->inode->i_ino; - __entry->block = block; - __entry->len = ar->len; - __entry->logical = ar->logical; - __entry->goal = ar->goal; - __entry->lleft = ar->lleft; - __entry->lright = ar->lright; - __entry->pleft = ar->pleft; - __entry->pright = ar->pright; - __entry->flags = ar->flags; - ), - - TP_printk("dev %d,%d ino %lu flags %u len %u block %llu lblk %u " - "goal %llu lleft %u lright %u pleft %llu pright %llu", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, __entry->flags, - __entry->len, __entry->block, __entry->logical, - __entry->goal, __entry->lleft, __entry->lright, - __entry->pleft, __entry->pright) -); - -TRACE_EVENT(ext4_free_blocks, - TP_PROTO(struct inode *inode, __u64 block, unsigned long count, - int flags), - - TP_ARGS(inode, block, count, flags), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( __u64, block ) - __field( unsigned long, count ) - __field( int, flags ) - __field( __u16, mode ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->block = block; - __entry->count = count; - __entry->flags = flags; - __entry->mode = inode->i_mode; - ), - - TP_printk("dev %d,%d ino %lu mode 0%o block %llu count %lu flags %d", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->mode, __entry->block, __entry->count, - __entry->flags) -); - -TRACE_EVENT(ext4_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( - struct dentry *dentry = file->f_path.dentry; - - __entry->dev = dentry->d_inode->i_sb->s_dev; - __entry->ino = dentry->d_inode->i_ino; - __entry->datasync = datasync; - __entry->parent = dentry->d_parent->d_inode->i_ino; - ), - - TP_printk("dev %d,%d ino %lu parent %lu datasync %d ", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - (unsigned long) __entry->parent, __entry->datasync) -); - -TRACE_EVENT(ext4_sync_file_exit, - TP_PROTO(struct inode *inode, int ret), - - TP_ARGS(inode, ret), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( int, ret ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->ret = ret; - ), - - TP_printk("dev %d,%d ino %lu ret %d", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->ret) -); - -TRACE_EVENT(ext4_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( - __entry->dev = sb->s_dev; - __entry->wait = wait; - ), - - TP_printk("dev %d,%d wait %d", - MAJOR(__entry->dev), MINOR(__entry->dev), - __entry->wait) -); - -TRACE_EVENT(ext4_alloc_da_blocks, - TP_PROTO(struct inode *inode), - - TP_ARGS(inode), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( unsigned int, data_blocks ) - __field( unsigned int, meta_blocks ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->data_blocks = EXT4_I(inode)->i_reserved_data_blocks; - __entry->meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; - ), - - TP_printk("dev %d,%d ino %lu data_blocks %u meta_blocks %u", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->data_blocks, __entry->meta_blocks) -); - -TRACE_EVENT(ext4_mballoc_alloc, - TP_PROTO(struct ext4_allocation_context *ac), - - TP_ARGS(ac), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( __u32, orig_logical ) - __field( int, orig_start ) - __field( __u32, orig_group ) - __field( int, orig_len ) - __field( __u32, goal_logical ) - __field( int, goal_start ) - __field( __u32, goal_group ) - __field( int, goal_len ) - __field( __u32, result_logical ) - __field( int, result_start ) - __field( __u32, result_group ) - __field( int, result_len ) - __field( __u16, found ) - __field( __u16, groups ) - __field( __u16, buddy ) - __field( __u16, flags ) - __field( __u16, tail ) - __field( __u8, cr ) - ), - - TP_fast_assign( - __entry->dev = ac->ac_inode->i_sb->s_dev; - __entry->ino = ac->ac_inode->i_ino; - __entry->orig_logical = ac->ac_o_ex.fe_logical; - __entry->orig_start = ac->ac_o_ex.fe_start; - __entry->orig_group = ac->ac_o_ex.fe_group; - __entry->orig_len = ac->ac_o_ex.fe_len; - __entry->goal_logical = ac->ac_g_ex.fe_logical; - __entry->goal_start = ac->ac_g_ex.fe_start; - __entry->goal_group = ac->ac_g_ex.fe_group; - __entry->goal_len = ac->ac_g_ex.fe_len; - __entry->result_logical = ac->ac_f_ex.fe_logical; - __entry->result_start = ac->ac_f_ex.fe_start; - __entry->result_group = ac->ac_f_ex.fe_group; - __entry->result_len = ac->ac_f_ex.fe_len; - __entry->found = ac->ac_found; - __entry->flags = ac->ac_flags; - __entry->groups = ac->ac_groups_scanned; - __entry->buddy = ac->ac_buddy; - __entry->tail = ac->ac_tail; - __entry->cr = ac->ac_criteria; - ), - - TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u goal %u/%d/%u@%u " - "result %u/%d/%u@%u blks %u grps %u cr %u flags 0x%04x " - "tail %u broken %u", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->orig_group, __entry->orig_start, - __entry->orig_len, __entry->orig_logical, - __entry->goal_group, __entry->goal_start, - __entry->goal_len, __entry->goal_logical, - __entry->result_group, __entry->result_start, - __entry->result_len, __entry->result_logical, - __entry->found, __entry->groups, __entry->cr, - __entry->flags, __entry->tail, - __entry->buddy ? 1 << __entry->buddy : 0) -); - -TRACE_EVENT(ext4_mballoc_prealloc, - TP_PROTO(struct ext4_allocation_context *ac), - - TP_ARGS(ac), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( __u32, orig_logical ) - __field( int, orig_start ) - __field( __u32, orig_group ) - __field( int, orig_len ) - __field( __u32, result_logical ) - __field( int, result_start ) - __field( __u32, result_group ) - __field( int, result_len ) - ), - - TP_fast_assign( - __entry->dev = ac->ac_inode->i_sb->s_dev; - __entry->ino = ac->ac_inode->i_ino; - __entry->orig_logical = ac->ac_o_ex.fe_logical; - __entry->orig_start = ac->ac_o_ex.fe_start; - __entry->orig_group = ac->ac_o_ex.fe_group; - __entry->orig_len = ac->ac_o_ex.fe_len; - __entry->result_logical = ac->ac_b_ex.fe_logical; - __entry->result_start = ac->ac_b_ex.fe_start; - __entry->result_group = ac->ac_b_ex.fe_group; - __entry->result_len = ac->ac_b_ex.fe_len; - ), - - TP_printk("dev %d,%d inode %lu orig %u/%d/%u@%u result %u/%d/%u@%u", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->orig_group, __entry->orig_start, - __entry->orig_len, __entry->orig_logical, - __entry->result_group, __entry->result_start, - __entry->result_len, __entry->result_logical) -); - -DECLARE_EVENT_CLASS(ext4__mballoc, - TP_PROTO(struct super_block *sb, - struct inode *inode, - ext4_group_t group, - ext4_grpblk_t start, - ext4_grpblk_t len), - - TP_ARGS(sb, inode, group, start, len), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( int, result_start ) - __field( __u32, result_group ) - __field( int, result_len ) - ), - - TP_fast_assign( - __entry->dev = sb->s_dev; - __entry->ino = inode ? inode->i_ino : 0; - __entry->result_start = start; - __entry->result_group = group; - __entry->result_len = len; - ), - - TP_printk("dev %d,%d inode %lu extent %u/%d/%d ", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->result_group, __entry->result_start, - __entry->result_len) -); - -DEFINE_EVENT(ext4__mballoc, ext4_mballoc_discard, - - TP_PROTO(struct super_block *sb, - struct inode *inode, - ext4_group_t group, - ext4_grpblk_t start, - ext4_grpblk_t len), - - TP_ARGS(sb, inode, group, start, len) -); - -DEFINE_EVENT(ext4__mballoc, ext4_mballoc_free, - - TP_PROTO(struct super_block *sb, - struct inode *inode, - ext4_group_t group, - ext4_grpblk_t start, - ext4_grpblk_t len), - - TP_ARGS(sb, inode, group, start, len) -); - -TRACE_EVENT(ext4_forget, - TP_PROTO(struct inode *inode, int is_metadata, __u64 block), - - TP_ARGS(inode, is_metadata, block), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( __u64, block ) - __field( int, is_metadata ) - __field( __u16, mode ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->block = block; - __entry->is_metadata = is_metadata; - __entry->mode = inode->i_mode; - ), - - TP_printk("dev %d,%d ino %lu mode 0%o is_metadata %d block %llu", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->mode, __entry->is_metadata, __entry->block) -); - -TRACE_EVENT(ext4_da_update_reserve_space, - TP_PROTO(struct inode *inode, int used_blocks, int quota_claim), - - TP_ARGS(inode, used_blocks, quota_claim), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( __u64, i_blocks ) - __field( int, used_blocks ) - __field( int, reserved_data_blocks ) - __field( int, reserved_meta_blocks ) - __field( int, allocated_meta_blocks ) - __field( int, quota_claim ) - __field( __u16, mode ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->i_blocks = inode->i_blocks; - __entry->used_blocks = used_blocks; - __entry->reserved_data_blocks = - EXT4_I(inode)->i_reserved_data_blocks; - __entry->reserved_meta_blocks = - EXT4_I(inode)->i_reserved_meta_blocks; - __entry->allocated_meta_blocks = - EXT4_I(inode)->i_allocated_meta_blocks; - __entry->quota_claim = quota_claim; - __entry->mode = inode->i_mode; - ), - - TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu used_blocks %d " - "reserved_data_blocks %d reserved_meta_blocks %d " - "allocated_meta_blocks %d quota_claim %d", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->mode, __entry->i_blocks, - __entry->used_blocks, __entry->reserved_data_blocks, - __entry->reserved_meta_blocks, __entry->allocated_meta_blocks, - __entry->quota_claim) -); - -TRACE_EVENT(ext4_da_reserve_space, - TP_PROTO(struct inode *inode, int md_needed), - - TP_ARGS(inode, md_needed), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( __u64, i_blocks ) - __field( int, md_needed ) - __field( int, reserved_data_blocks ) - __field( int, reserved_meta_blocks ) - __field( __u16, mode ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->i_blocks = inode->i_blocks; - __entry->md_needed = md_needed; - __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; - __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; - __entry->mode = inode->i_mode; - ), - - TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu md_needed %d " - "reserved_data_blocks %d reserved_meta_blocks %d", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->mode, __entry->i_blocks, - __entry->md_needed, __entry->reserved_data_blocks, - __entry->reserved_meta_blocks) -); - -TRACE_EVENT(ext4_da_release_space, - TP_PROTO(struct inode *inode, int freed_blocks), - - TP_ARGS(inode, freed_blocks), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( __u64, i_blocks ) - __field( int, freed_blocks ) - __field( int, reserved_data_blocks ) - __field( int, reserved_meta_blocks ) - __field( int, allocated_meta_blocks ) - __field( __u16, mode ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->i_blocks = inode->i_blocks; - __entry->freed_blocks = freed_blocks; - __entry->reserved_data_blocks = EXT4_I(inode)->i_reserved_data_blocks; - __entry->reserved_meta_blocks = EXT4_I(inode)->i_reserved_meta_blocks; - __entry->allocated_meta_blocks = EXT4_I(inode)->i_allocated_meta_blocks; - __entry->mode = inode->i_mode; - ), - - TP_printk("dev %d,%d ino %lu mode 0%o i_blocks %llu freed_blocks %d " - "reserved_data_blocks %d reserved_meta_blocks %d " - "allocated_meta_blocks %d", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->mode, __entry->i_blocks, - __entry->freed_blocks, __entry->reserved_data_blocks, - __entry->reserved_meta_blocks, __entry->allocated_meta_blocks) -); - -DECLARE_EVENT_CLASS(ext4__bitmap_load, - TP_PROTO(struct super_block *sb, unsigned long group), - - TP_ARGS(sb, group), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( __u32, group ) - - ), - - TP_fast_assign( - __entry->dev = sb->s_dev; - __entry->group = group; - ), - - TP_printk("dev %d,%d group %u", - MAJOR(__entry->dev), MINOR(__entry->dev), - __entry->group) -); - -DEFINE_EVENT(ext4__bitmap_load, ext4_mb_bitmap_load, - - TP_PROTO(struct super_block *sb, unsigned long group), - - TP_ARGS(sb, group) -); - -DEFINE_EVENT(ext4__bitmap_load, ext4_mb_buddy_bitmap_load, - - TP_PROTO(struct super_block *sb, unsigned long group), - - TP_ARGS(sb, group) -); - -DEFINE_EVENT(ext4__bitmap_load, ext4_read_block_bitmap_load, - - TP_PROTO(struct super_block *sb, unsigned long group), - - TP_ARGS(sb, group) -); - -DEFINE_EVENT(ext4__bitmap_load, ext4_load_inode_bitmap, - - TP_PROTO(struct super_block *sb, unsigned long group), - - TP_ARGS(sb, group) -); - -TRACE_EVENT(ext4_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( dev_t, dev ) - __field( ino_t, ino ) - __field( loff_t, pos ) - __field( unsigned long, len ) - __field( int, rw ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->pos = offset; - __entry->len = len; - __entry->rw = rw; - ), - - TP_printk("dev %d,%d ino %lu pos %lld len %lu rw %d", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->pos, __entry->len, __entry->rw) -); - -TRACE_EVENT(ext4_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( dev_t, dev ) - __field( ino_t, ino ) - __field( loff_t, pos ) - __field( unsigned long, len ) - __field( int, rw ) - __field( int, ret ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->pos = offset; - __entry->len = len; - __entry->rw = rw; - __entry->ret = ret; - ), - - TP_printk("dev %d,%d ino %lu pos %lld len %lu rw %d ret %d", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->pos, __entry->len, - __entry->rw, __entry->ret) -); - -TRACE_EVENT(ext4_fallocate_enter, - TP_PROTO(struct inode *inode, loff_t offset, loff_t len, int mode), - - TP_ARGS(inode, offset, len, mode), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( loff_t, pos ) - __field( loff_t, len ) - __field( int, mode ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->pos = offset; - __entry->len = len; - __entry->mode = mode; - ), - - TP_printk("dev %d,%d ino %lu pos %lld len %lld mode %d", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, __entry->pos, - __entry->len, __entry->mode) -); - -TRACE_EVENT(ext4_fallocate_exit, - TP_PROTO(struct inode *inode, loff_t offset, - unsigned int max_blocks, int ret), - - TP_ARGS(inode, offset, max_blocks, ret), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( loff_t, pos ) - __field( unsigned int, blocks ) - __field( int, ret ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->pos = offset; - __entry->blocks = max_blocks; - __entry->ret = ret; - ), - - TP_printk("dev %d,%d ino %lu pos %lld blocks %u ret %d", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->pos, __entry->blocks, - __entry->ret) -); - -TRACE_EVENT(ext4_unlink_enter, - TP_PROTO(struct inode *parent, struct dentry *dentry), - - TP_ARGS(parent, dentry), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( ino_t, parent ) - __field( loff_t, size ) - ), - - TP_fast_assign( - __entry->dev = dentry->d_inode->i_sb->s_dev; - __entry->ino = dentry->d_inode->i_ino; - __entry->parent = parent->i_ino; - __entry->size = dentry->d_inode->i_size; - ), - - TP_printk("dev %d,%d ino %lu size %lld parent %lu", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, __entry->size, - (unsigned long) __entry->parent) -); - -TRACE_EVENT(ext4_unlink_exit, - TP_PROTO(struct dentry *dentry, int ret), - - TP_ARGS(dentry, ret), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( int, ret ) - ), - - TP_fast_assign( - __entry->dev = dentry->d_inode->i_sb->s_dev; - __entry->ino = dentry->d_inode->i_ino; - __entry->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(ext4__truncate, - TP_PROTO(struct inode *inode), - - TP_ARGS(inode), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( __u64, blocks ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->blocks = inode->i_blocks; - ), - - TP_printk("dev %d,%d ino %lu blocks %llu", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, __entry->blocks) -); - -DEFINE_EVENT(ext4__truncate, ext4_truncate_enter, - - TP_PROTO(struct inode *inode), - - TP_ARGS(inode) -); - -DEFINE_EVENT(ext4__truncate, ext4_truncate_exit, - - TP_PROTO(struct inode *inode), - - TP_ARGS(inode) -); - -/* 'ux' is the uninitialized extent. */ -TRACE_EVENT(ext4_ext_convert_to_initialized_enter, - TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, - struct ext4_extent *ux), - - TP_ARGS(inode, map, ux), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( ext4_lblk_t, m_lblk ) - __field( unsigned, m_len ) - __field( ext4_lblk_t, u_lblk ) - __field( unsigned, u_len ) - __field( ext4_fsblk_t, u_pblk ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->m_lblk = map->m_lblk; - __entry->m_len = map->m_len; - __entry->u_lblk = le32_to_cpu(ux->ee_block); - __entry->u_len = ext4_ext_get_actual_len(ux); - __entry->u_pblk = ext4_ext_pblock(ux); - ), - - TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u u_lblk %u u_len %u " - "u_pblk %llu", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->m_lblk, __entry->m_len, - __entry->u_lblk, __entry->u_len, __entry->u_pblk) -); - -/* - * 'ux' is the uninitialized extent. - * 'ix' is the initialized extent to which blocks are transferred. - */ -TRACE_EVENT(ext4_ext_convert_to_initialized_fastpath, - TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, - struct ext4_extent *ux, struct ext4_extent *ix), - - TP_ARGS(inode, map, ux, ix), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( ext4_lblk_t, m_lblk ) - __field( unsigned, m_len ) - __field( ext4_lblk_t, u_lblk ) - __field( unsigned, u_len ) - __field( ext4_fsblk_t, u_pblk ) - __field( ext4_lblk_t, i_lblk ) - __field( unsigned, i_len ) - __field( ext4_fsblk_t, i_pblk ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->m_lblk = map->m_lblk; - __entry->m_len = map->m_len; - __entry->u_lblk = le32_to_cpu(ux->ee_block); - __entry->u_len = ext4_ext_get_actual_len(ux); - __entry->u_pblk = ext4_ext_pblock(ux); - __entry->i_lblk = le32_to_cpu(ix->ee_block); - __entry->i_len = ext4_ext_get_actual_len(ix); - __entry->i_pblk = ext4_ext_pblock(ix); - ), - - TP_printk("dev %d,%d ino %lu m_lblk %u m_len %u " - "u_lblk %u u_len %u u_pblk %llu " - "i_lblk %u i_len %u i_pblk %llu ", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->m_lblk, __entry->m_len, - __entry->u_lblk, __entry->u_len, __entry->u_pblk, - __entry->i_lblk, __entry->i_len, __entry->i_pblk) -); - -DECLARE_EVENT_CLASS(ext4__map_blocks_enter, - TP_PROTO(struct inode *inode, ext4_lblk_t lblk, - unsigned int len, unsigned int flags), - - TP_ARGS(inode, lblk, len, flags), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( ext4_lblk_t, lblk ) - __field( unsigned int, len ) - __field( unsigned int, flags ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->lblk = lblk; - __entry->len = len; - __entry->flags = flags; - ), - - TP_printk("dev %d,%d ino %lu lblk %u len %u flags %u", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->lblk, __entry->len, __entry->flags) -); - -DEFINE_EVENT(ext4__map_blocks_enter, ext4_ext_map_blocks_enter, - TP_PROTO(struct inode *inode, ext4_lblk_t lblk, - unsigned len, unsigned flags), - - TP_ARGS(inode, lblk, len, flags) -); - -DEFINE_EVENT(ext4__map_blocks_enter, ext4_ind_map_blocks_enter, - TP_PROTO(struct inode *inode, ext4_lblk_t lblk, - unsigned len, unsigned flags), - - TP_ARGS(inode, lblk, len, flags) -); - -DECLARE_EVENT_CLASS(ext4__map_blocks_exit, - TP_PROTO(struct inode *inode, ext4_lblk_t lblk, - ext4_fsblk_t pblk, unsigned int len, int ret), - - TP_ARGS(inode, lblk, pblk, len, ret), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( ext4_fsblk_t, pblk ) - __field( ext4_lblk_t, lblk ) - __field( unsigned int, len ) - __field( int, ret ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->pblk = pblk; - __entry->lblk = lblk; - __entry->len = len; - __entry->ret = ret; - ), - - TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u ret %d", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->lblk, __entry->pblk, - __entry->len, __entry->ret) -); - -DEFINE_EVENT(ext4__map_blocks_exit, ext4_ext_map_blocks_exit, - TP_PROTO(struct inode *inode, ext4_lblk_t lblk, - ext4_fsblk_t pblk, unsigned len, int ret), - - TP_ARGS(inode, lblk, pblk, len, ret) -); - -DEFINE_EVENT(ext4__map_blocks_exit, ext4_ind_map_blocks_exit, - TP_PROTO(struct inode *inode, ext4_lblk_t lblk, - ext4_fsblk_t pblk, unsigned len, int ret), - - TP_ARGS(inode, lblk, pblk, len, ret) -); - -TRACE_EVENT(ext4_ext_load_extent, - TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk), - - TP_ARGS(inode, lblk, pblk), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( ext4_fsblk_t, pblk ) - __field( ext4_lblk_t, lblk ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->pblk = pblk; - __entry->lblk = lblk; - ), - - TP_printk("dev %d,%d ino %lu lblk %u pblk %llu", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - __entry->lblk, __entry->pblk) -); - -TRACE_EVENT(ext4_load_inode, - TP_PROTO(struct inode *inode), - - TP_ARGS(inode), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - ), - - TP_printk("dev %d,%d ino %ld", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino) -); - -TRACE_EVENT(ext4_journal_start, - TP_PROTO(struct super_block *sb, int nblocks, unsigned long IP), - - TP_ARGS(sb, nblocks, IP), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field(unsigned long, ip ) - __field( int, nblocks ) - ), - - TP_fast_assign( - __entry->dev = sb->s_dev; - __entry->ip = IP; - __entry->nblocks = nblocks; - ), - - TP_printk("dev %d,%d nblocks %d caller %pF", - MAJOR(__entry->dev), MINOR(__entry->dev), - __entry->nblocks, (void *)__entry->ip) -); - -DECLARE_EVENT_CLASS(ext4__trim, - TP_PROTO(struct super_block *sb, - ext4_group_t group, - ext4_grpblk_t start, - ext4_grpblk_t len), - - TP_ARGS(sb, group, start, len), - - TP_STRUCT__entry( - __field( int, dev_major ) - __field( int, dev_minor ) - __field( __u32, group ) - __field( int, start ) - __field( int, len ) - ), - - TP_fast_assign( - __entry->dev_major = MAJOR(sb->s_dev); - __entry->dev_minor = MINOR(sb->s_dev); - __entry->group = group; - __entry->start = start; - __entry->len = len; - ), - - TP_printk("dev %d,%d group %u, start %d, len %d", - __entry->dev_major, __entry->dev_minor, - __entry->group, __entry->start, __entry->len) -); - -DEFINE_EVENT(ext4__trim, ext4_trim_extent, - - TP_PROTO(struct super_block *sb, - ext4_group_t group, - ext4_grpblk_t start, - ext4_grpblk_t len), - - TP_ARGS(sb, group, start, len) -); - -DEFINE_EVENT(ext4__trim, ext4_trim_all_free, - - TP_PROTO(struct super_block *sb, - ext4_group_t group, - ext4_grpblk_t start, - ext4_grpblk_t len), - - TP_ARGS(sb, group, start, len) -); - -TRACE_EVENT(ext4_ext_handle_uninitialized_extents, - TP_PROTO(struct inode *inode, struct ext4_map_blocks *map, - unsigned int allocated, ext4_fsblk_t newblock), - - TP_ARGS(inode, map, allocated, newblock), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( int, flags ) - __field( ext4_lblk_t, lblk ) - __field( ext4_fsblk_t, pblk ) - __field( unsigned int, len ) - __field( unsigned int, allocated ) - __field( ext4_fsblk_t, newblk ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->flags = map->m_flags; - __entry->lblk = map->m_lblk; - __entry->pblk = map->m_pblk; - __entry->len = map->m_len; - __entry->allocated = allocated; - __entry->newblk = newblock; - ), - - TP_printk("dev %d,%d ino %lu m_lblk %u m_pblk %llu m_len %u flags %d" - "allocated %d newblock %llu", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - (unsigned) __entry->lblk, (unsigned long long) __entry->pblk, - __entry->len, __entry->flags, - (unsigned int) __entry->allocated, - (unsigned long long) __entry->newblk) -); - -TRACE_EVENT(ext4_get_implied_cluster_alloc_exit, - TP_PROTO(struct super_block *sb, struct ext4_map_blocks *map, int ret), - - TP_ARGS(sb, map, ret), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( unsigned int, flags ) - __field( ext4_lblk_t, lblk ) - __field( ext4_fsblk_t, pblk ) - __field( unsigned int, len ) - __field( int, ret ) - ), - - TP_fast_assign( - __entry->dev = sb->s_dev; - __entry->flags = map->m_flags; - __entry->lblk = map->m_lblk; - __entry->pblk = map->m_pblk; - __entry->len = map->m_len; - __entry->ret = ret; - ), - - TP_printk("dev %d,%d m_lblk %u m_pblk %llu m_len %u m_flags %u ret %d", - MAJOR(__entry->dev), MINOR(__entry->dev), - __entry->lblk, (unsigned long long) __entry->pblk, - __entry->len, __entry->flags, __entry->ret) -); - -TRACE_EVENT(ext4_ext_put_in_cache, - TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len, - ext4_fsblk_t start), - - TP_ARGS(inode, lblk, len, start), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( ext4_lblk_t, lblk ) - __field( unsigned int, len ) - __field( ext4_fsblk_t, start ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->lblk = lblk; - __entry->len = len; - __entry->start = start; - ), - - TP_printk("dev %d,%d ino %lu lblk %u len %u start %llu", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - (unsigned) __entry->lblk, - __entry->len, - (unsigned long long) __entry->start) -); - -TRACE_EVENT(ext4_ext_in_cache, - TP_PROTO(struct inode *inode, ext4_lblk_t lblk, int ret), - - TP_ARGS(inode, lblk, ret), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( ext4_lblk_t, lblk ) - __field( int, ret ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->lblk = lblk; - __entry->ret = ret; - ), - - TP_printk("dev %d,%d ino %lu lblk %u ret %d", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - (unsigned) __entry->lblk, - __entry->ret) - -); - -TRACE_EVENT(ext4_find_delalloc_range, - TP_PROTO(struct inode *inode, ext4_lblk_t from, ext4_lblk_t to, - int reverse, int found, ext4_lblk_t found_blk), - - TP_ARGS(inode, from, to, reverse, found, found_blk), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( ext4_lblk_t, from ) - __field( ext4_lblk_t, to ) - __field( int, reverse ) - __field( int, found ) - __field( ext4_lblk_t, found_blk ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->from = from; - __entry->to = to; - __entry->reverse = reverse; - __entry->found = found; - __entry->found_blk = found_blk; - ), - - TP_printk("dev %d,%d ino %lu from %u to %u reverse %d found %d " - "(blk = %u)", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - (unsigned) __entry->from, (unsigned) __entry->to, - __entry->reverse, __entry->found, - (unsigned) __entry->found_blk) -); - -TRACE_EVENT(ext4_get_reserved_cluster_alloc, - TP_PROTO(struct inode *inode, ext4_lblk_t lblk, unsigned int len), - - TP_ARGS(inode, lblk, len), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( ext4_lblk_t, lblk ) - __field( unsigned int, len ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->lblk = lblk; - __entry->len = len; - ), - - TP_printk("dev %d,%d ino %lu lblk %u len %u", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - (unsigned) __entry->lblk, - __entry->len) -); - -TRACE_EVENT(ext4_ext_show_extent, - TP_PROTO(struct inode *inode, ext4_lblk_t lblk, ext4_fsblk_t pblk, - unsigned short len), - - TP_ARGS(inode, lblk, pblk, len), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( ext4_fsblk_t, pblk ) - __field( ext4_lblk_t, lblk ) - __field( unsigned short, len ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->pblk = pblk; - __entry->lblk = lblk; - __entry->len = len; - ), - - TP_printk("dev %d,%d ino %lu lblk %u pblk %llu len %u", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - (unsigned) __entry->lblk, - (unsigned long long) __entry->pblk, - (unsigned short) __entry->len) -); - -TRACE_EVENT(ext4_remove_blocks, - TP_PROTO(struct inode *inode, struct ext4_extent *ex, - ext4_lblk_t from, ext4_fsblk_t to, - ext4_fsblk_t partial_cluster), - - TP_ARGS(inode, ex, from, to, partial_cluster), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( ext4_lblk_t, from ) - __field( ext4_lblk_t, to ) - __field( ext4_fsblk_t, partial ) - __field( ext4_fsblk_t, ee_pblk ) - __field( ext4_lblk_t, ee_lblk ) - __field( unsigned short, ee_len ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->from = from; - __entry->to = to; - __entry->partial = partial_cluster; - __entry->ee_pblk = ext4_ext_pblock(ex); - __entry->ee_lblk = cpu_to_le32(ex->ee_block); - __entry->ee_len = ext4_ext_get_actual_len(ex); - ), - - TP_printk("dev %d,%d ino %lu extent [%u(%llu), %u]" - "from %u to %u partial_cluster %u", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - (unsigned) __entry->ee_lblk, - (unsigned long long) __entry->ee_pblk, - (unsigned short) __entry->ee_len, - (unsigned) __entry->from, - (unsigned) __entry->to, - (unsigned) __entry->partial) -); - -TRACE_EVENT(ext4_ext_rm_leaf, - TP_PROTO(struct inode *inode, ext4_lblk_t start, - struct ext4_extent *ex, ext4_fsblk_t partial_cluster), - - TP_ARGS(inode, start, ex, partial_cluster), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( ext4_fsblk_t, partial ) - __field( ext4_lblk_t, start ) - __field( ext4_lblk_t, ee_lblk ) - __field( ext4_fsblk_t, ee_pblk ) - __field( short, ee_len ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->partial = partial_cluster; - __entry->start = start; - __entry->ee_lblk = le32_to_cpu(ex->ee_block); - __entry->ee_pblk = ext4_ext_pblock(ex); - __entry->ee_len = ext4_ext_get_actual_len(ex); - ), - - TP_printk("dev %d,%d ino %lu start_lblk %u last_extent [%u(%llu), %u]" - "partial_cluster %u", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - (unsigned) __entry->start, - (unsigned) __entry->ee_lblk, - (unsigned long long) __entry->ee_pblk, - (unsigned short) __entry->ee_len, - (unsigned) __entry->partial) -); - -TRACE_EVENT(ext4_ext_rm_idx, - TP_PROTO(struct inode *inode, ext4_fsblk_t pblk), - - TP_ARGS(inode, pblk), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( ext4_fsblk_t, pblk ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->pblk = pblk; - ), - - TP_printk("dev %d,%d ino %lu index_pblk %llu", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - (unsigned long long) __entry->pblk) -); - -TRACE_EVENT(ext4_ext_remove_space, - TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth), - - TP_ARGS(inode, start, depth), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( ext4_lblk_t, start ) - __field( int, depth ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->start = start; - __entry->depth = depth; - ), - - TP_printk("dev %d,%d ino %lu since %u depth %d", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - (unsigned) __entry->start, - __entry->depth) -); - -TRACE_EVENT(ext4_ext_remove_space_done, - TP_PROTO(struct inode *inode, ext4_lblk_t start, int depth, - ext4_lblk_t partial, unsigned short eh_entries), - - TP_ARGS(inode, start, depth, partial, eh_entries), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( ino_t, ino ) - __field( ext4_lblk_t, start ) - __field( int, depth ) - __field( ext4_lblk_t, partial ) - __field( unsigned short, eh_entries ) - ), - - TP_fast_assign( - __entry->dev = inode->i_sb->s_dev; - __entry->ino = inode->i_ino; - __entry->start = start; - __entry->depth = depth; - __entry->partial = partial; - __entry->eh_entries = eh_entries; - ), - - TP_printk("dev %d,%d ino %lu since %u depth %d partial %u " - "remaining_entries %u", - MAJOR(__entry->dev), MINOR(__entry->dev), - (unsigned long) __entry->ino, - (unsigned) __entry->start, - __entry->depth, - (unsigned) __entry->partial, - (unsigned short) __entry->eh_entries) -); - -#endif /* _TRACE_EXT4_H */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/gpio.h b/instrumentation/events/mainline/gpio.h deleted file mode 100644 index 927a8ad9..00000000 --- a/instrumentation/events/mainline/gpio.h +++ /dev/null @@ -1,56 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM gpio - -#if !defined(_TRACE_GPIO_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_GPIO_H - -#include - -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( - __entry->gpio = gpio; - __entry->in = in; - __entry->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( - __entry->gpio = gpio; - __entry->get = get; - __entry->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 diff --git a/instrumentation/events/mainline/irq.h b/instrumentation/events/mainline/irq.h deleted file mode 100644 index 1c09820d..00000000 --- a/instrumentation/events/mainline/irq.h +++ /dev/null @@ -1,150 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM irq - -#if !defined(_TRACE_IRQ_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_IRQ_H - -#include - -struct irqaction; -struct softirq_action; - -#define softirq_name(sirq) { sirq##_SOFTIRQ, #sirq } -#define show_softirq_name(val) \ - __print_symbolic(val, \ - softirq_name(HI), \ - softirq_name(TIMER), \ - softirq_name(NET_TX), \ - softirq_name(NET_RX), \ - softirq_name(BLOCK), \ - softirq_name(BLOCK_IOPOLL), \ - softirq_name(TASKLET), \ - softirq_name(SCHED), \ - softirq_name(HRTIMER), \ - softirq_name(RCU)) - -/** - * irq_handler_entry - called immediately before the irq action handler - * @irq: irq number - * @action: pointer to struct irqaction - * - * The struct irqaction pointed to by @action contains various - * information about the handler, including the device name, - * @action->name, and the device id, @action->dev_id. When used in - * conjunction with the irq_handler_exit tracepoint, we can figure - * out irq handler latencies. - */ -TRACE_EVENT(irq_handler_entry, - - TP_PROTO(int irq, struct irqaction *action), - - TP_ARGS(irq, action), - - TP_STRUCT__entry( - __field( int, irq ) - __string( name, action->name ) - ), - - TP_fast_assign( - __entry->irq = irq; - __assign_str(name, action->name); - ), - - TP_printk("irq=%d name=%s", __entry->irq, __get_str(name)) -); - -/** - * irq_handler_exit - called immediately after the irq action handler returns - * @irq: irq number - * @action: pointer to struct irqaction - * @ret: return value - * - * If the @ret value is set to IRQ_HANDLED, then we know that the corresponding - * @action->handler scuccessully handled this irq. Otherwise, the irq might be - * a shared irq line, or the irq was not handled successfully. Can be used in - * conjunction with the irq_handler_entry to understand irq handler latencies. - */ -TRACE_EVENT(irq_handler_exit, - - TP_PROTO(int irq, struct irqaction *action, int ret), - - TP_ARGS(irq, action, ret), - - TP_STRUCT__entry( - __field( int, irq ) - __field( int, ret ) - ), - - TP_fast_assign( - __entry->irq = irq; - __entry->ret = ret; - ), - - TP_printk("irq=%d ret=%s", - __entry->irq, __entry->ret ? "handled" : "unhandled") -); - -DECLARE_EVENT_CLASS(softirq, - - TP_PROTO(unsigned int vec_nr), - - TP_ARGS(vec_nr), - - TP_STRUCT__entry( - __field( unsigned int, vec ) - ), - - TP_fast_assign( - __entry->vec = vec_nr; - ), - - TP_printk("vec=%u [action=%s]", __entry->vec, - show_softirq_name(__entry->vec)) -); - -/** - * softirq_entry - called immediately before the softirq handler - * @vec_nr: softirq vector number - * - * When used in combination with the softirq_exit tracepoint - * we can determine the softirq handler runtine. - */ -DEFINE_EVENT(softirq, softirq_entry, - - TP_PROTO(unsigned int vec_nr), - - TP_ARGS(vec_nr) -); - -/** - * softirq_exit - called immediately after the softirq handler returns - * @vec_nr: softirq vector number - * - * When used in combination with the softirq_entry tracepoint - * we can determine the softirq handler runtine. - */ -DEFINE_EVENT(softirq, softirq_exit, - - TP_PROTO(unsigned int vec_nr), - - TP_ARGS(vec_nr) -); - -/** - * softirq_raise - called immediately when a softirq is raised - * @vec_nr: softirq vector number - * - * When used in combination with the softirq_entry tracepoint - * we can determine the softirq raise to run latency. - */ -DEFINE_EVENT(softirq, softirq_raise, - - TP_PROTO(unsigned int vec_nr), - - TP_ARGS(vec_nr) -); - -#endif /* _TRACE_IRQ_H */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/jbd.h b/instrumentation/events/mainline/jbd.h deleted file mode 100644 index da6f2591..00000000 --- a/instrumentation/events/mainline/jbd.h +++ /dev/null @@ -1,194 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM jbd - -#if !defined(_TRACE_JBD_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_JBD_H - -#include -#include - -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( - __entry->dev = journal->j_fs_dev->bd_dev; - __entry->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 ) - __field( int, transaction ) - ), - - TP_fast_assign( - __entry->dev = journal->j_fs_dev->bd_dev; - __entry->transaction = commit_transaction->t_tid; - ), - - TP_printk("dev %d,%d transaction %d", - MAJOR(__entry->dev), MINOR(__entry->dev), - __entry->transaction) -); - -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 ) - __field( int, transaction ) - ), - - TP_fast_assign( - __entry->dev = journal->j_fs_dev->bd_dev; - __entry->transaction = commit_transaction->t_tid; - ), - - TP_printk("dev %d,%d transaction %d", - MAJOR(__entry->dev), MINOR(__entry->dev), - __entry->transaction) -); - -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 ) - __field( int, transaction ) - __field( int, head ) - ), - - TP_fast_assign( - __entry->dev = journal->j_fs_dev->bd_dev; - __entry->transaction = commit_transaction->t_tid; - __entry->head = journal->j_tail_sequence; - ), - - TP_printk("dev %d,%d transaction %d head %d", - MAJOR(__entry->dev), MINOR(__entry->dev), - __entry->transaction, __entry->head) -); - -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 ) - __field( int, transaction ) - ), - - TP_fast_assign( - __entry->dev = journal->j_fs_dev->bd_dev; - __entry->transaction = commit_transaction->t_tid; - ), - - TP_printk("dev %d,%d transaction %d", - MAJOR(__entry->dev), MINOR(__entry->dev), - __entry->transaction) -); - -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( - __entry->dev = journal->j_fs_dev->bd_dev; - __entry->tail_sequence = journal->j_tail_sequence; - __entry->first_tid = first_tid; - __entry->block_nr = block_nr; - __entry->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(journal_write_superblock, - TP_PROTO(journal_t *journal, int write_op), - - TP_ARGS(journal, write_op), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( int, write_op ) - ), - - TP_fast_assign( - __entry->dev = journal->j_fs_dev->bd_dev; - __entry->write_op = write_op; - ), - - TP_printk("dev %d,%d write_op %x", MAJOR(__entry->dev), - MINOR(__entry->dev), __entry->write_op) -); - -#endif /* _TRACE_JBD_H */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/jbd2.h b/instrumentation/events/mainline/jbd2.h deleted file mode 100644 index 127993db..00000000 --- a/instrumentation/events/mainline/jbd2.h +++ /dev/null @@ -1,262 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM jbd2 - -#if !defined(_TRACE_JBD2_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_JBD2_H - -#include -#include - -struct transaction_chp_stats_s; -struct transaction_run_stats_s; - -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( - __entry->dev = journal->j_fs_dev->bd_dev; - __entry->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( - __entry->dev = journal->j_fs_dev->bd_dev; - __entry->sync_commit = commit_transaction->t_synchronous_commit; - __entry->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) -); - -DEFINE_EVENT(jbd2_commit, jbd2_drop_transaction, - - 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( - __entry->dev = journal->j_fs_dev->bd_dev; - __entry->sync_commit = commit_transaction->t_synchronous_commit; - __entry->transaction = commit_transaction->t_tid; - __entry->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( - __entry->dev = inode->i_sb->s_dev; - __entry->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( - __entry->dev = dev; - __entry->tid = tid; - __entry->wait = stats->rs_wait; - __entry->running = stats->rs_running; - __entry->locked = stats->rs_locked; - __entry->flushing = stats->rs_flushing; - __entry->logging = stats->rs_logging; - __entry->handle_count = stats->rs_handle_count; - __entry->blocks = stats->rs_blocks; - __entry->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( - __entry->dev = dev; - __entry->tid = tid; - __entry->chp_time = stats->cs_chp_time; - __entry->forced_to_close= stats->cs_forced_to_close; - __entry->written = stats->cs_written; - __entry->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_update_log_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( - __entry->dev = journal->j_fs_dev->bd_dev; - __entry->tail_sequence = journal->j_tail_sequence; - __entry->first_tid = first_tid; - __entry->block_nr = block_nr; - __entry->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(jbd2_write_superblock, - - TP_PROTO(journal_t *journal, int write_op), - - TP_ARGS(journal, write_op), - - TP_STRUCT__entry( - __field( dev_t, dev ) - __field( int, write_op ) - ), - - TP_fast_assign( - __entry->dev = journal->j_fs_dev->bd_dev; - __entry->write_op = write_op; - ), - - TP_printk("dev %d,%d write_op %x", MAJOR(__entry->dev), - MINOR(__entry->dev), __entry->write_op) -); - -#endif /* _TRACE_JBD2_H */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/kmem.h b/instrumentation/events/mainline/kmem.h deleted file mode 100644 index 6bc943ec..00000000 --- a/instrumentation/events/mainline/kmem.h +++ /dev/null @@ -1,308 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM kmem - -#if !defined(_TRACE_KMEM_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_KMEM_H - -#include -#include -#include - -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( - __entry->call_site = call_site; - __entry->ptr = ptr; - __entry->bytes_req = bytes_req; - __entry->bytes_alloc = bytes_alloc; - __entry->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( - __entry->call_site = call_site; - __entry->ptr = ptr; - __entry->bytes_req = bytes_req; - __entry->bytes_alloc = bytes_alloc; - __entry->gfp_flags = gfp_flags; - __entry->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( - __entry->call_site = call_site; - __entry->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, - - 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( - __entry->page = page; - __entry->order = order; - ), - - TP_printk("page=%p pfn=%lu order=%d", - __entry->page, - page_to_pfn(__entry->page), - __entry->order) -); - -TRACE_EVENT(mm_page_free_batched, - - TP_PROTO(struct page *page, int cold), - - TP_ARGS(page, cold), - - TP_STRUCT__entry( - __field( struct page *, page ) - __field( int, cold ) - ), - - TP_fast_assign( - __entry->page = page; - __entry->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( - __entry->page = page; - __entry->order = order; - __entry->gfp_flags = gfp_flags; - __entry->migratetype = migratetype; - ), - - TP_printk("page=%p pfn=%lu order=%d migratetype=%d gfp_flags=%s", - __entry->page, - __entry->page ? page_to_pfn(__entry->page) : 0, - __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( - __entry->page = page; - __entry->order = order; - __entry->migratetype = migratetype; - ), - - TP_printk("page=%p pfn=%lu order=%u migratetype=%d percpu_refill=%d", - __entry->page, - __entry->page ? page_to_pfn(__entry->page) : 0, - __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( - __entry->page = page; - __entry->alloc_order = alloc_order; - __entry->fallback_order = fallback_order; - __entry->alloc_migratetype = alloc_migratetype; - __entry->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 diff --git a/instrumentation/events/mainline/kvm.h b/instrumentation/events/mainline/kvm.h deleted file mode 100644 index 46e3cd8e..00000000 --- a/instrumentation/events/mainline/kvm.h +++ /dev/null @@ -1,312 +0,0 @@ -#if !defined(_TRACE_KVM_MAIN_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_KVM_MAIN_H - -#include - -#undef TRACE_SYSTEM -#define TRACE_SYSTEM kvm - -#define ERSN(x) { KVM_EXIT_##x, "KVM_EXIT_" #x } - -#define kvm_trace_exit_reason \ - ERSN(UNKNOWN), ERSN(EXCEPTION), ERSN(IO), ERSN(HYPERCALL), \ - ERSN(DEBUG), ERSN(HLT), ERSN(MMIO), ERSN(IRQ_WINDOW_OPEN), \ - ERSN(SHUTDOWN), ERSN(FAIL_ENTRY), ERSN(INTR), ERSN(SET_TPR), \ - ERSN(TPR_ACCESS), ERSN(S390_SIEIC), ERSN(S390_RESET), ERSN(DCR),\ - ERSN(NMI), ERSN(INTERNAL_ERROR), ERSN(OSI) - -TRACE_EVENT(kvm_userspace_exit, - TP_PROTO(__u32 reason, int errno), - TP_ARGS(reason, errno), - - TP_STRUCT__entry( - __field( __u32, reason ) - __field( int, errno ) - ), - - TP_fast_assign( - __entry->reason = reason; - __entry->errno = errno; - ), - - TP_printk("reason %s (%d)", - __entry->errno < 0 ? - (__entry->errno == -EINTR ? "restart" : "error") : - __print_symbolic(__entry->reason, kvm_trace_exit_reason), - __entry->errno < 0 ? -__entry->errno : __entry->reason) -); - -#if defined(__KVM_HAVE_IOAPIC) -TRACE_EVENT(kvm_set_irq, - TP_PROTO(unsigned int gsi, int level, int irq_source_id), - TP_ARGS(gsi, level, irq_source_id), - - TP_STRUCT__entry( - __field( unsigned int, gsi ) - __field( int, level ) - __field( int, irq_source_id ) - ), - - TP_fast_assign( - __entry->gsi = gsi; - __entry->level = level; - __entry->irq_source_id = irq_source_id; - ), - - TP_printk("gsi %u level %d source %d", - __entry->gsi, __entry->level, __entry->irq_source_id) -); - -#define kvm_deliver_mode \ - {0x0, "Fixed"}, \ - {0x1, "LowPrio"}, \ - {0x2, "SMI"}, \ - {0x3, "Res3"}, \ - {0x4, "NMI"}, \ - {0x5, "INIT"}, \ - {0x6, "SIPI"}, \ - {0x7, "ExtINT"} - -TRACE_EVENT(kvm_ioapic_set_irq, - TP_PROTO(__u64 e, int pin, bool coalesced), - TP_ARGS(e, pin, coalesced), - - TP_STRUCT__entry( - __field( __u64, e ) - __field( int, pin ) - __field( bool, coalesced ) - ), - - TP_fast_assign( - __entry->e = e; - __entry->pin = pin; - __entry->coalesced = coalesced; - ), - - TP_printk("pin %u dst %x vec=%u (%s|%s|%s%s)%s", - __entry->pin, (u8)(__entry->e >> 56), (u8)__entry->e, - __print_symbolic((__entry->e >> 8 & 0x7), kvm_deliver_mode), - (__entry->e & (1<<11)) ? "logical" : "physical", - (__entry->e & (1<<15)) ? "level" : "edge", - (__entry->e & (1<<16)) ? "|masked" : "", - __entry->coalesced ? " (coalesced)" : "") -); - -TRACE_EVENT(kvm_msi_set_irq, - TP_PROTO(__u64 address, __u64 data), - TP_ARGS(address, data), - - TP_STRUCT__entry( - __field( __u64, address ) - __field( __u64, data ) - ), - - TP_fast_assign( - __entry->address = address; - __entry->data = data; - ), - - TP_printk("dst %u vec %x (%s|%s|%s%s)", - (u8)(__entry->address >> 12), (u8)__entry->data, - __print_symbolic((__entry->data >> 8 & 0x7), kvm_deliver_mode), - (__entry->address & (1<<2)) ? "logical" : "physical", - (__entry->data & (1<<15)) ? "level" : "edge", - (__entry->address & (1<<3)) ? "|rh" : "") -); - -#define kvm_irqchips \ - {KVM_IRQCHIP_PIC_MASTER, "PIC master"}, \ - {KVM_IRQCHIP_PIC_SLAVE, "PIC slave"}, \ - {KVM_IRQCHIP_IOAPIC, "IOAPIC"} - -TRACE_EVENT(kvm_ack_irq, - TP_PROTO(unsigned int irqchip, unsigned int pin), - TP_ARGS(irqchip, pin), - - TP_STRUCT__entry( - __field( unsigned int, irqchip ) - __field( unsigned int, pin ) - ), - - TP_fast_assign( - __entry->irqchip = irqchip; - __entry->pin = pin; - ), - - TP_printk("irqchip %s pin %u", - __print_symbolic(__entry->irqchip, kvm_irqchips), - __entry->pin) -); - - - -#endif /* defined(__KVM_HAVE_IOAPIC) */ - -#define KVM_TRACE_MMIO_READ_UNSATISFIED 0 -#define KVM_TRACE_MMIO_READ 1 -#define KVM_TRACE_MMIO_WRITE 2 - -#define kvm_trace_symbol_mmio \ - { KVM_TRACE_MMIO_READ_UNSATISFIED, "unsatisfied-read" }, \ - { KVM_TRACE_MMIO_READ, "read" }, \ - { KVM_TRACE_MMIO_WRITE, "write" } - -TRACE_EVENT(kvm_mmio, - TP_PROTO(int type, int len, u64 gpa, u64 val), - TP_ARGS(type, len, gpa, val), - - TP_STRUCT__entry( - __field( u32, type ) - __field( u32, len ) - __field( u64, gpa ) - __field( u64, val ) - ), - - TP_fast_assign( - __entry->type = type; - __entry->len = len; - __entry->gpa = gpa; - __entry->val = val; - ), - - TP_printk("mmio %s len %u gpa 0x%llx val 0x%llx", - __print_symbolic(__entry->type, kvm_trace_symbol_mmio), - __entry->len, __entry->gpa, __entry->val) -); - -#define kvm_fpu_load_symbol \ - {0, "unload"}, \ - {1, "load"} - -TRACE_EVENT(kvm_fpu, - TP_PROTO(int load), - TP_ARGS(load), - - TP_STRUCT__entry( - __field( u32, load ) - ), - - TP_fast_assign( - __entry->load = load; - ), - - TP_printk("%s", __print_symbolic(__entry->load, kvm_fpu_load_symbol)) -); - -TRACE_EVENT(kvm_age_page, - TP_PROTO(ulong hva, struct kvm_memory_slot *slot, int ref), - TP_ARGS(hva, slot, ref), - - TP_STRUCT__entry( - __field( u64, hva ) - __field( u64, gfn ) - __field( u8, referenced ) - ), - - TP_fast_assign( - __entry->hva = hva; - __entry->gfn = - slot->base_gfn + ((hva - slot->userspace_addr) >> PAGE_SHIFT); - __entry->referenced = ref; - ), - - TP_printk("hva %llx gfn %llx %s", - __entry->hva, __entry->gfn, - __entry->referenced ? "YOUNG" : "OLD") -); - -#ifdef CONFIG_KVM_ASYNC_PF -DECLARE_EVENT_CLASS(kvm_async_get_page_class, - - TP_PROTO(u64 gva, u64 gfn), - - TP_ARGS(gva, gfn), - - TP_STRUCT__entry( - __field(__u64, gva) - __field(u64, gfn) - ), - - TP_fast_assign( - __entry->gva = gva; - __entry->gfn = gfn; - ), - - TP_printk("gva = %#llx, gfn = %#llx", __entry->gva, __entry->gfn) -); - -DEFINE_EVENT(kvm_async_get_page_class, kvm_try_async_get_page, - - TP_PROTO(u64 gva, u64 gfn), - - TP_ARGS(gva, gfn) -); - -DEFINE_EVENT(kvm_async_get_page_class, kvm_async_pf_doublefault, - - TP_PROTO(u64 gva, u64 gfn), - - TP_ARGS(gva, gfn) -); - -DECLARE_EVENT_CLASS(kvm_async_pf_nopresent_ready, - - TP_PROTO(u64 token, u64 gva), - - TP_ARGS(token, gva), - - TP_STRUCT__entry( - __field(__u64, token) - __field(__u64, gva) - ), - - TP_fast_assign( - __entry->token = token; - __entry->gva = gva; - ), - - TP_printk("token %#llx gva %#llx", __entry->token, __entry->gva) - -); - -DEFINE_EVENT(kvm_async_pf_nopresent_ready, kvm_async_pf_not_present, - - TP_PROTO(u64 token, u64 gva), - - TP_ARGS(token, gva) -); - -DEFINE_EVENT(kvm_async_pf_nopresent_ready, kvm_async_pf_ready, - - TP_PROTO(u64 token, u64 gva), - - TP_ARGS(token, gva) -); - -TRACE_EVENT( - kvm_async_pf_completed, - TP_PROTO(unsigned long address, struct page *page, u64 gva), - TP_ARGS(address, page, gva), - - TP_STRUCT__entry( - __field(unsigned long, address) - __field(pfn_t, pfn) - __field(u64, gva) - ), - - TP_fast_assign( - __entry->address = address; - __entry->pfn = page ? page_to_pfn(page) : 0; - __entry->gva = gva; - ), - - TP_printk("gva %#llx address %#lx pfn %#llx", __entry->gva, - __entry->address, __entry->pfn) -); - -#endif - -#endif /* _TRACE_KVM_MAIN_H */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/lock.h b/instrumentation/events/mainline/lock.h deleted file mode 100644 index 2821b86d..00000000 --- a/instrumentation/events/mainline/lock.h +++ /dev/null @@ -1,86 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM lock - -#if !defined(_TRACE_LOCK_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_LOCK_H - -#include -#include - -#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( - __entry->flags = (trylock ? 1 : 0) | (read ? 2 : 0); - __assign_str(name, lock->name); - __entry->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( - __assign_str(name, lock->name); - __entry->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 diff --git a/instrumentation/events/mainline/module.h b/instrumentation/events/mainline/module.h deleted file mode 100644 index 21a546d2..00000000 --- a/instrumentation/events/mainline/module.h +++ /dev/null @@ -1,131 +0,0 @@ -/* - * 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 - -#ifdef CONFIG_MODULES - -struct module; - -#define show_module_flags(flags) __print_flags(flags, "", \ - { (1UL << TAINT_PROPRIETARY_MODULE), "P" }, \ - { (1UL << TAINT_FORCED_MODULE), "F" }, \ - { (1UL << TAINT_CRAP), "C" }) - -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( - __entry->taints = mod->taints; - __assign_str(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( - __assign_str(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( - __entry->ip = ip; - __entry->refcnt = __this_cpu_read(mod->refptr->incs) + __this_cpu_read(mod->refptr->decs); - __assign_str(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( - __entry->ip = ip; - __entry->wait = wait; - __assign_str(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 diff --git a/instrumentation/events/mainline/napi.h b/instrumentation/events/mainline/napi.h deleted file mode 100644 index 8fe1e93f..00000000 --- a/instrumentation/events/mainline/napi.h +++ /dev/null @@ -1,38 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM napi - -#if !defined(_TRACE_NAPI_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_NAPI_H_ - -#include -#include -#include - -#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( - __entry->napi = napi; - __assign_str(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 diff --git a/instrumentation/events/mainline/net.h b/instrumentation/events/mainline/net.h deleted file mode 100644 index f99645d0..00000000 --- a/instrumentation/events/mainline/net.h +++ /dev/null @@ -1,84 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM net - -#if !defined(_TRACE_NET_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_NET_H - -#include -#include -#include -#include - -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( - __entry->skbaddr = skb; - __entry->len = skb_len; - __entry->rc = rc; - __assign_str(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( - __entry->skbaddr = skb; - __entry->len = skb->len; - __assign_str(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 diff --git a/instrumentation/events/mainline/power.h b/instrumentation/events/mainline/power.h deleted file mode 100644 index 0c978384..00000000 --- a/instrumentation/events/mainline/power.h +++ /dev/null @@ -1,275 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM power - -#if !defined(_TRACE_POWER_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_POWER_H - -#include -#include - -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( - __entry->state = state; - __entry->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( - __entry->state = state; - ), - - TP_printk("state=%lu", (unsigned long)__entry->state) -); - -DECLARE_EVENT_CLASS(wakeup_source, - - TP_PROTO(const char *name, unsigned int state), - - TP_ARGS(name, state), - - TP_STRUCT__entry( - __string( name, name ) - __field( u64, state ) - ), - - TP_fast_assign( - __assign_str(name, name); - __entry->state = state; - ), - - TP_printk("%s state=0x%lx", __get_str(name), - (unsigned long)__entry->state) -); - -DEFINE_EVENT(wakeup_source, wakeup_source_activate, - - TP_PROTO(const char *name, unsigned int state), - - TP_ARGS(name, state) -); - -DEFINE_EVENT(wakeup_source, wakeup_source_deactivate, - - TP_PROTO(const char *name, unsigned int state), - - TP_ARGS(name, state) -); - -#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( - __entry->type = type; - __entry->state = state; - __entry->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( - __entry->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_start_rcuidle(u64 type, u64 state, u64 cpuid) {}; -static inline void trace_power_end_rcuidle(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( - __assign_str(name, name); - __entry->state = state; - __entry->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( - __assign_str(name, name); - __entry->state = state; - __entry->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 diff --git a/instrumentation/events/mainline/printk.h b/instrumentation/events/mainline/printk.h deleted file mode 100644 index 94ec79cc..00000000 --- a/instrumentation/events/mainline/printk.h +++ /dev/null @@ -1,41 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM printk - -#if !defined(_TRACE_PRINTK_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_PRINTK_H - -#include - -TRACE_EVENT_CONDITION(console, - TP_PROTO(const char *log_buf, unsigned start, unsigned end, - unsigned log_buf_len), - - TP_ARGS(log_buf, start, end, log_buf_len), - - TP_CONDITION(start != end), - - TP_STRUCT__entry( - __dynamic_array(char, msg, end - start + 1) - ), - - TP_fast_assign( - if ((start & (log_buf_len - 1)) > (end & (log_buf_len - 1))) { - memcpy(__get_dynamic_array(msg), - log_buf + (start & (log_buf_len - 1)), - log_buf_len - (start & (log_buf_len - 1))); - memcpy((char *)__get_dynamic_array(msg) + - log_buf_len - (start & (log_buf_len - 1)), - log_buf, end & (log_buf_len - 1)); - } else - memcpy(__get_dynamic_array(msg), - log_buf + (start & (log_buf_len - 1)), - end - start); - ((char *)__get_dynamic_array(msg))[end - start] = 0; - ), - - TP_printk("%s", __get_str(msg)) -); -#endif /* _TRACE_PRINTK_H */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/random.h b/instrumentation/events/mainline/random.h deleted file mode 100644 index 422df19d..00000000 --- a/instrumentation/events/mainline/random.h +++ /dev/null @@ -1,134 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM random - -#if !defined(_TRACE_RANDOM_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_RANDOM_H - -#include -#include - -DECLARE_EVENT_CLASS(random__mix_pool_bytes, - TP_PROTO(const char *pool_name, int bytes, unsigned long IP), - - TP_ARGS(pool_name, bytes, IP), - - TP_STRUCT__entry( - __field( const char *, pool_name ) - __field( int, bytes ) - __field(unsigned long, IP ) - ), - - TP_fast_assign( - __entry->pool_name = pool_name; - __entry->bytes = bytes; - __entry->IP = IP; - ), - - TP_printk("%s pool: bytes %d caller %pF", - __entry->pool_name, __entry->bytes, (void *)__entry->IP) -); - -DEFINE_EVENT(random__mix_pool_bytes, mix_pool_bytes, - TP_PROTO(const char *pool_name, int bytes, unsigned long IP), - - TP_ARGS(pool_name, bytes, IP) -); - -DEFINE_EVENT(random__mix_pool_bytes, mix_pool_bytes_nolock, - TP_PROTO(const char *pool_name, int bytes, unsigned long IP), - - TP_ARGS(pool_name, bytes, IP) -); - -TRACE_EVENT(credit_entropy_bits, - TP_PROTO(const char *pool_name, int bits, int entropy_count, - int entropy_total, unsigned long IP), - - TP_ARGS(pool_name, bits, entropy_count, entropy_total, IP), - - TP_STRUCT__entry( - __field( const char *, pool_name ) - __field( int, bits ) - __field( int, entropy_count ) - __field( int, entropy_total ) - __field(unsigned long, IP ) - ), - - TP_fast_assign( - __entry->pool_name = pool_name; - __entry->bits = bits; - __entry->entropy_count = entropy_count; - __entry->entropy_total = entropy_total; - __entry->IP = IP; - ), - - TP_printk("%s pool: bits %d entropy_count %d entropy_total %d " - "caller %pF", __entry->pool_name, __entry->bits, - __entry->entropy_count, __entry->entropy_total, - (void *)__entry->IP) -); - -TRACE_EVENT(get_random_bytes, - TP_PROTO(int nbytes, unsigned long IP), - - TP_ARGS(nbytes, IP), - - TP_STRUCT__entry( - __field( int, nbytes ) - __field(unsigned long, IP ) - ), - - TP_fast_assign( - __entry->nbytes = nbytes; - __entry->IP = IP; - ), - - TP_printk("nbytes %d caller %pF", __entry->nbytes, (void *)__entry->IP) -); - -DECLARE_EVENT_CLASS(random__extract_entropy, - TP_PROTO(const char *pool_name, int nbytes, int entropy_count, - unsigned long IP), - - TP_ARGS(pool_name, nbytes, entropy_count, IP), - - TP_STRUCT__entry( - __field( const char *, pool_name ) - __field( int, nbytes ) - __field( int, entropy_count ) - __field(unsigned long, IP ) - ), - - TP_fast_assign( - __entry->pool_name = pool_name; - __entry->nbytes = nbytes; - __entry->entropy_count = entropy_count; - __entry->IP = IP; - ), - - TP_printk("%s pool: nbytes %d entropy_count %d caller %pF", - __entry->pool_name, __entry->nbytes, __entry->entropy_count, - (void *)__entry->IP) -); - - -DEFINE_EVENT(random__extract_entropy, extract_entropy, - TP_PROTO(const char *pool_name, int nbytes, int entropy_count, - unsigned long IP), - - TP_ARGS(pool_name, nbytes, entropy_count, IP) -); - -DEFINE_EVENT(random__extract_entropy, extract_entropy_user, - TP_PROTO(const char *pool_name, int nbytes, int entropy_count, - unsigned long IP), - - TP_ARGS(pool_name, nbytes, entropy_count, IP) -); - - - -#endif /* _TRACE_RANDOM_H */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/rcu.h b/instrumentation/events/mainline/rcu.h deleted file mode 100644 index 5bde94d8..00000000 --- a/instrumentation/events/mainline/rcu.h +++ /dev/null @@ -1,618 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM rcu - -#if !defined(_TRACE_RCU_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_RCU_H - -#include - -/* - * Tracepoint for start/end markers used for utilization calculations. - * By convention, the string is of the following forms: - * - * "Start " -- Mark the start of the specified activity, - * such as "context switch". Nesting is permitted. - * "End " -- Mark the end of the specified activity. - * - * An "@" character within "" is a comment character: Data - * reduction scripts will ignore the "@" and the remainder of the line. - */ -TRACE_EVENT(rcu_utilization, - - TP_PROTO(char *s), - - TP_ARGS(s), - - TP_STRUCT__entry( - __field(char *, s) - ), - - TP_fast_assign( - __entry->s = s; - ), - - TP_printk("%s", __entry->s) -); - -#ifdef CONFIG_RCU_TRACE - -#if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) - -/* - * Tracepoint for grace-period events: starting and ending a grace - * period ("start" and "end", respectively), a CPU noting the start - * of a new grace period or the end of an old grace period ("cpustart" - * and "cpuend", respectively), a CPU passing through a quiescent - * state ("cpuqs"), a CPU coming online or going offline ("cpuonl" - * and "cpuofl", respectively), and a CPU being kicked for being too - * long in dyntick-idle mode ("kick"). - */ -TRACE_EVENT(rcu_grace_period, - - TP_PROTO(char *rcuname, unsigned long gpnum, char *gpevent), - - TP_ARGS(rcuname, gpnum, gpevent), - - TP_STRUCT__entry( - __field(char *, rcuname) - __field(unsigned long, gpnum) - __field(char *, gpevent) - ), - - TP_fast_assign( - __entry->rcuname = rcuname; - __entry->gpnum = gpnum; - __entry->gpevent = gpevent; - ), - - TP_printk("%s %lu %s", - __entry->rcuname, __entry->gpnum, __entry->gpevent) -); - -/* - * Tracepoint for grace-period-initialization events. These are - * distinguished by the type of RCU, the new grace-period number, the - * rcu_node structure level, the starting and ending CPU covered by the - * rcu_node structure, and the mask of CPUs that will be waited for. - * All but the type of RCU are extracted from the rcu_node structure. - */ -TRACE_EVENT(rcu_grace_period_init, - - TP_PROTO(char *rcuname, unsigned long gpnum, u8 level, - int grplo, int grphi, unsigned long qsmask), - - TP_ARGS(rcuname, gpnum, level, grplo, grphi, qsmask), - - TP_STRUCT__entry( - __field(char *, rcuname) - __field(unsigned long, gpnum) - __field(u8, level) - __field(int, grplo) - __field(int, grphi) - __field(unsigned long, qsmask) - ), - - TP_fast_assign( - __entry->rcuname = rcuname; - __entry->gpnum = gpnum; - __entry->level = level; - __entry->grplo = grplo; - __entry->grphi = grphi; - __entry->qsmask = qsmask; - ), - - TP_printk("%s %lu %u %d %d %lx", - __entry->rcuname, __entry->gpnum, __entry->level, - __entry->grplo, __entry->grphi, __entry->qsmask) -); - -/* - * Tracepoint for tasks blocking within preemptible-RCU read-side - * critical sections. Track the type of RCU (which one day might - * include SRCU), the grace-period number that the task is blocking - * (the current or the next), and the task's PID. - */ -TRACE_EVENT(rcu_preempt_task, - - TP_PROTO(char *rcuname, int pid, unsigned long gpnum), - - TP_ARGS(rcuname, pid, gpnum), - - TP_STRUCT__entry( - __field(char *, rcuname) - __field(unsigned long, gpnum) - __field(int, pid) - ), - - TP_fast_assign( - __entry->rcuname = rcuname; - __entry->gpnum = gpnum; - __entry->pid = pid; - ), - - TP_printk("%s %lu %d", - __entry->rcuname, __entry->gpnum, __entry->pid) -); - -/* - * Tracepoint for tasks that blocked within a given preemptible-RCU - * read-side critical section exiting that critical section. Track the - * type of RCU (which one day might include SRCU) and the task's PID. - */ -TRACE_EVENT(rcu_unlock_preempted_task, - - TP_PROTO(char *rcuname, unsigned long gpnum, int pid), - - TP_ARGS(rcuname, gpnum, pid), - - TP_STRUCT__entry( - __field(char *, rcuname) - __field(unsigned long, gpnum) - __field(int, pid) - ), - - TP_fast_assign( - __entry->rcuname = rcuname; - __entry->gpnum = gpnum; - __entry->pid = pid; - ), - - TP_printk("%s %lu %d", __entry->rcuname, __entry->gpnum, __entry->pid) -); - -/* - * Tracepoint for quiescent-state-reporting events. These are - * distinguished by the type of RCU, the grace-period number, the - * mask of quiescent lower-level entities, the rcu_node structure level, - * the starting and ending CPU covered by the rcu_node structure, and - * whether there are any blocked tasks blocking the current grace period. - * All but the type of RCU are extracted from the rcu_node structure. - */ -TRACE_EVENT(rcu_quiescent_state_report, - - TP_PROTO(char *rcuname, unsigned long gpnum, - unsigned long mask, unsigned long qsmask, - u8 level, int grplo, int grphi, int gp_tasks), - - TP_ARGS(rcuname, gpnum, mask, qsmask, level, grplo, grphi, gp_tasks), - - TP_STRUCT__entry( - __field(char *, rcuname) - __field(unsigned long, gpnum) - __field(unsigned long, mask) - __field(unsigned long, qsmask) - __field(u8, level) - __field(int, grplo) - __field(int, grphi) - __field(u8, gp_tasks) - ), - - TP_fast_assign( - __entry->rcuname = rcuname; - __entry->gpnum = gpnum; - __entry->mask = mask; - __entry->qsmask = qsmask; - __entry->level = level; - __entry->grplo = grplo; - __entry->grphi = grphi; - __entry->gp_tasks = gp_tasks; - ), - - TP_printk("%s %lu %lx>%lx %u %d %d %u", - __entry->rcuname, __entry->gpnum, - __entry->mask, __entry->qsmask, __entry->level, - __entry->grplo, __entry->grphi, __entry->gp_tasks) -); - -/* - * Tracepoint for quiescent states detected by force_quiescent_state(). - * These trace events include the type of RCU, the grace-period number - * that was blocked by the CPU, the CPU itself, and the type of quiescent - * state, which can be "dti" for dyntick-idle mode, "ofl" for CPU offline, - * or "kick" when kicking a CPU that has been in dyntick-idle mode for - * too long. - */ -TRACE_EVENT(rcu_fqs, - - TP_PROTO(char *rcuname, unsigned long gpnum, int cpu, char *qsevent), - - TP_ARGS(rcuname, gpnum, cpu, qsevent), - - TP_STRUCT__entry( - __field(char *, rcuname) - __field(unsigned long, gpnum) - __field(int, cpu) - __field(char *, qsevent) - ), - - TP_fast_assign( - __entry->rcuname = rcuname; - __entry->gpnum = gpnum; - __entry->cpu = cpu; - __entry->qsevent = qsevent; - ), - - TP_printk("%s %lu %d %s", - __entry->rcuname, __entry->gpnum, - __entry->cpu, __entry->qsevent) -); - -#endif /* #if defined(CONFIG_TREE_RCU) || defined(CONFIG_TREE_PREEMPT_RCU) */ - -/* - * Tracepoint for dyntick-idle entry/exit events. These take a string - * as argument: "Start" for entering dyntick-idle mode, "End" for - * leaving it, "--=" for events moving towards idle, and "++=" for events - * moving away from idle. "Error on entry: not idle task" and "Error on - * exit: not idle task" indicate that a non-idle task is erroneously - * toying with the idle loop. - * - * These events also take a pair of numbers, which indicate the nesting - * depth before and after the event of interest. Note that task-related - * events use the upper bits of each number, while interrupt-related - * events use the lower bits. - */ -TRACE_EVENT(rcu_dyntick, - - TP_PROTO(char *polarity, long long oldnesting, long long newnesting), - - TP_ARGS(polarity, oldnesting, newnesting), - - TP_STRUCT__entry( - __field(char *, polarity) - __field(long long, oldnesting) - __field(long long, newnesting) - ), - - TP_fast_assign( - __entry->polarity = polarity; - __entry->oldnesting = oldnesting; - __entry->newnesting = newnesting; - ), - - TP_printk("%s %llx %llx", __entry->polarity, - __entry->oldnesting, __entry->newnesting) -); - -/* - * Tracepoint for RCU preparation for idle, the goal being to get RCU - * processing done so that the current CPU can shut off its scheduling - * clock and enter dyntick-idle mode. One way to accomplish this is - * to drain all RCU callbacks from this CPU, and the other is to have - * done everything RCU requires for the current grace period. In this - * latter case, the CPU will be awakened at the end of the current grace - * period in order to process the remainder of its callbacks. - * - * These tracepoints take a string as argument: - * - * "No callbacks": Nothing to do, no callbacks on this CPU. - * "In holdoff": Nothing to do, holding off after unsuccessful attempt. - * "Begin holdoff": Attempt failed, don't retry until next jiffy. - * "Dyntick with callbacks": Entering dyntick-idle despite callbacks. - * "Dyntick with lazy callbacks": Entering dyntick-idle w/lazy callbacks. - * "More callbacks": Still more callbacks, try again to clear them out. - * "Callbacks drained": All callbacks processed, off to dyntick idle! - * "Timer": Timer fired to cause CPU to continue processing callbacks. - * "Demigrate": Timer fired on wrong CPU, woke up correct CPU. - * "Cleanup after idle": Idle exited, timer canceled. - */ -TRACE_EVENT(rcu_prep_idle, - - TP_PROTO(char *reason), - - TP_ARGS(reason), - - TP_STRUCT__entry( - __field(char *, reason) - ), - - TP_fast_assign( - __entry->reason = reason; - ), - - TP_printk("%s", __entry->reason) -); - -/* - * Tracepoint for the registration of a single RCU callback function. - * The first argument is the type of RCU, the second argument is - * a pointer to the RCU callback itself, the third element is the - * number of lazy callbacks queued, and the fourth element is the - * total number of callbacks queued. - */ -TRACE_EVENT(rcu_callback, - - TP_PROTO(char *rcuname, struct rcu_head *rhp, long qlen_lazy, - long qlen), - - TP_ARGS(rcuname, rhp, qlen_lazy, qlen), - - TP_STRUCT__entry( - __field(char *, rcuname) - __field(void *, rhp) - __field(void *, func) - __field(long, qlen_lazy) - __field(long, qlen) - ), - - TP_fast_assign( - __entry->rcuname = rcuname; - __entry->rhp = rhp; - __entry->func = rhp->func; - __entry->qlen_lazy = qlen_lazy; - __entry->qlen = qlen; - ), - - TP_printk("%s rhp=%p func=%pf %ld/%ld", - __entry->rcuname, __entry->rhp, __entry->func, - __entry->qlen_lazy, __entry->qlen) -); - -/* - * Tracepoint for the registration of a single RCU callback of the special - * kfree() form. The first argument is the RCU type, the second argument - * is a pointer to the RCU callback, the third argument is the offset - * of the callback within the enclosing RCU-protected data structure, - * the fourth argument is the number of lazy callbacks queued, and the - * fifth argument is the total number of callbacks queued. - */ -TRACE_EVENT(rcu_kfree_callback, - - TP_PROTO(char *rcuname, struct rcu_head *rhp, unsigned long offset, - long qlen_lazy, long qlen), - - TP_ARGS(rcuname, rhp, offset, qlen_lazy, qlen), - - TP_STRUCT__entry( - __field(char *, rcuname) - __field(void *, rhp) - __field(unsigned long, offset) - __field(long, qlen_lazy) - __field(long, qlen) - ), - - TP_fast_assign( - __entry->rcuname = rcuname; - __entry->rhp = rhp; - __entry->offset = offset; - __entry->qlen_lazy = qlen_lazy; - __entry->qlen = qlen; - ), - - TP_printk("%s rhp=%p func=%ld %ld/%ld", - __entry->rcuname, __entry->rhp, __entry->offset, - __entry->qlen_lazy, __entry->qlen) -); - -/* - * Tracepoint for marking the beginning rcu_do_batch, performed to start - * RCU callback invocation. The first argument is the RCU flavor, - * the second is the number of lazy callbacks queued, the third is - * the total number of callbacks queued, and the fourth argument is - * the current RCU-callback batch limit. - */ -TRACE_EVENT(rcu_batch_start, - - TP_PROTO(char *rcuname, long qlen_lazy, long qlen, int blimit), - - TP_ARGS(rcuname, qlen_lazy, qlen, blimit), - - TP_STRUCT__entry( - __field(char *, rcuname) - __field(long, qlen_lazy) - __field(long, qlen) - __field(int, blimit) - ), - - TP_fast_assign( - __entry->rcuname = rcuname; - __entry->qlen_lazy = qlen_lazy; - __entry->qlen = qlen; - __entry->blimit = blimit; - ), - - TP_printk("%s CBs=%ld/%ld bl=%d", - __entry->rcuname, __entry->qlen_lazy, __entry->qlen, - __entry->blimit) -); - -/* - * Tracepoint for the invocation of a single RCU callback function. - * The first argument is the type of RCU, and the second argument is - * a pointer to the RCU callback itself. - */ -TRACE_EVENT(rcu_invoke_callback, - - TP_PROTO(char *rcuname, struct rcu_head *rhp), - - TP_ARGS(rcuname, rhp), - - TP_STRUCT__entry( - __field(char *, rcuname) - __field(void *, rhp) - __field(void *, func) - ), - - TP_fast_assign( - __entry->rcuname = rcuname; - __entry->rhp = rhp; - __entry->func = rhp->func; - ), - - TP_printk("%s rhp=%p func=%pf", - __entry->rcuname, __entry->rhp, __entry->func) -); - -/* - * Tracepoint for the invocation of a single RCU callback of the special - * kfree() form. The first argument is the RCU flavor, the second - * argument is a pointer to the RCU callback, and the third argument - * is the offset of the callback within the enclosing RCU-protected - * data structure. - */ -TRACE_EVENT(rcu_invoke_kfree_callback, - - TP_PROTO(char *rcuname, struct rcu_head *rhp, unsigned long offset), - - TP_ARGS(rcuname, rhp, offset), - - TP_STRUCT__entry( - __field(char *, rcuname) - __field(void *, rhp) - __field(unsigned long, offset) - ), - - TP_fast_assign( - __entry->rcuname = rcuname; - __entry->rhp = rhp; - __entry->offset = offset; - ), - - TP_printk("%s rhp=%p func=%ld", - __entry->rcuname, __entry->rhp, __entry->offset) -); - -/* - * Tracepoint for exiting rcu_do_batch after RCU callbacks have been - * invoked. The first argument is the name of the RCU flavor, - * the second argument is number of callbacks actually invoked, - * the third argument (cb) is whether or not any of the callbacks that - * were ready to invoke at the beginning of this batch are still - * queued, the fourth argument (nr) is the return value of need_resched(), - * the fifth argument (iit) is 1 if the current task is the idle task, - * and the sixth argument (risk) is the return value from - * rcu_is_callbacks_kthread(). - */ -TRACE_EVENT(rcu_batch_end, - - TP_PROTO(char *rcuname, int callbacks_invoked, - bool cb, bool nr, bool iit, bool risk), - - TP_ARGS(rcuname, callbacks_invoked, cb, nr, iit, risk), - - TP_STRUCT__entry( - __field(char *, rcuname) - __field(int, callbacks_invoked) - __field(bool, cb) - __field(bool, nr) - __field(bool, iit) - __field(bool, risk) - ), - - TP_fast_assign( - __entry->rcuname = rcuname; - __entry->callbacks_invoked = callbacks_invoked; - __entry->cb = cb; - __entry->nr = nr; - __entry->iit = iit; - __entry->risk = risk; - ), - - TP_printk("%s CBs-invoked=%d idle=%c%c%c%c", - __entry->rcuname, __entry->callbacks_invoked, - __entry->cb ? 'C' : '.', - __entry->nr ? 'S' : '.', - __entry->iit ? 'I' : '.', - __entry->risk ? 'R' : '.') -); - -/* - * Tracepoint for rcutorture readers. The first argument is the name - * of the RCU flavor from rcutorture's viewpoint and the second argument - * is the callback address. - */ -TRACE_EVENT(rcu_torture_read, - - TP_PROTO(char *rcutorturename, struct rcu_head *rhp), - - TP_ARGS(rcutorturename, rhp), - - TP_STRUCT__entry( - __field(char *, rcutorturename) - __field(struct rcu_head *, rhp) - ), - - TP_fast_assign( - __entry->rcutorturename = rcutorturename; - __entry->rhp = rhp; - ), - - TP_printk("%s torture read %p", - __entry->rcutorturename, __entry->rhp) -); - -/* - * Tracepoint for _rcu_barrier() execution. The string "s" describes - * the _rcu_barrier phase: - * "Begin": rcu_barrier_callback() started. - * "Check": rcu_barrier_callback() checking for piggybacking. - * "EarlyExit": rcu_barrier_callback() piggybacked, thus early exit. - * "Inc1": rcu_barrier_callback() piggyback check counter incremented. - * "Offline": rcu_barrier_callback() found offline CPU - * "OnlineQ": rcu_barrier_callback() found online CPU with callbacks. - * "OnlineNQ": rcu_barrier_callback() found online CPU, no callbacks. - * "IRQ": An rcu_barrier_callback() callback posted on remote CPU. - * "CB": An rcu_barrier_callback() invoked a callback, not the last. - * "LastCB": An rcu_barrier_callback() invoked the last callback. - * "Inc2": rcu_barrier_callback() piggyback check counter incremented. - * The "cpu" argument is the CPU or -1 if meaningless, the "cnt" argument - * is the count of remaining callbacks, and "done" is the piggybacking count. - */ -TRACE_EVENT(rcu_barrier, - - TP_PROTO(char *rcuname, char *s, int cpu, int cnt, unsigned long done), - - TP_ARGS(rcuname, s, cpu, cnt, done), - - TP_STRUCT__entry( - __field(char *, rcuname) - __field(char *, s) - __field(int, cpu) - __field(int, cnt) - __field(unsigned long, done) - ), - - TP_fast_assign( - __entry->rcuname = rcuname; - __entry->s = s; - __entry->cpu = cpu; - __entry->cnt = cnt; - __entry->done = done; - ), - - TP_printk("%s %s cpu %d remaining %d # %lu", - __entry->rcuname, __entry->s, __entry->cpu, __entry->cnt, - __entry->done) -); - -#else /* #ifdef CONFIG_RCU_TRACE */ - -#define trace_rcu_grace_period(rcuname, gpnum, gpevent) do { } while (0) -#define trace_rcu_grace_period_init(rcuname, gpnum, level, grplo, grphi, \ - qsmask) do { } while (0) -#define trace_rcu_preempt_task(rcuname, pid, gpnum) do { } while (0) -#define trace_rcu_unlock_preempted_task(rcuname, gpnum, pid) do { } while (0) -#define trace_rcu_quiescent_state_report(rcuname, gpnum, mask, qsmask, level, \ - grplo, grphi, gp_tasks) do { } \ - while (0) -#define trace_rcu_fqs(rcuname, gpnum, cpu, qsevent) do { } while (0) -#define trace_rcu_dyntick(polarity, oldnesting, newnesting) do { } while (0) -#define trace_rcu_prep_idle(reason) do { } while (0) -#define trace_rcu_callback(rcuname, rhp, qlen_lazy, qlen) do { } while (0) -#define trace_rcu_kfree_callback(rcuname, rhp, offset, qlen_lazy, qlen) \ - do { } while (0) -#define trace_rcu_batch_start(rcuname, qlen_lazy, qlen, blimit) \ - do { } while (0) -#define trace_rcu_invoke_callback(rcuname, rhp) do { } while (0) -#define trace_rcu_invoke_kfree_callback(rcuname, rhp, offset) do { } while (0) -#define trace_rcu_batch_end(rcuname, callbacks_invoked, cb, nr, iit, risk) \ - do { } while (0) -#define trace_rcu_torture_read(rcutorturename, rhp) do { } while (0) -#define trace_rcu_barrier(name, s, cpu, cnt, done) do { } while (0) - -#endif /* #else #ifdef CONFIG_RCU_TRACE */ - -#endif /* _TRACE_RCU_H */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/regmap.h b/instrumentation/events/mainline/regmap.h deleted file mode 100644 index 41a7dbd5..00000000 --- a/instrumentation/events/mainline/regmap.h +++ /dev/null @@ -1,181 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM regmap - -#if !defined(_TRACE_REGMAP_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_REGMAP_H - -#include -#include - -struct device; -struct regmap; - -/* - * Log register events - */ -DECLARE_EVENT_CLASS(regmap_reg, - - TP_PROTO(struct device *dev, unsigned int reg, - unsigned int val), - - TP_ARGS(dev, reg, val), - - TP_STRUCT__entry( - __string( name, dev_name(dev) ) - __field( unsigned int, reg ) - __field( unsigned int, val ) - ), - - TP_fast_assign( - __assign_str(name, dev_name(dev)); - __entry->reg = reg; - __entry->val = val; - ), - - TP_printk("%s reg=%x val=%x", __get_str(name), - (unsigned int)__entry->reg, - (unsigned int)__entry->val) -); - -DEFINE_EVENT(regmap_reg, regmap_reg_write, - - TP_PROTO(struct device *dev, unsigned int reg, - unsigned int val), - - TP_ARGS(dev, reg, val) - -); - -DEFINE_EVENT(regmap_reg, regmap_reg_read, - - TP_PROTO(struct device *dev, unsigned int reg, - unsigned int val), - - TP_ARGS(dev, reg, val) - -); - -DEFINE_EVENT(regmap_reg, regmap_reg_read_cache, - - TP_PROTO(struct device *dev, unsigned int reg, - unsigned int val), - - TP_ARGS(dev, reg, val) - -); - -DECLARE_EVENT_CLASS(regmap_block, - - TP_PROTO(struct device *dev, unsigned int reg, int count), - - TP_ARGS(dev, reg, count), - - TP_STRUCT__entry( - __string( name, dev_name(dev) ) - __field( unsigned int, reg ) - __field( int, count ) - ), - - TP_fast_assign( - __assign_str(name, dev_name(dev)); - __entry->reg = reg; - __entry->count = count; - ), - - TP_printk("%s reg=%x count=%d", __get_str(name), - (unsigned int)__entry->reg, - (int)__entry->count) -); - -DEFINE_EVENT(regmap_block, regmap_hw_read_start, - - TP_PROTO(struct device *dev, unsigned int reg, int count), - - TP_ARGS(dev, reg, count) -); - -DEFINE_EVENT(regmap_block, regmap_hw_read_done, - - TP_PROTO(struct device *dev, unsigned int reg, int count), - - TP_ARGS(dev, reg, count) -); - -DEFINE_EVENT(regmap_block, regmap_hw_write_start, - - TP_PROTO(struct device *dev, unsigned int reg, int count), - - TP_ARGS(dev, reg, count) -); - -DEFINE_EVENT(regmap_block, regmap_hw_write_done, - - TP_PROTO(struct device *dev, unsigned int reg, int count), - - TP_ARGS(dev, reg, count) -); - -TRACE_EVENT(regcache_sync, - - TP_PROTO(struct device *dev, const char *type, - const char *status), - - TP_ARGS(dev, type, status), - - TP_STRUCT__entry( - __string( name, dev_name(dev) ) - __string( status, status ) - __string( type, type ) - __field( int, type ) - ), - - TP_fast_assign( - __assign_str(name, dev_name(dev)); - __assign_str(status, status); - __assign_str(type, type); - ), - - TP_printk("%s type=%s status=%s", __get_str(name), - __get_str(type), __get_str(status)) -); - -DECLARE_EVENT_CLASS(regmap_bool, - - TP_PROTO(struct device *dev, bool flag), - - TP_ARGS(dev, flag), - - TP_STRUCT__entry( - __string( name, dev_name(dev) ) - __field( int, flag ) - ), - - TP_fast_assign( - __assign_str(name, dev_name(dev)); - __entry->flag = flag; - ), - - TP_printk("%s flag=%d", __get_str(name), - (int)__entry->flag) -); - -DEFINE_EVENT(regmap_bool, regmap_cache_only, - - TP_PROTO(struct device *dev, bool flag), - - TP_ARGS(dev, flag) - -); - -DEFINE_EVENT(regmap_bool, regmap_cache_bypass, - - TP_PROTO(struct device *dev, bool flag), - - TP_ARGS(dev, flag) - -); - -#endif /* _TRACE_REGMAP_H */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/regulator.h b/instrumentation/events/mainline/regulator.h deleted file mode 100644 index 37502a74..00000000 --- a/instrumentation/events/mainline/regulator.h +++ /dev/null @@ -1,141 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM regulator - -#if !defined(_TRACE_REGULATOR_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_REGULATOR_H - -#include -#include - -/* - * 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( - __assign_str(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( - __assign_str(name, name); - __entry->min = min; - __entry->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( - __assign_str(name, name); - __entry->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 diff --git a/instrumentation/events/mainline/rpm.h b/instrumentation/events/mainline/rpm.h deleted file mode 100644 index 33f85b68..00000000 --- a/instrumentation/events/mainline/rpm.h +++ /dev/null @@ -1,100 +0,0 @@ - -#undef TRACE_SYSTEM -#define TRACE_SYSTEM rpm - -#if !defined(_TRACE_RUNTIME_POWER_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_RUNTIME_POWER_H - -#include -#include - -struct device; - -/* - * The rpm_internal events are used for tracing some important - * runtime pm internal functions. - */ -DECLARE_EVENT_CLASS(rpm_internal, - - TP_PROTO(struct device *dev, int flags), - - TP_ARGS(dev, flags), - - TP_STRUCT__entry( - __string( name, dev_name(dev) ) - __field( int, flags ) - __field( int , usage_count ) - __field( int , disable_depth ) - __field( int , runtime_auto ) - __field( int , request_pending ) - __field( int , irq_safe ) - __field( int , child_count ) - ), - - TP_fast_assign( - __assign_str(name, dev_name(dev)); - __entry->flags = flags; - __entry->usage_count = atomic_read( - &dev->power.usage_count); - __entry->disable_depth = dev->power.disable_depth; - __entry->runtime_auto = dev->power.runtime_auto; - __entry->request_pending = dev->power.request_pending; - __entry->irq_safe = dev->power.irq_safe; - __entry->child_count = atomic_read( - &dev->power.child_count); - ), - - TP_printk("%s flags-%x cnt-%-2d dep-%-2d auto-%-1d p-%-1d" - " irq-%-1d child-%d", - __get_str(name), __entry->flags, - __entry->usage_count, - __entry->disable_depth, - __entry->runtime_auto, - __entry->request_pending, - __entry->irq_safe, - __entry->child_count - ) -); -DEFINE_EVENT(rpm_internal, rpm_suspend, - - TP_PROTO(struct device *dev, int flags), - - TP_ARGS(dev, flags) -); -DEFINE_EVENT(rpm_internal, rpm_resume, - - TP_PROTO(struct device *dev, int flags), - - TP_ARGS(dev, flags) -); -DEFINE_EVENT(rpm_internal, rpm_idle, - - TP_PROTO(struct device *dev, int flags), - - TP_ARGS(dev, flags) -); - -TRACE_EVENT(rpm_return_int, - TP_PROTO(struct device *dev, unsigned long ip, int ret), - TP_ARGS(dev, ip, ret), - - TP_STRUCT__entry( - __string( name, dev_name(dev)) - __field( unsigned long, ip ) - __field( int, ret ) - ), - - TP_fast_assign( - __assign_str(name, dev_name(dev)); - __entry->ip = ip; - __entry->ret = ret; - ), - - TP_printk("%pS:%s ret=%d", (void *)__entry->ip, __get_str(name), - __entry->ret) -); - -#endif /* _TRACE_RUNTIME_POWER_H */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/sched.h b/instrumentation/events/mainline/sched.h deleted file mode 100644 index ea7a2035..00000000 --- a/instrumentation/events/mainline/sched.h +++ /dev/null @@ -1,432 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM sched - -#if !defined(_TRACE_SCHED_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_SCHED_H - -#include -#include -#include - -/* - * Tracepoint for calling kthread_stop, performed to end a kthread: - */ -TRACE_EVENT(sched_kthread_stop, - - TP_PROTO(struct task_struct *t), - - TP_ARGS(t), - - TP_STRUCT__entry( - __array( char, comm, TASK_COMM_LEN ) - __field( pid_t, pid ) - ), - - TP_fast_assign( - memcpy(__entry->comm, t->comm, TASK_COMM_LEN); - __entry->pid = t->pid; - ), - - TP_printk("comm=%s pid=%d", __entry->comm, __entry->pid) -); - -/* - * Tracepoint for the return value of the kthread stopping: - */ -TRACE_EVENT(sched_kthread_stop_ret, - - TP_PROTO(int ret), - - TP_ARGS(ret), - - TP_STRUCT__entry( - __field( int, ret ) - ), - - TP_fast_assign( - __entry->ret = ret; - ), - - TP_printk("ret=%d", __entry->ret) -); - -/* - * Tracepoint for waking up a task: - */ -DECLARE_EVENT_CLASS(sched_wakeup_template, - - TP_PROTO(struct task_struct *p, int success), - - TP_ARGS(p, success), - - TP_STRUCT__entry( - __array( char, comm, TASK_COMM_LEN ) - __field( pid_t, pid ) - __field( int, prio ) - __field( int, success ) - __field( int, target_cpu ) - ), - - TP_fast_assign( - memcpy(__entry->comm, p->comm, TASK_COMM_LEN); - __entry->pid = p->pid; - __entry->prio = p->prio; - __entry->success = success; - __entry->target_cpu = task_cpu(p); - ), - - TP_printk("comm=%s pid=%d prio=%d success=%d target_cpu=%03d", - __entry->comm, __entry->pid, __entry->prio, - __entry->success, __entry->target_cpu) -); - -DEFINE_EVENT(sched_wakeup_template, sched_wakeup, - TP_PROTO(struct task_struct *p, int success), - TP_ARGS(p, success)); - -/* - * Tracepoint for waking up a new task: - */ -DEFINE_EVENT(sched_wakeup_template, sched_wakeup_new, - TP_PROTO(struct task_struct *p, int success), - TP_ARGS(p, success)); - -#ifdef CREATE_TRACE_POINTS -static inline long __trace_sched_switch_state(struct task_struct *p) -{ - long state = p->state; - -#ifdef CONFIG_PREEMPT - /* - * For all intents and purposes a preempted task is a running task. - */ - if (task_thread_info(p)->preempt_count & PREEMPT_ACTIVE) - state = TASK_RUNNING | TASK_STATE_MAX; -#endif - - return state; -} -#endif - -/* - * Tracepoint for task switches, performed by the scheduler: - */ -TRACE_EVENT(sched_switch, - - TP_PROTO(struct task_struct *prev, - struct task_struct *next), - - TP_ARGS(prev, next), - - TP_STRUCT__entry( - __array( char, prev_comm, TASK_COMM_LEN ) - __field( pid_t, prev_pid ) - __field( int, prev_prio ) - __field( long, prev_state ) - __array( char, next_comm, TASK_COMM_LEN ) - __field( pid_t, next_pid ) - __field( int, next_prio ) - ), - - TP_fast_assign( - memcpy(__entry->next_comm, next->comm, TASK_COMM_LEN); - __entry->prev_pid = prev->pid; - __entry->prev_prio = prev->prio; - __entry->prev_state = __trace_sched_switch_state(prev); - memcpy(__entry->prev_comm, prev->comm, TASK_COMM_LEN); - __entry->next_pid = next->pid; - __entry->next_prio = next->prio; - ), - - TP_printk("prev_comm=%s prev_pid=%d prev_prio=%d prev_state=%s%s ==> next_comm=%s next_pid=%d next_prio=%d", - __entry->prev_comm, __entry->prev_pid, __entry->prev_prio, - __entry->prev_state & (TASK_STATE_MAX-1) ? - __print_flags(__entry->prev_state & (TASK_STATE_MAX-1), "|", - { 1, "S"} , { 2, "D" }, { 4, "T" }, { 8, "t" }, - { 16, "Z" }, { 32, "X" }, { 64, "x" }, - { 128, "W" }) : "R", - __entry->prev_state & TASK_STATE_MAX ? "+" : "", - __entry->next_comm, __entry->next_pid, __entry->next_prio) -); - -/* - * Tracepoint for a task being migrated: - */ -TRACE_EVENT(sched_migrate_task, - - TP_PROTO(struct task_struct *p, int dest_cpu), - - TP_ARGS(p, dest_cpu), - - TP_STRUCT__entry( - __array( char, comm, TASK_COMM_LEN ) - __field( pid_t, pid ) - __field( int, prio ) - __field( int, orig_cpu ) - __field( int, dest_cpu ) - ), - - TP_fast_assign( - memcpy(__entry->comm, p->comm, TASK_COMM_LEN); - __entry->pid = p->pid; - __entry->prio = p->prio; - __entry->orig_cpu = task_cpu(p); - __entry->dest_cpu = dest_cpu; - ), - - TP_printk("comm=%s pid=%d prio=%d orig_cpu=%d dest_cpu=%d", - __entry->comm, __entry->pid, __entry->prio, - __entry->orig_cpu, __entry->dest_cpu) -); - -DECLARE_EVENT_CLASS(sched_process_template, - - TP_PROTO(struct task_struct *p), - - TP_ARGS(p), - - TP_STRUCT__entry( - __array( char, comm, TASK_COMM_LEN ) - __field( pid_t, pid ) - __field( int, prio ) - ), - - TP_fast_assign( - memcpy(__entry->comm, p->comm, TASK_COMM_LEN); - __entry->pid = p->pid; - __entry->prio = p->prio; - ), - - TP_printk("comm=%s pid=%d prio=%d", - __entry->comm, __entry->pid, __entry->prio) -); - -/* - * Tracepoint for freeing a task: - */ -DEFINE_EVENT(sched_process_template, sched_process_free, - TP_PROTO(struct task_struct *p), - TP_ARGS(p)); - - -/* - * Tracepoint for a task exiting: - */ -DEFINE_EVENT(sched_process_template, sched_process_exit, - TP_PROTO(struct task_struct *p), - TP_ARGS(p)); - -/* - * Tracepoint for waiting on task to unschedule: - */ -DEFINE_EVENT(sched_process_template, sched_wait_task, - TP_PROTO(struct task_struct *p), - TP_ARGS(p)); - -/* - * Tracepoint for a waiting task: - */ -TRACE_EVENT(sched_process_wait, - - TP_PROTO(struct pid *pid), - - TP_ARGS(pid), - - TP_STRUCT__entry( - __array( char, comm, TASK_COMM_LEN ) - __field( pid_t, pid ) - __field( int, prio ) - ), - - TP_fast_assign( - memcpy(__entry->comm, current->comm, TASK_COMM_LEN); - __entry->pid = pid_nr(pid); - __entry->prio = current->prio; - ), - - TP_printk("comm=%s pid=%d prio=%d", - __entry->comm, __entry->pid, __entry->prio) -); - -/* - * Tracepoint for do_fork: - */ -TRACE_EVENT(sched_process_fork, - - TP_PROTO(struct task_struct *parent, struct task_struct *child), - - TP_ARGS(parent, child), - - TP_STRUCT__entry( - __array( char, parent_comm, TASK_COMM_LEN ) - __field( pid_t, parent_pid ) - __array( char, child_comm, TASK_COMM_LEN ) - __field( pid_t, child_pid ) - ), - - TP_fast_assign( - memcpy(__entry->parent_comm, parent->comm, TASK_COMM_LEN); - __entry->parent_pid = parent->pid; - memcpy(__entry->child_comm, child->comm, TASK_COMM_LEN); - __entry->child_pid = child->pid; - ), - - TP_printk("comm=%s pid=%d child_comm=%s child_pid=%d", - __entry->parent_comm, __entry->parent_pid, - __entry->child_comm, __entry->child_pid) -); - -/* - * Tracepoint for exec: - */ -TRACE_EVENT(sched_process_exec, - - TP_PROTO(struct task_struct *p, pid_t old_pid, - struct linux_binprm *bprm), - - TP_ARGS(p, old_pid, bprm), - - TP_STRUCT__entry( - __string( filename, bprm->filename ) - __field( pid_t, pid ) - __field( pid_t, old_pid ) - ), - - TP_fast_assign( - __assign_str(filename, bprm->filename); - __entry->pid = p->pid; - __entry->old_pid = old_pid; - ), - - TP_printk("filename=%s pid=%d old_pid=%d", __get_str(filename), - __entry->pid, __entry->old_pid) -); - -/* - * XXX the below sched_stat tracepoints only apply to SCHED_OTHER/BATCH/IDLE - * adding sched_stat support to SCHED_FIFO/RR would be welcome. - */ -DECLARE_EVENT_CLASS(sched_stat_template, - - TP_PROTO(struct task_struct *tsk, u64 delay), - - TP_ARGS(tsk, delay), - - TP_STRUCT__entry( - __array( char, comm, TASK_COMM_LEN ) - __field( pid_t, pid ) - __field( u64, delay ) - ), - - TP_fast_assign( - memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN); - __entry->pid = tsk->pid; - __entry->delay = delay; - ) - TP_perf_assign( - __perf_count(delay); - ), - - TP_printk("comm=%s pid=%d delay=%Lu [ns]", - __entry->comm, __entry->pid, - (unsigned long long)__entry->delay) -); - - -/* - * Tracepoint for accounting wait time (time the task is runnable - * but not actually running due to scheduler contention). - */ -DEFINE_EVENT(sched_stat_template, sched_stat_wait, - TP_PROTO(struct task_struct *tsk, u64 delay), - TP_ARGS(tsk, delay)); - -/* - * Tracepoint for accounting sleep time (time the task is not runnable, - * including iowait, see below). - */ -DEFINE_EVENT(sched_stat_template, sched_stat_sleep, - TP_PROTO(struct task_struct *tsk, u64 delay), - TP_ARGS(tsk, delay)); - -/* - * Tracepoint for accounting iowait time (time the task is not runnable - * due to waiting on IO to complete). - */ -DEFINE_EVENT(sched_stat_template, sched_stat_iowait, - TP_PROTO(struct task_struct *tsk, u64 delay), - TP_ARGS(tsk, delay)); - -/* - * Tracepoint for accounting blocked time (time the task is in uninterruptible). - */ -DEFINE_EVENT(sched_stat_template, sched_stat_blocked, - TP_PROTO(struct task_struct *tsk, u64 delay), - TP_ARGS(tsk, delay)); - -/* - * Tracepoint for accounting runtime (time the task is executing - * on a CPU). - */ -TRACE_EVENT(sched_stat_runtime, - - TP_PROTO(struct task_struct *tsk, u64 runtime, u64 vruntime), - - TP_ARGS(tsk, runtime, vruntime), - - TP_STRUCT__entry( - __array( char, comm, TASK_COMM_LEN ) - __field( pid_t, pid ) - __field( u64, runtime ) - __field( u64, vruntime ) - ), - - TP_fast_assign( - memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN); - __entry->pid = tsk->pid; - __entry->runtime = runtime; - __entry->vruntime = vruntime; - ) - TP_perf_assign( - __perf_count(runtime); - ), - - TP_printk("comm=%s pid=%d runtime=%Lu [ns] vruntime=%Lu [ns]", - __entry->comm, __entry->pid, - (unsigned long long)__entry->runtime, - (unsigned long long)__entry->vruntime) -); - -/* - * Tracepoint for showing priority inheritance modifying a tasks - * priority. - */ -TRACE_EVENT(sched_pi_setprio, - - TP_PROTO(struct task_struct *tsk, int newprio), - - TP_ARGS(tsk, newprio), - - TP_STRUCT__entry( - __array( char, comm, TASK_COMM_LEN ) - __field( pid_t, pid ) - __field( int, oldprio ) - __field( int, newprio ) - ), - - TP_fast_assign( - memcpy(__entry->comm, tsk->comm, TASK_COMM_LEN); - __entry->pid = tsk->pid; - __entry->oldprio = tsk->prio; - __entry->newprio = newprio; - ), - - TP_printk("comm=%s pid=%d oldprio=%d newprio=%d", - __entry->comm, __entry->pid, - __entry->oldprio, __entry->newprio) -); - -#endif /* _TRACE_SCHED_H */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/scsi.h b/instrumentation/events/mainline/scsi.h deleted file mode 100644 index db6c9351..00000000 --- a/instrumentation/events/mainline/scsi.h +++ /dev/null @@ -1,365 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM scsi - -#if !defined(_TRACE_SCSI_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_SCSI_H - -#include -#include -#include -#include - -#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) - -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(unsigned char, cmnd, cmd->cmd_len) - ), - - TP_fast_assign( - __entry->host_no = cmd->device->host->host_no; - __entry->channel = cmd->device->channel; - __entry->id = cmd->device->id; - __entry->lun = cmd->device->lun; - __entry->opcode = cmd->cmnd[0]; - __entry->cmd_len = cmd->cmd_len; - __entry->data_sglen = scsi_sg_count(cmd); - __entry->prot_sglen = scsi_prot_sg_count(cmd); - __entry->prot_op = scsi_get_prot_op(cmd); - memcpy(__get_dynamic_array(cmnd), cmd->cmnd, cmd->cmd_len); - ), - - TP_printk("host_no=%u channel=%u id=%u lun=%u data_sgl=%u prot_sgl=%u" \ - " prot_op=%s cmnd=(%s %s raw=%s)", - __entry->host_no, __entry->channel, __entry->id, - __entry->lun, __entry->data_sglen, __entry->prot_sglen, - show_prot_op_name(__entry->prot_op), - show_opcode_name(__entry->opcode), - __parse_cdb(__get_dynamic_array(cmnd), __entry->cmd_len), - __print_hex(__get_dynamic_array(cmnd), __entry->cmd_len)) -); - -TRACE_EVENT(scsi_dispatch_cmd_error, - - TP_PROTO(struct scsi_cmnd *cmd, int rtn), - - TP_ARGS(cmd, rtn), - - TP_STRUCT__entry( - __field( unsigned int, host_no ) - __field( unsigned int, channel ) - __field( unsigned int, id ) - __field( unsigned int, lun ) - __field( int, rtn ) - __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(unsigned char, cmnd, cmd->cmd_len) - ), - - TP_fast_assign( - __entry->host_no = cmd->device->host->host_no; - __entry->channel = cmd->device->channel; - __entry->id = cmd->device->id; - __entry->lun = cmd->device->lun; - __entry->rtn = rtn; - __entry->opcode = cmd->cmnd[0]; - __entry->cmd_len = cmd->cmd_len; - __entry->data_sglen = scsi_sg_count(cmd); - __entry->prot_sglen = scsi_prot_sg_count(cmd); - __entry->prot_op = scsi_get_prot_op(cmd); - memcpy(__get_dynamic_array(cmnd), cmd->cmnd, cmd->cmd_len); - ), - - TP_printk("host_no=%u channel=%u id=%u lun=%u data_sgl=%u prot_sgl=%u" \ - " prot_op=%s cmnd=(%s %s raw=%s) rtn=%d", - __entry->host_no, __entry->channel, __entry->id, - __entry->lun, __entry->data_sglen, __entry->prot_sglen, - show_prot_op_name(__entry->prot_op), - show_opcode_name(__entry->opcode), - __parse_cdb(__get_dynamic_array(cmnd), __entry->cmd_len), - __print_hex(__get_dynamic_array(cmnd), __entry->cmd_len), - __entry->rtn) -); - -DECLARE_EVENT_CLASS(scsi_cmd_done_timeout_template, - - 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( int, result ) - __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(unsigned char, cmnd, cmd->cmd_len) - ), - - TP_fast_assign( - __entry->host_no = cmd->device->host->host_no; - __entry->channel = cmd->device->channel; - __entry->id = cmd->device->id; - __entry->lun = cmd->device->lun; - __entry->result = cmd->result; - __entry->opcode = cmd->cmnd[0]; - __entry->cmd_len = cmd->cmd_len; - __entry->data_sglen = scsi_sg_count(cmd); - __entry->prot_sglen = scsi_prot_sg_count(cmd); - __entry->prot_op = scsi_get_prot_op(cmd); - memcpy(__get_dynamic_array(cmnd), cmd->cmnd, cmd->cmd_len); - ), - - TP_printk("host_no=%u channel=%u id=%u lun=%u data_sgl=%u " \ - "prot_sgl=%u prot_op=%s cmnd=(%s %s raw=%s) result=(driver=" \ - "%s host=%s message=%s status=%s)", - __entry->host_no, __entry->channel, __entry->id, - __entry->lun, __entry->data_sglen, __entry->prot_sglen, - show_prot_op_name(__entry->prot_op), - show_opcode_name(__entry->opcode), - __parse_cdb(__get_dynamic_array(cmnd), __entry->cmd_len), - __print_hex(__get_dynamic_array(cmnd), __entry->cmd_len), - show_driverbyte_name(((__entry->result) >> 24) & 0xff), - show_hostbyte_name(((__entry->result) >> 16) & 0xff), - show_msgbyte_name(((__entry->result) >> 8) & 0xff), - show_statusbyte_name(__entry->result & 0xff)) -); - -DEFINE_EVENT(scsi_cmd_done_timeout_template, scsi_dispatch_cmd_done, - TP_PROTO(struct scsi_cmnd *cmd), - TP_ARGS(cmd)); - -DEFINE_EVENT(scsi_cmd_done_timeout_template, scsi_dispatch_cmd_timeout, - TP_PROTO(struct scsi_cmnd *cmd), - TP_ARGS(cmd)); - -TRACE_EVENT(scsi_eh_wakeup, - - TP_PROTO(struct Scsi_Host *shost), - - TP_ARGS(shost), - - TP_STRUCT__entry( - __field( unsigned int, host_no ) - ), - - TP_fast_assign( - __entry->host_no = shost->host_no; - ), - - TP_printk("host_no=%u", __entry->host_no) -); - -#endif /* _TRACE_SCSI_H */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/signal.h b/instrumentation/events/mainline/signal.h deleted file mode 100644 index 39a8a430..00000000 --- a/instrumentation/events/mainline/signal.h +++ /dev/null @@ -1,125 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM signal - -#if !defined(_TRACE_SIGNAL_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_SIGNAL_H - -#include -#include -#include - -#define TP_STORE_SIGINFO(__entry, info) \ - do { \ - if (info == SEND_SIG_NOINFO || \ - info == SEND_SIG_FORCED) { \ - __entry->errno = 0; \ - __entry->code = SI_USER; \ - } else if (info == SEND_SIG_PRIV) { \ - __entry->errno = 0; \ - __entry->code = SI_KERNEL; \ - } else { \ - __entry->errno = info->si_errno; \ - __entry->code = info->si_code; \ - } \ - } while (0) - -#ifndef TRACE_HEADER_MULTI_READ -enum { - TRACE_SIGNAL_DELIVERED, - TRACE_SIGNAL_IGNORED, - TRACE_SIGNAL_ALREADY_PENDING, - TRACE_SIGNAL_OVERFLOW_FAIL, - TRACE_SIGNAL_LOSE_INFO, -}; -#endif - -/** - * signal_generate - called when a signal is generated - * @sig: signal number - * @info: pointer to struct siginfo - * @task: pointer to struct task_struct - * @group: shared or private - * @result: TRACE_SIGNAL_* - * - * Current process sends a 'sig' signal to 'task' process with - * 'info' siginfo. If 'info' is SEND_SIG_NOINFO or SEND_SIG_PRIV, - * 'info' is not a pointer and you can't access its field. Instead, - * SEND_SIG_NOINFO means that si_code is SI_USER, and SEND_SIG_PRIV - * means that si_code is SI_KERNEL. - */ -TRACE_EVENT(signal_generate, - - TP_PROTO(int sig, struct siginfo *info, struct task_struct *task, - int group, int result), - - TP_ARGS(sig, info, task, group, result), - - TP_STRUCT__entry( - __field( int, sig ) - __field( int, errno ) - __field( int, code ) - __array( char, comm, TASK_COMM_LEN ) - __field( pid_t, pid ) - __field( int, group ) - __field( int, result ) - ), - - TP_fast_assign( - __entry->sig = sig; - TP_STORE_SIGINFO(__entry, info); - memcpy(__entry->comm, task->comm, TASK_COMM_LEN); - __entry->pid = task->pid; - __entry->group = group; - __entry->result = result; - ), - - TP_printk("sig=%d errno=%d code=%d comm=%s pid=%d grp=%d res=%d", - __entry->sig, __entry->errno, __entry->code, - __entry->comm, __entry->pid, __entry->group, - __entry->result) -); - -/** - * signal_deliver - called when a signal is delivered - * @sig: signal number - * @info: pointer to struct siginfo - * @ka: pointer to struct k_sigaction - * - * A 'sig' signal is delivered to current process with 'info' siginfo, - * and it will be handled by 'ka'. ka->sa.sa_handler can be SIG_IGN or - * SIG_DFL. - * Note that some signals reported by signal_generate tracepoint can be - * lost, ignored or modified (by debugger) before hitting this tracepoint. - * This means, this can show which signals are actually delivered, but - * matching generated signals and delivered signals may not be correct. - */ -TRACE_EVENT(signal_deliver, - - TP_PROTO(int sig, struct siginfo *info, struct k_sigaction *ka), - - TP_ARGS(sig, info, ka), - - TP_STRUCT__entry( - __field( int, sig ) - __field( int, errno ) - __field( int, code ) - __field( unsigned long, sa_handler ) - __field( unsigned long, sa_flags ) - ), - - TP_fast_assign( - __entry->sig = sig; - TP_STORE_SIGINFO(__entry, info); - __entry->sa_handler = (unsigned long)ka->sa.sa_handler; - __entry->sa_flags = ka->sa.sa_flags; - ), - - TP_printk("sig=%d errno=%d code=%d sa_handler=%lx sa_flags=%lx", - __entry->sig, __entry->errno, __entry->code, - __entry->sa_handler, __entry->sa_flags) -); - -#endif /* _TRACE_SIGNAL_H */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/skb.h b/instrumentation/events/mainline/skb.h deleted file mode 100644 index 0c68ae22..00000000 --- a/instrumentation/events/mainline/skb.h +++ /dev/null @@ -1,75 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM skb - -#if !defined(_TRACE_SKB_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_SKB_H - -#include -#include -#include - -/* - * Tracepoint for free an sk_buff: - */ -TRACE_EVENT(kfree_skb, - - TP_PROTO(struct sk_buff *skb, void *location), - - TP_ARGS(skb, location), - - TP_STRUCT__entry( - __field( void *, skbaddr ) - __field( void *, location ) - __field( unsigned short, protocol ) - ), - - TP_fast_assign( - __entry->skbaddr = skb; - __entry->location = location; - __entry->protocol = ntohs(skb->protocol); - ), - - TP_printk("skbaddr=%p protocol=%u location=%p", - __entry->skbaddr, __entry->protocol, __entry->location) -); - -TRACE_EVENT(consume_skb, - - TP_PROTO(struct sk_buff *skb), - - TP_ARGS(skb), - - TP_STRUCT__entry( - __field( void *, skbaddr ) - ), - - TP_fast_assign( - __entry->skbaddr = skb; - ), - - TP_printk("skbaddr=%p", __entry->skbaddr) -); - -TRACE_EVENT(skb_copy_datagram_iovec, - - TP_PROTO(const struct sk_buff *skb, int len), - - TP_ARGS(skb, len), - - TP_STRUCT__entry( - __field( const void *, skbaddr ) - __field( int, len ) - ), - - TP_fast_assign( - __entry->skbaddr = skb; - __entry->len = len; - ), - - TP_printk("skbaddr=%p len=%d", __entry->skbaddr, __entry->len) -); - -#endif /* _TRACE_SKB_H */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/sock.h b/instrumentation/events/mainline/sock.h deleted file mode 100644 index 779abb91..00000000 --- a/instrumentation/events/mainline/sock.h +++ /dev/null @@ -1,68 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM sock - -#if !defined(_TRACE_SOCK_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_SOCK_H - -#include -#include - -TRACE_EVENT(sock_rcvqueue_full, - - TP_PROTO(struct sock *sk, struct sk_buff *skb), - - TP_ARGS(sk, skb), - - TP_STRUCT__entry( - __field(int, rmem_alloc) - __field(unsigned int, truesize) - __field(int, sk_rcvbuf) - ), - - TP_fast_assign( - __entry->rmem_alloc = atomic_read(&sk->sk_rmem_alloc); - __entry->truesize = skb->truesize; - __entry->sk_rcvbuf = sk->sk_rcvbuf; - ), - - TP_printk("rmem_alloc=%d truesize=%u sk_rcvbuf=%d", - __entry->rmem_alloc, __entry->truesize, __entry->sk_rcvbuf) -); - -TRACE_EVENT(sock_exceed_buf_limit, - - TP_PROTO(struct sock *sk, struct proto *prot, long allocated), - - TP_ARGS(sk, prot, allocated), - - TP_STRUCT__entry( - __array(char, name, 32) - __field(long *, sysctl_mem) - __field(long, allocated) - __field(int, sysctl_rmem) - __field(int, rmem_alloc) - ), - - TP_fast_assign( - strncpy(__entry->name, prot->name, 32); - __entry->sysctl_mem = prot->sysctl_mem; - __entry->allocated = allocated; - __entry->sysctl_rmem = prot->sysctl_rmem[0]; - __entry->rmem_alloc = atomic_read(&sk->sk_rmem_alloc); - ), - - TP_printk("proto:%s sysctl_mem=%ld,%ld,%ld allocated=%ld " - "sysctl_rmem=%d rmem_alloc=%d", - __entry->name, - __entry->sysctl_mem[0], - __entry->sysctl_mem[1], - __entry->sysctl_mem[2], - __entry->allocated, - __entry->sysctl_rmem, - __entry->rmem_alloc) -); - -#endif /* _TRACE_SOCK_H */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/sunrpc.h b/instrumentation/events/mainline/sunrpc.h deleted file mode 100644 index 43be87d5..00000000 --- a/instrumentation/events/mainline/sunrpc.h +++ /dev/null @@ -1,177 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM sunrpc - -#if !defined(_TRACE_SUNRPC_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_SUNRPC_H - -#include -#include -#include - -DECLARE_EVENT_CLASS(rpc_task_status, - - TP_PROTO(struct rpc_task *task), - - TP_ARGS(task), - - TP_STRUCT__entry( - __field(const struct rpc_task *, task) - __field(const struct rpc_clnt *, clnt) - __field(int, status) - ), - - TP_fast_assign( - __entry->task = task; - __entry->clnt = task->tk_client; - __entry->status = task->tk_status; - ), - - TP_printk("task:%p@%p, status %d",__entry->task, __entry->clnt, __entry->status) -); - -DEFINE_EVENT(rpc_task_status, rpc_call_status, - TP_PROTO(struct rpc_task *task), - - TP_ARGS(task) -); - -DEFINE_EVENT(rpc_task_status, rpc_bind_status, - TP_PROTO(struct rpc_task *task), - - TP_ARGS(task) -); - -TRACE_EVENT(rpc_connect_status, - TP_PROTO(struct rpc_task *task, int status), - - TP_ARGS(task, status), - - TP_STRUCT__entry( - __field(const struct rpc_task *, task) - __field(const struct rpc_clnt *, clnt) - __field(int, status) - ), - - TP_fast_assign( - __entry->task = task; - __entry->clnt = task->tk_client; - __entry->status = status; - ), - - TP_printk("task:%p@%p, status %d",__entry->task, __entry->clnt, __entry->status) -); - -DECLARE_EVENT_CLASS(rpc_task_running, - - TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), - - TP_ARGS(clnt, task, action), - - TP_STRUCT__entry( - __field(const struct rpc_clnt *, clnt) - __field(const struct rpc_task *, task) - __field(const void *, action) - __field(unsigned long, runstate) - __field(int, status) - __field(unsigned short, flags) - ), - - TP_fast_assign( - __entry->clnt = clnt; - __entry->task = task; - __entry->action = action; - __entry->runstate = task->tk_runstate; - __entry->status = task->tk_status; - __entry->flags = task->tk_flags; - ), - - TP_printk("task:%p@%p flags=%4.4x state=%4.4lx status=%d action=%pf", - __entry->task, - __entry->clnt, - __entry->flags, - __entry->runstate, - __entry->status, - __entry->action - ) -); - -DEFINE_EVENT(rpc_task_running, rpc_task_begin, - - TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), - - TP_ARGS(clnt, task, action) - -); - -DEFINE_EVENT(rpc_task_running, rpc_task_run_action, - - TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), - - TP_ARGS(clnt, task, action) - -); - -DEFINE_EVENT(rpc_task_running, rpc_task_complete, - - TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const void *action), - - TP_ARGS(clnt, task, action) - -); - -DECLARE_EVENT_CLASS(rpc_task_queued, - - TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q), - - TP_ARGS(clnt, task, q), - - TP_STRUCT__entry( - __field(const struct rpc_clnt *, clnt) - __field(const struct rpc_task *, task) - __field(unsigned long, timeout) - __field(unsigned long, runstate) - __field(int, status) - __field(unsigned short, flags) - __string(q_name, rpc_qname(q)) - ), - - TP_fast_assign( - __entry->clnt = clnt; - __entry->task = task; - __entry->timeout = task->tk_timeout; - __entry->runstate = task->tk_runstate; - __entry->status = task->tk_status; - __entry->flags = task->tk_flags; - __assign_str(q_name, rpc_qname(q)); - ), - - TP_printk("task:%p@%p flags=%4.4x state=%4.4lx status=%d timeout=%lu queue=%s", - __entry->task, - __entry->clnt, - __entry->flags, - __entry->runstate, - __entry->status, - __entry->timeout, - __get_str(q_name) - ) -); - -DEFINE_EVENT(rpc_task_queued, rpc_task_sleep, - - TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q), - - TP_ARGS(clnt, task, q) - -); - -DEFINE_EVENT(rpc_task_queued, rpc_task_wakeup, - - TP_PROTO(const struct rpc_clnt *clnt, const struct rpc_task *task, const struct rpc_wait_queue *q), - - TP_ARGS(clnt, task, q) - -); - -#endif /* _TRACE_SUNRPC_H */ - -#include diff --git a/instrumentation/events/mainline/syscalls.h b/instrumentation/events/mainline/syscalls.h deleted file mode 100644 index 5a4c04a7..00000000 --- a/instrumentation/events/mainline/syscalls.h +++ /dev/null @@ -1,75 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM raw_syscalls -#define TRACE_INCLUDE_FILE syscalls - -#if !defined(_TRACE_EVENTS_SYSCALLS_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_EVENTS_SYSCALLS_H - -#include - -#include -#include - - -#ifdef CONFIG_HAVE_SYSCALL_TRACEPOINTS - -extern void syscall_regfunc(void); -extern void syscall_unregfunc(void); - -TRACE_EVENT_FN(sys_enter, - - TP_PROTO(struct pt_regs *regs, long id), - - TP_ARGS(regs, id), - - TP_STRUCT__entry( - __field( long, id ) - __array( unsigned long, args, 6 ) - ), - - TP_fast_assign( - __entry->id = id; - syscall_get_arguments(current, regs, 0, 6, __entry->args); - ), - - TP_printk("NR %ld (%lx, %lx, %lx, %lx, %lx, %lx)", - __entry->id, - __entry->args[0], __entry->args[1], __entry->args[2], - __entry->args[3], __entry->args[4], __entry->args[5]), - - syscall_regfunc, syscall_unregfunc -); - -TRACE_EVENT_FLAGS(sys_enter, TRACE_EVENT_FL_CAP_ANY) - -TRACE_EVENT_FN(sys_exit, - - TP_PROTO(struct pt_regs *regs, long ret), - - TP_ARGS(regs, ret), - - TP_STRUCT__entry( - __field( long, id ) - __field( long, ret ) - ), - - TP_fast_assign( - __entry->id = syscall_get_nr(current, regs); - __entry->ret = ret; - ), - - TP_printk("NR %ld = %ld", - __entry->id, __entry->ret), - - syscall_regfunc, syscall_unregfunc -); - -TRACE_EVENT_FLAGS(sys_exit, TRACE_EVENT_FL_CAP_ANY) - -#endif /* CONFIG_HAVE_SYSCALL_TRACEPOINTS */ - -#endif /* _TRACE_EVENTS_SYSCALLS_H */ - -/* This part must be outside protection */ -#include - diff --git a/instrumentation/events/mainline/timer.h b/instrumentation/events/mainline/timer.h deleted file mode 100644 index 425bcfe5..00000000 --- a/instrumentation/events/mainline/timer.h +++ /dev/null @@ -1,329 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM timer - -#if !defined(_TRACE_TIMER_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_TIMER_H - -#include -#include -#include - -DECLARE_EVENT_CLASS(timer_class, - - TP_PROTO(struct timer_list *timer), - - TP_ARGS(timer), - - TP_STRUCT__entry( - __field( void *, timer ) - ), - - TP_fast_assign( - __entry->timer = timer; - ), - - TP_printk("timer=%p", __entry->timer) -); - -/** - * timer_init - called when the timer is initialized - * @timer: pointer to struct timer_list - */ -DEFINE_EVENT(timer_class, timer_init, - - TP_PROTO(struct timer_list *timer), - - TP_ARGS(timer) -); - -/** - * timer_start - called when the timer is started - * @timer: pointer to struct timer_list - * @expires: the timers expiry time - */ -TRACE_EVENT(timer_start, - - TP_PROTO(struct timer_list *timer, unsigned long expires), - - TP_ARGS(timer, expires), - - TP_STRUCT__entry( - __field( void *, timer ) - __field( void *, function ) - __field( unsigned long, expires ) - __field( unsigned long, now ) - ), - - TP_fast_assign( - __entry->timer = timer; - __entry->function = timer->function; - __entry->expires = expires; - __entry->now = jiffies; - ), - - TP_printk("timer=%p function=%pf expires=%lu [timeout=%ld]", - __entry->timer, __entry->function, __entry->expires, - (long)__entry->expires - __entry->now) -); - -/** - * timer_expire_entry - called immediately before the timer callback - * @timer: pointer to struct timer_list - * - * Allows to determine the timer latency. - */ -TRACE_EVENT(timer_expire_entry, - - TP_PROTO(struct timer_list *timer), - - TP_ARGS(timer), - - TP_STRUCT__entry( - __field( void *, timer ) - __field( unsigned long, now ) - __field( void *, function) - ), - - TP_fast_assign( - __entry->timer = timer; - __entry->now = jiffies; - __entry->function = timer->function; - ), - - TP_printk("timer=%p function=%pf now=%lu", __entry->timer, __entry->function,__entry->now) -); - -/** - * timer_expire_exit - called immediately after the timer callback returns - * @timer: pointer to struct timer_list - * - * When used in combination with the timer_expire_entry tracepoint we can - * determine the runtime of the timer callback function. - * - * NOTE: Do NOT derefernce timer in TP_fast_assign. The pointer might - * be invalid. We solely track the pointer. - */ -DEFINE_EVENT(timer_class, timer_expire_exit, - - TP_PROTO(struct timer_list *timer), - - TP_ARGS(timer) -); - -/** - * timer_cancel - called when the timer is canceled - * @timer: pointer to struct timer_list - */ -DEFINE_EVENT(timer_class, timer_cancel, - - TP_PROTO(struct timer_list *timer), - - TP_ARGS(timer) -); - -/** - * hrtimer_init - called when the hrtimer is initialized - * @timer: pointer to struct hrtimer - * @clockid: the hrtimers clock - * @mode: the hrtimers mode - */ -TRACE_EVENT(hrtimer_init, - - TP_PROTO(struct hrtimer *hrtimer, clockid_t clockid, - enum hrtimer_mode mode), - - TP_ARGS(hrtimer, clockid, mode), - - TP_STRUCT__entry( - __field( void *, hrtimer ) - __field( clockid_t, clockid ) - __field( enum hrtimer_mode, mode ) - ), - - TP_fast_assign( - __entry->hrtimer = hrtimer; - __entry->clockid = clockid; - __entry->mode = mode; - ), - - TP_printk("hrtimer=%p clockid=%s mode=%s", __entry->hrtimer, - __entry->clockid == CLOCK_REALTIME ? - "CLOCK_REALTIME" : "CLOCK_MONOTONIC", - __entry->mode == HRTIMER_MODE_ABS ? - "HRTIMER_MODE_ABS" : "HRTIMER_MODE_REL") -); - -/** - * hrtimer_start - called when the hrtimer is started - * @timer: pointer to struct hrtimer - */ -TRACE_EVENT(hrtimer_start, - - TP_PROTO(struct hrtimer *hrtimer), - - TP_ARGS(hrtimer), - - TP_STRUCT__entry( - __field( void *, hrtimer ) - __field( void *, function ) - __field( s64, expires ) - __field( s64, softexpires ) - ), - - TP_fast_assign( - __entry->hrtimer = hrtimer; - __entry->function = hrtimer->function; - __entry->expires = hrtimer_get_expires(hrtimer).tv64; - __entry->softexpires = hrtimer_get_softexpires(hrtimer).tv64; - ), - - TP_printk("hrtimer=%p function=%pf expires=%llu softexpires=%llu", - __entry->hrtimer, __entry->function, - (unsigned long long)ktime_to_ns((ktime_t) { - .tv64 = __entry->expires }), - (unsigned long long)ktime_to_ns((ktime_t) { - .tv64 = __entry->softexpires })) -); - -/** - * htimmer_expire_entry - called immediately before the hrtimer callback - * @timer: pointer to struct hrtimer - * @now: pointer to variable which contains current time of the - * timers base. - * - * Allows to determine the timer latency. - */ -TRACE_EVENT(hrtimer_expire_entry, - - TP_PROTO(struct hrtimer *hrtimer, ktime_t *now), - - TP_ARGS(hrtimer, now), - - TP_STRUCT__entry( - __field( void *, hrtimer ) - __field( s64, now ) - __field( void *, function) - ), - - TP_fast_assign( - __entry->hrtimer = hrtimer; - __entry->now = now->tv64; - __entry->function = hrtimer->function; - ), - - TP_printk("hrtimer=%p function=%pf now=%llu", __entry->hrtimer, __entry->function, - (unsigned long long)ktime_to_ns((ktime_t) { .tv64 = __entry->now })) - ); - -DECLARE_EVENT_CLASS(hrtimer_class, - - TP_PROTO(struct hrtimer *hrtimer), - - TP_ARGS(hrtimer), - - TP_STRUCT__entry( - __field( void *, hrtimer ) - ), - - TP_fast_assign( - __entry->hrtimer = hrtimer; - ), - - TP_printk("hrtimer=%p", __entry->hrtimer) -); - -/** - * hrtimer_expire_exit - called immediately after the hrtimer callback returns - * @timer: pointer to struct hrtimer - * - * When used in combination with the hrtimer_expire_entry tracepoint we can - * determine the runtime of the callback function. - */ -DEFINE_EVENT(hrtimer_class, hrtimer_expire_exit, - - TP_PROTO(struct hrtimer *hrtimer), - - TP_ARGS(hrtimer) -); - -/** - * hrtimer_cancel - called when the hrtimer is canceled - * @hrtimer: pointer to struct hrtimer - */ -DEFINE_EVENT(hrtimer_class, hrtimer_cancel, - - TP_PROTO(struct hrtimer *hrtimer), - - TP_ARGS(hrtimer) -); - -/** - * itimer_state - called when itimer is started or canceled - * @which: name of the interval timer - * @value: the itimers value, itimer is canceled if value->it_value is - * zero, otherwise it is started - * @expires: the itimers expiry time - */ -TRACE_EVENT(itimer_state, - - TP_PROTO(int which, const struct itimerval *const value, - cputime_t expires), - - TP_ARGS(which, value, expires), - - TP_STRUCT__entry( - __field( int, which ) - __field( cputime_t, expires ) - __field( long, value_sec ) - __field( long, value_usec ) - __field( long, interval_sec ) - __field( long, interval_usec ) - ), - - TP_fast_assign( - __entry->which = which; - __entry->expires = expires; - __entry->value_sec = value->it_value.tv_sec; - __entry->value_usec = value->it_value.tv_usec; - __entry->interval_sec = value->it_interval.tv_sec; - __entry->interval_usec = value->it_interval.tv_usec; - ), - - TP_printk("which=%d expires=%llu it_value=%ld.%ld it_interval=%ld.%ld", - __entry->which, (unsigned long long)__entry->expires, - __entry->value_sec, __entry->value_usec, - __entry->interval_sec, __entry->interval_usec) -); - -/** - * itimer_expire - called when itimer expires - * @which: type of the interval timer - * @pid: pid of the process which owns the timer - * @now: current time, used to calculate the latency of itimer - */ -TRACE_EVENT(itimer_expire, - - TP_PROTO(int which, struct pid *pid, cputime_t now), - - TP_ARGS(which, pid, now), - - TP_STRUCT__entry( - __field( int , which ) - __field( pid_t, pid ) - __field( cputime_t, now ) - ), - - TP_fast_assign( - __entry->which = which; - __entry->now = now; - __entry->pid = pid_nr(pid); - ), - - TP_printk("which=%d pid=%d now=%llu", __entry->which, - (int) __entry->pid, (unsigned long long)__entry->now) -); - -#endif /* _TRACE_TIMER_H */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/udp.h b/instrumentation/events/mainline/udp.h deleted file mode 100644 index a664bb94..00000000 --- a/instrumentation/events/mainline/udp.h +++ /dev/null @@ -1,32 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM udp - -#if !defined(_TRACE_UDP_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_UDP_H - -#include -#include - -TRACE_EVENT(udp_fail_queue_rcv_skb, - - TP_PROTO(int rc, struct sock *sk), - - TP_ARGS(rc, sk), - - TP_STRUCT__entry( - __field(int, rc) - __field(__u16, lport) - ), - - TP_fast_assign( - __entry->rc = rc; - __entry->lport = inet_sk(sk)->inet_num; - ), - - TP_printk("rc=%d port=%hu", __entry->rc, __entry->lport) -); - -#endif /* _TRACE_UDP_H */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/v4l2.h b/instrumentation/events/mainline/v4l2.h deleted file mode 100644 index ef94ecad..00000000 --- a/instrumentation/events/mainline/v4l2.h +++ /dev/null @@ -1,157 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM v4l2 - -#if !defined(_TRACE_V4L2_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_V4L2_H - -#include - -#define show_type(type) \ - __print_symbolic(type, \ - { V4L2_BUF_TYPE_VIDEO_CAPTURE, "VIDEO_CAPTURE" }, \ - { V4L2_BUF_TYPE_VIDEO_OUTPUT, "VIDEO_OUTPUT" }, \ - { V4L2_BUF_TYPE_VIDEO_OVERLAY, "VIDEO_OVERLAY" }, \ - { V4L2_BUF_TYPE_VBI_CAPTURE, "VBI_CAPTURE" }, \ - { V4L2_BUF_TYPE_VBI_OUTPUT, "VBI_OUTPUT" }, \ - { V4L2_BUF_TYPE_SLICED_VBI_CAPTURE, "SLICED_VBI_CAPTURE" }, \ - { V4L2_BUF_TYPE_SLICED_VBI_OUTPUT, "SLICED_VBI_OUTPUT" }, \ - { V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY, "VIDEO_OUTPUT_OVERLAY" },\ - { V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE, "VIDEO_CAPTURE_MPLANE" },\ - { V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE, "VIDEO_OUTPUT_MPLANE" }, \ - { V4L2_BUF_TYPE_PRIVATE, "PRIVATE" }) - -#define show_field(field) \ - __print_symbolic(field, \ - { V4L2_FIELD_ANY, "ANY" }, \ - { V4L2_FIELD_NONE, "NONE" }, \ - { V4L2_FIELD_TOP, "TOP" }, \ - { V4L2_FIELD_BOTTOM, "BOTTOM" }, \ - { V4L2_FIELD_INTERLACED, "INTERLACED" }, \ - { V4L2_FIELD_SEQ_TB, "SEQ_TB" }, \ - { V4L2_FIELD_SEQ_BT, "SEQ_BT" }, \ - { V4L2_FIELD_ALTERNATE, "ALTERNATE" }, \ - { V4L2_FIELD_INTERLACED_TB, "INTERLACED_TB" }, \ - { V4L2_FIELD_INTERLACED_BT, "INTERLACED_BT" }) - -#define show_timecode_type(type) \ - __print_symbolic(type, \ - { V4L2_TC_TYPE_24FPS, "24FPS" }, \ - { V4L2_TC_TYPE_25FPS, "25FPS" }, \ - { V4L2_TC_TYPE_30FPS, "30FPS" }, \ - { V4L2_TC_TYPE_50FPS, "50FPS" }, \ - { V4L2_TC_TYPE_60FPS, "60FPS" }) - -#define show_flags(flags) \ - __print_flags(flags, "|", \ - { V4L2_BUF_FLAG_MAPPED, "MAPPED" }, \ - { V4L2_BUF_FLAG_QUEUED, "QUEUED" }, \ - { V4L2_BUF_FLAG_DONE, "DONE" }, \ - { V4L2_BUF_FLAG_KEYFRAME, "KEYFRAME" }, \ - { V4L2_BUF_FLAG_PFRAME, "PFRAME" }, \ - { V4L2_BUF_FLAG_BFRAME, "BFRAME" }, \ - { V4L2_BUF_FLAG_ERROR, "ERROR" }, \ - { V4L2_BUF_FLAG_TIMECODE, "TIMECODE" }, \ - { V4L2_BUF_FLAG_PREPARED, "PREPARED" }, \ - { V4L2_BUF_FLAG_NO_CACHE_INVALIDATE, "NO_CACHE_INVALIDATE" }, \ - { V4L2_BUF_FLAG_NO_CACHE_CLEAN, "NO_CACHE_CLEAN" }, \ - { V4L2_BUF_FLAG_TIMESTAMP_MASK, "TIMESTAMP_MASK" }, \ - { V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN, "TIMESTAMP_UNKNOWN" }, \ - { V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC, "TIMESTAMP_MONOTONIC" }, \ - { V4L2_BUF_FLAG_TIMESTAMP_COPY, "TIMESTAMP_COPY" }) - -#define show_timecode_flags(flags) \ - __print_flags(flags, "|", \ - { V4L2_TC_FLAG_DROPFRAME, "DROPFRAME" }, \ - { V4L2_TC_FLAG_COLORFRAME, "COLORFRAME" }, \ - { V4L2_TC_USERBITS_USERDEFINED, "USERBITS_USERDEFINED" }, \ - { V4L2_TC_USERBITS_8BITCHARS, "USERBITS_8BITCHARS" }) - -#define V4L2_TRACE_EVENT(event_name) \ - TRACE_EVENT(event_name, \ - TP_PROTO(int minor, struct v4l2_buffer *buf), \ - \ - TP_ARGS(minor, buf), \ - \ - TP_STRUCT__entry( \ - __field(int, minor) \ - __field(u32, index) \ - __field(u32, type) \ - __field(u32, bytesused) \ - __field(u32, flags) \ - __field(u32, field) \ - __field(s64, timestamp) \ - __field(u32, timecode_type) \ - __field(u32, timecode_flags) \ - __field(u8, timecode_frames) \ - __field(u8, timecode_seconds) \ - __field(u8, timecode_minutes) \ - __field(u8, timecode_hours) \ - __field(u8, timecode_userbits0) \ - __field(u8, timecode_userbits1) \ - __field(u8, timecode_userbits2) \ - __field(u8, timecode_userbits3) \ - __field(u32, sequence) \ - ), \ - \ - TP_fast_assign( \ - __entry->minor = minor; \ - __entry->index = buf->index; \ - __entry->type = buf->type; \ - __entry->bytesused = buf->bytesused; \ - __entry->flags = buf->flags; \ - __entry->field = buf->field; \ - __entry->timestamp = \ - timeval_to_ns(&buf->timestamp); \ - __entry->timecode_type = buf->timecode.type; \ - __entry->timecode_flags = buf->timecode.flags; \ - __entry->timecode_frames = \ - buf->timecode.frames; \ - __entry->timecode_seconds = \ - buf->timecode.seconds; \ - __entry->timecode_minutes = \ - buf->timecode.minutes; \ - __entry->timecode_hours = buf->timecode.hours; \ - __entry->timecode_userbits0 = \ - buf->timecode.userbits[0]; \ - __entry->timecode_userbits1 = \ - buf->timecode.userbits[1]; \ - __entry->timecode_userbits2 = \ - buf->timecode.userbits[2]; \ - __entry->timecode_userbits3 = \ - buf->timecode.userbits[3]; \ - __entry->sequence = buf->sequence; \ - ), \ - \ - TP_printk("minor = %d, index = %u, type = %s, " \ - "bytesused = %u, flags = %s, " \ - "field = %s, timestamp = %llu, timecode = { " \ - "type = %s, flags = %s, frames = %u, " \ - "seconds = %u, minutes = %u, hours = %u, " \ - "userbits = { %u %u %u %u } }, " \ - "sequence = %u", __entry->minor, \ - __entry->index, show_type(__entry->type), \ - __entry->bytesused, \ - show_flags(__entry->flags), \ - show_field(__entry->field), \ - __entry->timestamp, \ - show_timecode_type(__entry->timecode_type), \ - show_timecode_flags(__entry->timecode_flags), \ - __entry->timecode_frames, \ - __entry->timecode_seconds, \ - __entry->timecode_minutes, \ - __entry->timecode_hours, \ - __entry->timecode_userbits0, \ - __entry->timecode_userbits1, \ - __entry->timecode_userbits2, \ - __entry->timecode_userbits3, \ - __entry->sequence \ - ) \ - ) - -V4L2_TRACE_EVENT(v4l2_dqbuf); -V4L2_TRACE_EVENT(v4l2_qbuf); - -#endif /* if !defined(_TRACE_V4L2_H) || defined(TRACE_HEADER_MULTI_READ) */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/vmscan.h b/instrumentation/events/mainline/vmscan.h deleted file mode 100644 index 63cfccca..00000000 --- a/instrumentation/events/mainline/vmscan.h +++ /dev/null @@ -1,383 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM vmscan - -#if !defined(_TRACE_VMSCAN_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_VMSCAN_H - -#include -#include -#include -#include -#include - -#define RECLAIM_WB_ANON 0x0001u -#define RECLAIM_WB_FILE 0x0002u -#define RECLAIM_WB_MIXED 0x0010u -#define RECLAIM_WB_SYNC 0x0004u /* Unused, all reclaim async */ -#define RECLAIM_WB_ASYNC 0x0008u - -#define show_reclaim_flags(flags) \ - (flags) ? __print_flags(flags, "|", \ - {RECLAIM_WB_ANON, "RECLAIM_WB_ANON"}, \ - {RECLAIM_WB_FILE, "RECLAIM_WB_FILE"}, \ - {RECLAIM_WB_MIXED, "RECLAIM_WB_MIXED"}, \ - {RECLAIM_WB_SYNC, "RECLAIM_WB_SYNC"}, \ - {RECLAIM_WB_ASYNC, "RECLAIM_WB_ASYNC"} \ - ) : "RECLAIM_WB_NONE" - -#define trace_reclaim_flags(page) ( \ - (page_is_file_cache(page) ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \ - (RECLAIM_WB_ASYNC) \ - ) - -#define trace_shrink_flags(file) \ - ( \ - (file ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \ - (RECLAIM_WB_ASYNC) \ - ) - -TRACE_EVENT(mm_vmscan_kswapd_sleep, - - TP_PROTO(int nid), - - TP_ARGS(nid), - - TP_STRUCT__entry( - __field( int, nid ) - ), - - TP_fast_assign( - __entry->nid = nid; - ), - - TP_printk("nid=%d", __entry->nid) -); - -TRACE_EVENT(mm_vmscan_kswapd_wake, - - TP_PROTO(int nid, int order), - - TP_ARGS(nid, order), - - TP_STRUCT__entry( - __field( int, nid ) - __field( int, order ) - ), - - TP_fast_assign( - __entry->nid = nid; - __entry->order = order; - ), - - TP_printk("nid=%d order=%d", __entry->nid, __entry->order) -); - -TRACE_EVENT(mm_vmscan_wakeup_kswapd, - - TP_PROTO(int nid, int zid, int order), - - TP_ARGS(nid, zid, order), - - TP_STRUCT__entry( - __field( int, nid ) - __field( int, zid ) - __field( int, order ) - ), - - TP_fast_assign( - __entry->nid = nid; - __entry->zid = zid; - __entry->order = order; - ), - - TP_printk("nid=%d zid=%d order=%d", - __entry->nid, - __entry->zid, - __entry->order) -); - -DECLARE_EVENT_CLASS(mm_vmscan_direct_reclaim_begin_template, - - TP_PROTO(int order, int may_writepage, gfp_t gfp_flags), - - TP_ARGS(order, may_writepage, gfp_flags), - - TP_STRUCT__entry( - __field( int, order ) - __field( int, may_writepage ) - __field( gfp_t, gfp_flags ) - ), - - TP_fast_assign( - __entry->order = order; - __entry->may_writepage = may_writepage; - __entry->gfp_flags = gfp_flags; - ), - - TP_printk("order=%d may_writepage=%d gfp_flags=%s", - __entry->order, - __entry->may_writepage, - show_gfp_flags(__entry->gfp_flags)) -); - -DEFINE_EVENT(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_direct_reclaim_begin, - - TP_PROTO(int order, int may_writepage, gfp_t gfp_flags), - - TP_ARGS(order, may_writepage, gfp_flags) -); - -DEFINE_EVENT(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_memcg_reclaim_begin, - - TP_PROTO(int order, int may_writepage, gfp_t gfp_flags), - - TP_ARGS(order, may_writepage, gfp_flags) -); - -DEFINE_EVENT(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_memcg_softlimit_reclaim_begin, - - TP_PROTO(int order, int may_writepage, gfp_t gfp_flags), - - TP_ARGS(order, may_writepage, gfp_flags) -); - -DECLARE_EVENT_CLASS(mm_vmscan_direct_reclaim_end_template, - - TP_PROTO(unsigned long nr_reclaimed), - - TP_ARGS(nr_reclaimed), - - TP_STRUCT__entry( - __field( unsigned long, nr_reclaimed ) - ), - - TP_fast_assign( - __entry->nr_reclaimed = nr_reclaimed; - ), - - TP_printk("nr_reclaimed=%lu", __entry->nr_reclaimed) -); - -DEFINE_EVENT(mm_vmscan_direct_reclaim_end_template, mm_vmscan_direct_reclaim_end, - - TP_PROTO(unsigned long nr_reclaimed), - - TP_ARGS(nr_reclaimed) -); - -DEFINE_EVENT(mm_vmscan_direct_reclaim_end_template, mm_vmscan_memcg_reclaim_end, - - TP_PROTO(unsigned long nr_reclaimed), - - TP_ARGS(nr_reclaimed) -); - -DEFINE_EVENT(mm_vmscan_direct_reclaim_end_template, mm_vmscan_memcg_softlimit_reclaim_end, - - TP_PROTO(unsigned long nr_reclaimed), - - TP_ARGS(nr_reclaimed) -); - -TRACE_EVENT(mm_shrink_slab_start, - TP_PROTO(struct shrinker *shr, struct shrink_control *sc, - long nr_objects_to_shrink, unsigned long pgs_scanned, - unsigned long lru_pgs, unsigned long cache_items, - unsigned long long delta, unsigned long total_scan), - - TP_ARGS(shr, sc, nr_objects_to_shrink, pgs_scanned, lru_pgs, - cache_items, delta, total_scan), - - TP_STRUCT__entry( - __field(struct shrinker *, shr) - __field(void *, shrink) - __field(long, nr_objects_to_shrink) - __field(gfp_t, gfp_flags) - __field(unsigned long, pgs_scanned) - __field(unsigned long, lru_pgs) - __field(unsigned long, cache_items) - __field(unsigned long long, delta) - __field(unsigned long, total_scan) - ), - - TP_fast_assign( - __entry->shr = shr; - __entry->shrink = shr->shrink; - __entry->nr_objects_to_shrink = nr_objects_to_shrink; - __entry->gfp_flags = sc->gfp_mask; - __entry->pgs_scanned = pgs_scanned; - __entry->lru_pgs = lru_pgs; - __entry->cache_items = cache_items; - __entry->delta = delta; - __entry->total_scan = total_scan; - ), - - TP_printk("%pF %p: objects to shrink %ld gfp_flags %s pgs_scanned %ld lru_pgs %ld cache items %ld delta %lld total_scan %ld", - __entry->shrink, - __entry->shr, - __entry->nr_objects_to_shrink, - show_gfp_flags(__entry->gfp_flags), - __entry->pgs_scanned, - __entry->lru_pgs, - __entry->cache_items, - __entry->delta, - __entry->total_scan) -); - -TRACE_EVENT(mm_shrink_slab_end, - TP_PROTO(struct shrinker *shr, int shrinker_retval, - long unused_scan_cnt, long new_scan_cnt), - - TP_ARGS(shr, shrinker_retval, unused_scan_cnt, new_scan_cnt), - - TP_STRUCT__entry( - __field(struct shrinker *, shr) - __field(void *, shrink) - __field(long, unused_scan) - __field(long, new_scan) - __field(int, retval) - __field(long, total_scan) - ), - - TP_fast_assign( - __entry->shr = shr; - __entry->shrink = shr->shrink; - __entry->unused_scan = unused_scan_cnt; - __entry->new_scan = new_scan_cnt; - __entry->retval = shrinker_retval; - __entry->total_scan = new_scan_cnt - unused_scan_cnt; - ), - - TP_printk("%pF %p: unused scan count %ld new scan count %ld total_scan %ld last shrinker return val %d", - __entry->shrink, - __entry->shr, - __entry->unused_scan, - __entry->new_scan, - __entry->total_scan, - __entry->retval) -); - -DECLARE_EVENT_CLASS(mm_vmscan_lru_isolate_template, - - TP_PROTO(int order, - unsigned long nr_requested, - unsigned long nr_scanned, - unsigned long nr_taken, - isolate_mode_t isolate_mode, - int file), - - TP_ARGS(order, nr_requested, nr_scanned, nr_taken, isolate_mode, file), - - TP_STRUCT__entry( - __field(int, order) - __field(unsigned long, nr_requested) - __field(unsigned long, nr_scanned) - __field(unsigned long, nr_taken) - __field(isolate_mode_t, isolate_mode) - __field(int, file) - ), - - TP_fast_assign( - __entry->order = order; - __entry->nr_requested = nr_requested; - __entry->nr_scanned = nr_scanned; - __entry->nr_taken = nr_taken; - __entry->isolate_mode = isolate_mode; - __entry->file = file; - ), - - TP_printk("isolate_mode=%d order=%d nr_requested=%lu nr_scanned=%lu nr_taken=%lu file=%d", - __entry->isolate_mode, - __entry->order, - __entry->nr_requested, - __entry->nr_scanned, - __entry->nr_taken, - __entry->file) -); - -DEFINE_EVENT(mm_vmscan_lru_isolate_template, mm_vmscan_lru_isolate, - - TP_PROTO(int order, - unsigned long nr_requested, - unsigned long nr_scanned, - unsigned long nr_taken, - isolate_mode_t isolate_mode, - int file), - - TP_ARGS(order, nr_requested, nr_scanned, nr_taken, isolate_mode, file) - -); - -DEFINE_EVENT(mm_vmscan_lru_isolate_template, mm_vmscan_memcg_isolate, - - TP_PROTO(int order, - unsigned long nr_requested, - unsigned long nr_scanned, - unsigned long nr_taken, - isolate_mode_t isolate_mode, - int file), - - TP_ARGS(order, nr_requested, nr_scanned, nr_taken, isolate_mode, file) - -); - -TRACE_EVENT(mm_vmscan_writepage, - - TP_PROTO(struct page *page, - int reclaim_flags), - - TP_ARGS(page, reclaim_flags), - - TP_STRUCT__entry( - __field(struct page *, page) - __field(int, reclaim_flags) - ), - - TP_fast_assign( - __entry->page = page; - __entry->reclaim_flags = reclaim_flags; - ), - - TP_printk("page=%p pfn=%lu flags=%s", - __entry->page, - page_to_pfn(__entry->page), - show_reclaim_flags(__entry->reclaim_flags)) -); - -TRACE_EVENT(mm_vmscan_lru_shrink_inactive, - - TP_PROTO(int nid, int zid, - unsigned long nr_scanned, unsigned long nr_reclaimed, - int priority, int reclaim_flags), - - TP_ARGS(nid, zid, nr_scanned, nr_reclaimed, priority, reclaim_flags), - - TP_STRUCT__entry( - __field(int, nid) - __field(int, zid) - __field(unsigned long, nr_scanned) - __field(unsigned long, nr_reclaimed) - __field(int, priority) - __field(int, reclaim_flags) - ), - - TP_fast_assign( - __entry->nid = nid; - __entry->zid = zid; - __entry->nr_scanned = nr_scanned; - __entry->nr_reclaimed = nr_reclaimed; - __entry->priority = priority; - __entry->reclaim_flags = reclaim_flags; - ), - - TP_printk("nid=%d zid=%d nr_scanned=%ld nr_reclaimed=%ld priority=%d flags=%s", - __entry->nid, __entry->zid, - __entry->nr_scanned, __entry->nr_reclaimed, - __entry->priority, - show_reclaim_flags(__entry->reclaim_flags)) -); - -#endif /* _TRACE_VMSCAN_H */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/workqueue.h b/instrumentation/events/mainline/workqueue.h deleted file mode 100644 index f28d1b65..00000000 --- a/instrumentation/events/mainline/workqueue.h +++ /dev/null @@ -1,121 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM workqueue - -#if !defined(_TRACE_WORKQUEUE_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_WORKQUEUE_H - -#include -#include - -DECLARE_EVENT_CLASS(workqueue_work, - - TP_PROTO(struct work_struct *work), - - TP_ARGS(work), - - TP_STRUCT__entry( - __field( void *, work ) - ), - - TP_fast_assign( - __entry->work = work; - ), - - TP_printk("work struct %p", __entry->work) -); - -/** - * workqueue_queue_work - called when a work gets queued - * @req_cpu: the requested cpu - * @cwq: pointer to struct cpu_workqueue_struct - * @work: pointer to struct work_struct - * - * This event occurs when a work is queued immediately or once a - * delayed work is actually queued on a workqueue (ie: once the delay - * has been reached). - */ -TRACE_EVENT(workqueue_queue_work, - - TP_PROTO(unsigned int req_cpu, struct cpu_workqueue_struct *cwq, - struct work_struct *work), - - TP_ARGS(req_cpu, cwq, work), - - TP_STRUCT__entry( - __field( void *, work ) - __field( void *, function) - __field( void *, workqueue) - __field( unsigned int, req_cpu ) - __field( unsigned int, cpu ) - ), - - TP_fast_assign( - __entry->work = work; - __entry->function = work->func; - __entry->workqueue = cwq->wq; - __entry->req_cpu = req_cpu; - __entry->cpu = cwq->pool->gcwq->cpu; - ), - - TP_printk("work struct=%p function=%pf workqueue=%p req_cpu=%u cpu=%u", - __entry->work, __entry->function, __entry->workqueue, - __entry->req_cpu, __entry->cpu) -); - -/** - * workqueue_activate_work - called when a work gets activated - * @work: pointer to struct work_struct - * - * This event occurs when a queued work is put on the active queue, - * which happens immediately after queueing unless @max_active limit - * is reached. - */ -DEFINE_EVENT(workqueue_work, workqueue_activate_work, - - TP_PROTO(struct work_struct *work), - - TP_ARGS(work) -); - -/** - * workqueue_execute_start - called immediately before the workqueue callback - * @work: pointer to struct work_struct - * - * Allows to track workqueue execution. - */ -TRACE_EVENT(workqueue_execute_start, - - TP_PROTO(struct work_struct *work), - - TP_ARGS(work), - - TP_STRUCT__entry( - __field( void *, work ) - __field( void *, function) - ), - - TP_fast_assign( - __entry->work = work; - __entry->function = work->func; - ), - - TP_printk("work struct %p: function %pf", __entry->work, __entry->function) -); - -/** - * workqueue_execute_end - called immediately after the workqueue callback - * @work: pointer to struct work_struct - * - * Allows to track workqueue execution. - */ -DEFINE_EVENT(workqueue_work, workqueue_execute_end, - - TP_PROTO(struct work_struct *work), - - TP_ARGS(work) -); - -#endif /* _TRACE_WORKQUEUE_H */ - -/* This part must be outside protection */ -#include diff --git a/instrumentation/events/mainline/writeback.h b/instrumentation/events/mainline/writeback.h deleted file mode 100644 index cee02d65..00000000 --- a/instrumentation/events/mainline/writeback.h +++ /dev/null @@ -1,604 +0,0 @@ -#undef TRACE_SYSTEM -#define TRACE_SYSTEM writeback - -#if !defined(_TRACE_WRITEBACK_H) || defined(TRACE_HEADER_MULTI_READ) -#define _TRACE_WRITEBACK_H - -#include -#include -#include - -#define show_inode_state(state) \ - __print_flags(state, "|", \ - {I_DIRTY_SYNC, "I_DIRTY_SYNC"}, \ - {I_DIRTY_DATASYNC, "I_DIRTY_DATASYNC"}, \ - {I_DIRTY_PAGES, "I_DIRTY_PAGES"}, \ - {I_NEW, "I_NEW"}, \ - {I_WILL_FREE, "I_WILL_FREE"}, \ - {I_FREEING, "I_FREEING"}, \ - {I_CLEAR, "I_CLEAR"}, \ - {I_SYNC, "I_SYNC"}, \ - {I_REFERENCED, "I_REFERENCED"} \ - ) - -#define WB_WORK_REASON \ - {WB_REASON_BACKGROUND, "background"}, \ - {WB_REASON_TRY_TO_FREE_PAGES, "try_to_free_pages"}, \ - {WB_REASON_SYNC, "sync"}, \ - {WB_REASON_PERIODIC, "periodic"}, \ - {WB_REASON_LAPTOP_TIMER, "laptop_timer"}, \ - {WB_REASON_FREE_MORE_MEM, "free_more_memory"}, \ - {WB_REASON_FS_FREE_SPACE, "fs_free_space"}, \ - {WB_REASON_FORKER_THREAD, "forker_thread"} - -struct wb_writeback_work; - -TRACE_EVENT(writeback_dirty_page, - - TP_PROTO(struct page *page, struct address_space *mapping), - - TP_ARGS(page, mapping), - - TP_STRUCT__entry ( - __array(char, name, 32) - __field(unsigned long, ino) - __field(pgoff_t, index) - ), - - TP_fast_assign( - strncpy(__entry->name, - mapping ? dev_name(mapping->backing_dev_info->dev) : "(unknown)", 32); - __entry->ino = mapping ? mapping->host->i_ino : 0; - __entry->index = page->index; - ), - - TP_printk("bdi %s: ino=%lu index=%lu", - __entry->name, - __entry->ino, - __entry->index - ) -); - -DECLARE_EVENT_CLASS(writeback_dirty_inode_template, - - TP_PROTO(struct inode *inode, int flags), - - TP_ARGS(inode, flags), - - TP_STRUCT__entry ( - __array(char, name, 32) - __field(unsigned long, ino) - __field(unsigned long, flags) - ), - - TP_fast_assign( - struct backing_dev_info *bdi = inode->i_mapping->backing_dev_info; - - /* may be called for files on pseudo FSes w/ unregistered bdi */ - strncpy(__entry->name, - bdi->dev ? dev_name(bdi->dev) : "(unknown)", 32); - __entry->ino = inode->i_ino; - __entry->flags = flags; - ), - - TP_printk("bdi %s: ino=%lu flags=%s", - __entry->name, - __entry->ino, - show_inode_state(__entry->flags) - ) -); - -DEFINE_EVENT(writeback_dirty_inode_template, writeback_dirty_inode_start, - - TP_PROTO(struct inode *inode, int flags), - - TP_ARGS(inode, flags) -); - -DEFINE_EVENT(writeback_dirty_inode_template, writeback_dirty_inode, - - TP_PROTO(struct inode *inode, int flags), - - TP_ARGS(inode, flags) -); - -DECLARE_EVENT_CLASS(writeback_write_inode_template, - - TP_PROTO(struct inode *inode, struct writeback_control *wbc), - - TP_ARGS(inode, wbc), - - TP_STRUCT__entry ( - __array(char, name, 32) - __field(unsigned long, ino) - __field(int, sync_mode) - ), - - TP_fast_assign( - strncpy(__entry->name, - dev_name(inode->i_mapping->backing_dev_info->dev), 32); - __entry->ino = inode->i_ino; - __entry->sync_mode = wbc->sync_mode; - ), - - TP_printk("bdi %s: ino=%lu sync_mode=%d", - __entry->name, - __entry->ino, - __entry->sync_mode - ) -); - -DEFINE_EVENT(writeback_write_inode_template, writeback_write_inode_start, - - TP_PROTO(struct inode *inode, struct writeback_control *wbc), - - TP_ARGS(inode, wbc) -); - -DEFINE_EVENT(writeback_write_inode_template, writeback_write_inode, - - TP_PROTO(struct inode *inode, struct writeback_control *wbc), - - TP_ARGS(inode, wbc) -); - -DECLARE_EVENT_CLASS(writeback_work_class, - TP_PROTO(struct backing_dev_info *bdi, struct wb_writeback_work *work), - TP_ARGS(bdi, work), - TP_STRUCT__entry( - __array(char, name, 32) - __field(long, nr_pages) - __field(dev_t, sb_dev) - __field(int, sync_mode) - __field(int, for_kupdate) - __field(int, range_cyclic) - __field(int, for_background) - __field(int, reason) - ), - TP_fast_assign( - struct device *dev = bdi->dev; - if (!dev) - dev = default_backing_dev_info.dev; - strncpy(__entry->name, dev_name(dev), 32); - __entry->nr_pages = work->nr_pages; - __entry->sb_dev = work->sb ? work->sb->s_dev : 0; - __entry->sync_mode = work->sync_mode; - __entry->for_kupdate = work->for_kupdate; - __entry->range_cyclic = work->range_cyclic; - __entry->for_background = work->for_background; - __entry->reason = work->reason; - ), - TP_printk("bdi %s: sb_dev %d:%d nr_pages=%ld sync_mode=%d " - "kupdate=%d range_cyclic=%d background=%d reason=%s", - __entry->name, - MAJOR(__entry->sb_dev), MINOR(__entry->sb_dev), - __entry->nr_pages, - __entry->sync_mode, - __entry->for_kupdate, - __entry->range_cyclic, - __entry->for_background, - __print_symbolic(__entry->reason, WB_WORK_REASON) - ) -); -#define DEFINE_WRITEBACK_WORK_EVENT(name) \ -DEFINE_EVENT(writeback_work_class, name, \ - TP_PROTO(struct backing_dev_info *bdi, struct wb_writeback_work *work), \ - TP_ARGS(bdi, work)) -DEFINE_WRITEBACK_WORK_EVENT(writeback_queue); -DEFINE_WRITEBACK_WORK_EVENT(writeback_exec); -DEFINE_WRITEBACK_WORK_EVENT(writeback_start); -DEFINE_WRITEBACK_WORK_EVENT(writeback_written); -DEFINE_WRITEBACK_WORK_EVENT(writeback_wait); - -TRACE_EVENT(writeback_pages_written, - TP_PROTO(long pages_written), - TP_ARGS(pages_written), - TP_STRUCT__entry( - __field(long, pages) - ), - TP_fast_assign( - __entry->pages = pages_written; - ), - TP_printk("%ld", __entry->pages) -); - -DECLARE_EVENT_CLASS(writeback_class, - TP_PROTO(struct backing_dev_info *bdi), - TP_ARGS(bdi), - TP_STRUCT__entry( - __array(char, name, 32) - ), - TP_fast_assign( - strncpy(__entry->name, dev_name(bdi->dev), 32); - ), - TP_printk("bdi %s", - __entry->name - ) -); -#define DEFINE_WRITEBACK_EVENT(name) \ -DEFINE_EVENT(writeback_class, name, \ - TP_PROTO(struct backing_dev_info *bdi), \ - TP_ARGS(bdi)) - -DEFINE_WRITEBACK_EVENT(writeback_nowork); -DEFINE_WRITEBACK_EVENT(writeback_wake_background); -DEFINE_WRITEBACK_EVENT(writeback_bdi_register); -DEFINE_WRITEBACK_EVENT(writeback_bdi_unregister); - -DECLARE_EVENT_CLASS(wbc_class, - TP_PROTO(struct writeback_control *wbc, struct backing_dev_info *bdi), - TP_ARGS(wbc, bdi), - TP_STRUCT__entry( - __array(char, name, 32) - __field(long, nr_to_write) - __field(long, pages_skipped) - __field(int, sync_mode) - __field(int, for_kupdate) - __field(int, for_background) - __field(int, for_reclaim) - __field(int, range_cyclic) - __field(long, range_start) - __field(long, range_end) - ), - - TP_fast_assign( - strncpy(__entry->name, dev_name(bdi->dev), 32); - __entry->nr_to_write = wbc->nr_to_write; - __entry->pages_skipped = wbc->pages_skipped; - __entry->sync_mode = wbc->sync_mode; - __entry->for_kupdate = wbc->for_kupdate; - __entry->for_background = wbc->for_background; - __entry->for_reclaim = wbc->for_reclaim; - __entry->range_cyclic = wbc->range_cyclic; - __entry->range_start = (long)wbc->range_start; - __entry->range_end = (long)wbc->range_end; - ), - - TP_printk("bdi %s: towrt=%ld skip=%ld mode=%d kupd=%d " - "bgrd=%d reclm=%d cyclic=%d " - "start=0x%lx end=0x%lx", - __entry->name, - __entry->nr_to_write, - __entry->pages_skipped, - __entry->sync_mode, - __entry->for_kupdate, - __entry->for_background, - __entry->for_reclaim, - __entry->range_cyclic, - __entry->range_start, - __entry->range_end) -) - -#define DEFINE_WBC_EVENT(name) \ -DEFINE_EVENT(wbc_class, name, \ - TP_PROTO(struct writeback_control *wbc, struct backing_dev_info *bdi), \ - TP_ARGS(wbc, bdi)) -DEFINE_WBC_EVENT(wbc_writepage); - -TRACE_EVENT(writeback_queue_io, - TP_PROTO(struct bdi_writeback *wb, - struct wb_writeback_work *work, - int moved), - TP_ARGS(wb, work, moved), - TP_STRUCT__entry( - __array(char, name, 32) - __field(unsigned long, older) - __field(long, age) - __field(int, moved) - __field(int, reason) - ), - TP_fast_assign( - unsigned long *older_than_this = work->older_than_this; - strncpy(__entry->name, dev_name(wb->bdi->dev), 32); - __entry->older = older_than_this ? *older_than_this : 0; - __entry->age = older_than_this ? - (jiffies - *older_than_this) * 1000 / HZ : -1; - __entry->moved = moved; - __entry->reason = work->reason; - ), - TP_printk("bdi %s: older=%lu age=%ld enqueue=%d reason=%s", - __entry->name, - __entry->older, /* older_than_this in jiffies */ - __entry->age, /* older_than_this in relative milliseconds */ - __entry->moved, - __print_symbolic(__entry->reason, WB_WORK_REASON) - ) -); - -TRACE_EVENT(global_dirty_state, - - TP_PROTO(unsigned long background_thresh, - unsigned long dirty_thresh - ), - - TP_ARGS(background_thresh, - dirty_thresh - ), - - TP_STRUCT__entry( - __field(unsigned long, nr_dirty) - __field(unsigned long, nr_writeback) - __field(unsigned long, nr_unstable) - __field(unsigned long, background_thresh) - __field(unsigned long, dirty_thresh) - __field(unsigned long, dirty_limit) - __field(unsigned long, nr_dirtied) - __field(unsigned long, nr_written) - ), - - TP_fast_assign( - __entry->nr_dirty = global_page_state(NR_FILE_DIRTY); - __entry->nr_writeback = global_page_state(NR_WRITEBACK); - __entry->nr_unstable = global_page_state(NR_UNSTABLE_NFS); - __entry->nr_dirtied = global_page_state(NR_DIRTIED); - __entry->nr_written = global_page_state(NR_WRITTEN); - __entry->background_thresh = background_thresh; - __entry->dirty_thresh = dirty_thresh; - __entry->dirty_limit = global_dirty_limit; - ), - - TP_printk("dirty=%lu writeback=%lu unstable=%lu " - "bg_thresh=%lu thresh=%lu limit=%lu " - "dirtied=%lu written=%lu", - __entry->nr_dirty, - __entry->nr_writeback, - __entry->nr_unstable, - __entry->background_thresh, - __entry->dirty_thresh, - __entry->dirty_limit, - __entry->nr_dirtied, - __entry->nr_written - ) -); - -#define KBps(x) ((x) << (PAGE_SHIFT - 10)) - -TRACE_EVENT(bdi_dirty_ratelimit, - - TP_PROTO(struct backing_dev_info *bdi, - unsigned long dirty_rate, - unsigned long task_ratelimit), - - TP_ARGS(bdi, dirty_rate, task_ratelimit), - - TP_STRUCT__entry( - __array(char, bdi, 32) - __field(unsigned long, write_bw) - __field(unsigned long, avg_write_bw) - __field(unsigned long, dirty_rate) - __field(unsigned long, dirty_ratelimit) - __field(unsigned long, task_ratelimit) - __field(unsigned long, balanced_dirty_ratelimit) - ), - - TP_fast_assign( - strlcpy(__entry->bdi, dev_name(bdi->dev), 32); - __entry->write_bw = KBps(bdi->write_bandwidth); - __entry->avg_write_bw = KBps(bdi->avg_write_bandwidth); - __entry->dirty_rate = KBps(dirty_rate); - __entry->dirty_ratelimit = KBps(bdi->dirty_ratelimit); - __entry->task_ratelimit = KBps(task_ratelimit); - __entry->balanced_dirty_ratelimit = - KBps(bdi->balanced_dirty_ratelimit); - ), - - TP_printk("bdi %s: " - "write_bw=%lu awrite_bw=%lu dirty_rate=%lu " - "dirty_ratelimit=%lu task_ratelimit=%lu " - "balanced_dirty_ratelimit=%lu", - __entry->bdi, - __entry->write_bw, /* write bandwidth */ - __entry->avg_write_bw, /* avg write bandwidth */ - __entry->dirty_rate, /* bdi dirty rate */ - __entry->dirty_ratelimit, /* base ratelimit */ - __entry->task_ratelimit, /* ratelimit with position control */ - __entry->balanced_dirty_ratelimit /* the balanced ratelimit */ - ) -); - -TRACE_EVENT(balance_dirty_pages, - - TP_PROTO(struct backing_dev_info *bdi, - unsigned long thresh, - unsigned long bg_thresh, - unsigned long dirty, - unsigned long bdi_thresh, - unsigned long bdi_dirty, - unsigned long dirty_ratelimit, - unsigned long task_ratelimit, - unsigned long dirtied, - unsigned long period, - long pause, - unsigned long start_time), - - TP_ARGS(bdi, thresh, bg_thresh, dirty, bdi_thresh, bdi_dirty, - dirty_ratelimit, task_ratelimit, - dirtied, period, pause, start_time), - - TP_STRUCT__entry( - __array( char, bdi, 32) - __field(unsigned long, limit) - __field(unsigned long, setpoint) - __field(unsigned long, dirty) - __field(unsigned long, bdi_setpoint) - __field(unsigned long, bdi_dirty) - __field(unsigned long, dirty_ratelimit) - __field(unsigned long, task_ratelimit) - __field(unsigned int, dirtied) - __field(unsigned int, dirtied_pause) - __field(unsigned long, paused) - __field( long, pause) - __field(unsigned long, period) - __field( long, think) - ), - - TP_fast_assign( - unsigned long freerun = (thresh + bg_thresh) / 2; - strlcpy(__entry->bdi, dev_name(bdi->dev), 32); - - __entry->limit = global_dirty_limit; - __entry->setpoint = (global_dirty_limit + freerun) / 2; - __entry->dirty = dirty; - __entry->bdi_setpoint = __entry->setpoint * - bdi_thresh / (thresh + 1); - __entry->bdi_dirty = bdi_dirty; - __entry->dirty_ratelimit = KBps(dirty_ratelimit); - __entry->task_ratelimit = KBps(task_ratelimit); - __entry->dirtied = dirtied; - __entry->dirtied_pause = current->nr_dirtied_pause; - __entry->think = current->dirty_paused_when == 0 ? 0 : - (long)(jiffies - current->dirty_paused_when) * 1000/HZ; - __entry->period = period * 1000 / HZ; - __entry->pause = pause * 1000 / HZ; - __entry->paused = (jiffies - start_time) * 1000 / HZ; - ), - - - TP_printk("bdi %s: " - "limit=%lu setpoint=%lu dirty=%lu " - "bdi_setpoint=%lu bdi_dirty=%lu " - "dirty_ratelimit=%lu task_ratelimit=%lu " - "dirtied=%u dirtied_pause=%u " - "paused=%lu pause=%ld period=%lu think=%ld", - __entry->bdi, - __entry->limit, - __entry->setpoint, - __entry->dirty, - __entry->bdi_setpoint, - __entry->bdi_dirty, - __entry->dirty_ratelimit, - __entry->task_ratelimit, - __entry->dirtied, - __entry->dirtied_pause, - __entry->paused, /* ms */ - __entry->pause, /* ms */ - __entry->period, /* ms */ - __entry->think /* ms */ - ) -); - -TRACE_EVENT(writeback_sb_inodes_requeue, - - TP_PROTO(struct inode *inode), - TP_ARGS(inode), - - TP_STRUCT__entry( - __array(char, name, 32) - __field(unsigned long, ino) - __field(unsigned long, state) - __field(unsigned long, dirtied_when) - ), - - TP_fast_assign( - strncpy(__entry->name, - dev_name(inode_to_bdi(inode)->dev), 32); - __entry->ino = inode->i_ino; - __entry->state = inode->i_state; - __entry->dirtied_when = inode->dirtied_when; - ), - - TP_printk("bdi %s: ino=%lu state=%s dirtied_when=%lu age=%lu", - __entry->name, - __entry->ino, - show_inode_state(__entry->state), - __entry->dirtied_when, - (jiffies - __entry->dirtied_when) / HZ - ) -); - -DECLARE_EVENT_CLASS(writeback_congest_waited_template, - - TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed), - - TP_ARGS(usec_timeout, usec_delayed), - - TP_STRUCT__entry( - __field( unsigned int, usec_timeout ) - __field( unsigned int, usec_delayed ) - ), - - TP_fast_assign( - __entry->usec_timeout = usec_timeout; - __entry->usec_delayed = usec_delayed; - ), - - TP_printk("usec_timeout=%u usec_delayed=%u", - __entry->usec_timeout, - __entry->usec_delayed) -); - -DEFINE_EVENT(writeback_congest_waited_template, writeback_congestion_wait, - - TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed), - - TP_ARGS(usec_timeout, usec_delayed) -); - -DEFINE_EVENT(writeback_congest_waited_template, writeback_wait_iff_congested, - - TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed), - - TP_ARGS(usec_timeout, usec_delayed) -); - -DECLARE_EVENT_CLASS(writeback_single_inode_template, - - TP_PROTO(struct inode *inode, - struct writeback_control *wbc, - unsigned long nr_to_write - ), - - TP_ARGS(inode, wbc, nr_to_write), - - TP_STRUCT__entry( - __array(char, name, 32) - __field(unsigned long, ino) - __field(unsigned long, state) - __field(unsigned long, dirtied_when) - __field(unsigned long, writeback_index) - __field(long, nr_to_write) - __field(unsigned long, wrote) - ), - - TP_fast_assign( - strncpy(__entry->name, - dev_name(inode_to_bdi(inode)->dev), 32); - __entry->ino = inode->i_ino; - __entry->state = inode->i_state; - __entry->dirtied_when = inode->dirtied_when; - __entry->writeback_index = inode->i_mapping->writeback_index; - __entry->nr_to_write = nr_to_write; - __entry->wrote = nr_to_write - wbc->nr_to_write; - ), - - TP_printk("bdi %s: ino=%lu state=%s dirtied_when=%lu age=%lu " - "index=%lu to_write=%ld wrote=%lu", - __entry->name, - __entry->ino, - show_inode_state(__entry->state), - __entry->dirtied_when, - (jiffies - __entry->dirtied_when) / HZ, - __entry->writeback_index, - __entry->nr_to_write, - __entry->wrote - ) -); - -DEFINE_EVENT(writeback_single_inode_template, writeback_single_inode_start, - TP_PROTO(struct inode *inode, - struct writeback_control *wbc, - unsigned long nr_to_write), - TP_ARGS(inode, wbc, nr_to_write) -); - -DEFINE_EVENT(writeback_single_inode_template, writeback_single_inode, - TP_PROTO(struct inode *inode, - struct writeback_control *wbc, - unsigned long nr_to_write), - TP_ARGS(inode, wbc, nr_to_write) -); - -#endif /* _TRACE_WRITEBACK_H */ - -/* This part must be outside protection */ -#include