LTTng for Xenomai
Subsystems (3)
PATCH 1/1 LTTng for Xenomai
[Steven, I promised you this tool earlier, and now it runs. It /may/ help to understand some of your problems, at least it should give an overview of your schedule...]
This is an update on how to get latest LTTng running with latest Xenomai!
For those who don't know what I'm talking about: LTTng [1] is an event tracing framework for Linux. It is fairly light-weight during runtime, its hooks into interesting spots of the system can easily be turned to (almost) zero-overhead stubs when disabled. When enabled, the recorded events are written to a log file and can later be analyzed with the help of LTTV [1], a textual or graphical trace viewer.
Xenomai 2.4 already comes with the required instrumentation, all you additionally need is a (fitting) set of LTTng patches + some minor adjustments for the I-pipe environment.
This is what to do in order to marry LTTng with an I-pipe 2.6.24 kernel:
- Download patch-2.6.24-lttng-0.10-pre43.tar.bz2 from [1]
- Unpack it, move its folder as "patches" in your Xenomai/I-pipe kernel source tree
- Copy the attached files into that "patches" folder as well
- Use quilt to apply all required patches to your kernel (if ipipe was already applied, comment out the first line in "series")
- Run prepare-kernel.sh if not done yet
- Enable LTT in your config, rebuild, install, and boot the kernel
To use LTTng, you need the control tools (currently ltt-control-0.47) and the related viewer (lttv-0.10.0-pre10 for this combination). Build and install both.
Now on your target, run the following to enable LTTng tracing:
1. ltt-armall
2. lttctl -n trace -d -l /sys/kernel/debug/ltt -t /path/to/your/trace
After running your application, stop the trace and dump it
1. lttctl -n trace -R
2. lttv -m textDump -t /path/to/your/trace
(or use lttv-gui, but text dumps are IMO easier to browse at the
moment)
I'm looking forward to feedback and hope some of you gain interesting insights into their systems. Feel free to share your findings here and discus them with us - we may all benefit from this. :)
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux
--- arch/x86/kernel/Makefile_64 | 2 include/linux/kernel.h | 1 kernel/exit.c | 1 kernel/sched.c | 63 ------------------------- mm/memory.c | 108 -------------------------------------------- 5 files changed, 175 deletions(-)
mm/memory.c +0 -108
@@ -50,7 +50,6 @@#include <linux/delayacct.h> #include <linux/init.h> #include <linux/writeback.h> -#include <linux/vmalloc.h> #include <asm/pgalloc.h> #include <asm/uaccess.h>
@@ -2799,110 +2798,3 @@ int access_process_vm(struct task_structreturn buf - old_buf; } - -#ifdef CONFIG_IPIPE - -static inline int ipipe_pin_pte_range (struct mm_struct *mm,pmd_t *pmd, -struct vm_area_struct *vma, -unsigned long addr,unsigned long end) -{ -spinlock_t *ptl; -pte_t *pte; - -do { - pte =pte_offset_map_lock (mm, pmd, addr, &ptl); -if (!pte) -continue ; - -if (!pte_present (*pte)) { -pte_unmap_unlock (pte, ptl); -continue ; - } - -if (do_wp_page (mm, vma, addr, pte, pmd, ptl, *pte) ==VM_FAULT_OOM ) -return -ENOMEM ; - }while (addr +=PAGE_SIZE , addr != end); -return 0 ; -} - -static inline int ipipe_pin_pmd_range (struct mm_struct *mm,pud_t *pud, -struct vm_area_struct *vma, -unsigned long addr,unsigned long end) -{ -unsigned long next; -pmd_t *pmd; - - pmd =pmd_offset (pud, addr); -do { - next =pmd_addr_end (addr, end); -if (pmd_none_or_clear_bad (pmd)) -continue ; -if (ipipe_pin_pte_range (mm, pmd, vma, addr, next)) -return -ENOMEM ; - }while (pmd++, addr = next, addr != end); -return 0 ; -} - -static inline int ipipe_pin_pud_range (struct mm_struct *mm,pgd_t *pgd, -struct vm_area_struct *vma, -unsigned long addr,unsigned long end) -{ -unsigned long next; -pud_t *pud; - - pud =pud_offset (pgd, addr); -do { - next =pud_addr_end (addr, end); -if (pud_none_or_clear_bad (pud)) -continue ; -if (ipipe_pin_pmd_range (mm, pud, vma, addr, next)) -return -ENOMEM ; - }while (pud++, addr = next, addr != end); -return 0 ; -} - -int ipipe_disable_ondemand_mappings (struct task_struct *tsk) -{ -unsigned long addr, next, end; -struct vm_area_struct *vma; -struct mm_struct *mm; -int result =0 ; -pgd_t *pgd; - - mm =get_task_mm (tsk); -if (!mm) -return -EPERM ; - -down_write (&mm->mmap_sem); -if (mm->def_flags &VM_PINNED ) - goto done_mm; - -for (vma = mm->mmap; vma; vma = vma->vm_next) { -if (!is_cow_mapping (vma->vm_flags)) -continue ; - - addr = vma->vm_start; - end = vma->vm_end; - - pgd =pgd_offset (mm, addr); -do { - next =pgd_addr_end (addr, end); -if (pgd_none_or_clear_bad (pgd)) -continue ; -if (ipipe_pin_pud_range (mm, pgd, vma, addr, next)) { - result = -ENOMEM ; - goto done_mm; - } - }while (pgd++, addr = next, addr != end); - } - mm->def_flags |=VM_PINNED ; - - done_mm: -up_write (&mm->mmap_sem); -mmput (mm); -return result; -} - -EXPORT_SYMBOL (ipipe_disable_ondemand_mappings); - -#endif
arch/x86/kernel/Makefile_64 +0 -2
@@ -35,8 +35,6 @@ obj-$(CONFIG_X86_PM_TIMER) += pmtimer_64 obj-$(CONFIG_X86_VSMP) += vsmp_64.o obj-$(CONFIG_K8_NB) += k8.o obj-$(CONFIG_AUDIT) += audit_64.o -obj-$(CONFIG_IPIPE) += ipipe.o -obj-$(CONFIG_IPIPE_TRACE_MCOUNT) += mcount_64.o obj-$(CONFIG_MODULES) += module_64.o obj-$(CONFIG_PCI) += early-quirks.o
include/linux/kernel.h +0 -1
@@ -14,7 +14,6 @@#include <linux/compiler.h> #include <linux/bitops.h> #include <linux/log2.h> -#include <linux/ipipe_base.h> #include <asm/byteorder.h> #include <asm/bug.h>
kernel/exit.c +0 -1
@@ -994,7 +994,6 @@ fastcall NORET_TYPE void do_exit(long coif (group_dead)acct_process (); -ipipe_exit_notify (tsk);exit_sem (tsk);__exit_files (tsk);__exit_fs (tsk);
kernel/sched.c +0 -63
66 lines not on this page · raw message
--- arch/x86/kernel/Makefile_64 | 2 arch/x86/kernel/ipipe.c | 5 -- include/linux/ipipe.h | 3 - include/linux/kernel.h | 1 kernel/exit.c | 1 kernel/marker.c | 12 ++-- kernel/sched.c | 63 +++++++++++++++++++++++++ ltt/ltt-relay.c | 2 ltt/ltt-serialize.c | 12 ++-- mm/memory.c | 108 ++++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 191 insertions(+), 18 deletions(-)
arch/x86/kernel/Makefile_64 +2 -0
@@ -36,6 +36,8 @@ obj-$(CONFIG_X86_VSMP) += vsmp_64.o obj-$(CONFIG_K8_NB) += k8.o obj-$(CONFIG_AUDIT) += audit_64.o obj-$(CONFIG_IMMEDIATE) += immediate.o +obj-$(CONFIG_IPIPE) += ipipe.o +obj-$(CONFIG_IPIPE_TRACE_MCOUNT) += mcount_64.o obj-$(CONFIG_MODULES) += module_64.o obj-$(CONFIG_PCI) += early-quirks.o
arch/x86/kernel/ipipe.c +0 -5
@@ -999,7 +999,6 @@ int __ipipe_check_tickdev(const char *deEXPORT_SYMBOL (__ipipe_tick_irq); -EXPORT_SYMBOL_GPL (irq_desc);struct task_struct *__switch_to (struct task_struct *prev_p,struct task_struct *next_p);EXPORT_SYMBOL_GPL (__switch_to);
@@ -1013,7 +1012,3 @@ EXPORT_PER_CPU_SYMBOL_GPL(cpu_tlbstate);#else /* !CONFIG_X86_32 */ EXPORT_SYMBOL_GPL (cpu_gdt_descr);#endif /* !CONFIG_X86_32 */ - -#if defined(CONFIG_SMP ) || defined(CONFIG_DEBUG_SPINLOCK ) -EXPORT_SYMBOL (tasklist_lock); -#endif /* CONFIG_SMP || CONFIG_DEBUG_SPINLOCK */
include/linux/ipipe.h +2 -1
@@ -544,7 +544,8 @@ void ipipe_set_kgdb_irq(int irq, int (*h#define ipipe_irq_unlock (irq) do { } while(0)#define ipipe_root_domain_p 1 -#define ipipe_safe_current current +#define ipipe_processor_id () smp_processor_id() +#define ipipe_safe_current () current#define local_irq_disable_head () local_irq_disable()
include/linux/kernel.h +1 -0
@@ -15,6 +15,7 @@#include <linux/bitops.h> #include <linux/log2.h> #include <linux/marker.h> +#include <linux/ipipe_base.h> #include <asm/byteorder.h> #include <asm/bug.h>
kernel/exit.c +1 -0
@@ -1000,6 +1000,7 @@ fastcall NORET_TYPE void do_exit(long coacct_process ();trace_mark (kernel_process_exit,"pid %d" , tsk->pid); +ipipe_exit_notify (tsk);exit_sem (tsk);__exit_files (tsk);__exit_fs (tsk);
kernel/sched.c +63 -0
66 lines not on this page · raw message
ltt/ltt-relay.c +1 -1
@@ -1012,7 +1012,7 @@ static void *ltt_relay_reserve_slot(stru/* * Perform retryable operations. */ -if (ltt_nesting[smp_processor_id ()] >4 ) { +if (ltt_nesting[ipipe_processor_id ()] >4 ) {local_inc (<t_buf->events_lost);return NULL ; }
ltt/ltt-serialize.c +7 -5
@@ -15,6 +15,7 @@#include <linux/ctype.h> #include <linux/string.h> #include <linux/module.h> +#include <linux/ipipe_base.h> #include <linux/ltt-tracer.h> enum ltt_type {
@@ -625,6 +626,7 @@ void ltt_vtrace(void *probe_data, void *u32 compact_data =0 ;void *serialize_private =NULL ;int cpu; +unsigned long irqflags; pdata = (struct ltt_active_marker *)probe_data;if (unlikely (private_data && private_data->id <MARKER_CORE_IDS ))
@@ -641,13 +643,13 @@ void ltt_vtrace(void *probe_data, void * && (!private_data || !private_data->force))) return; -preempt_disable (); +ipipe_preempt_disable (irqflags);if (likely (!private_data || !private_data->force || private_data->cpu ==-1 )) - cpu =smp_processor_id (); + cpu =ipipe_processor_id ();else cpu = private_data->cpu; - ltt_nesting[smp_processor_id ()]++; + ltt_nesting[ipipe_processor_id ()]++;if (unlikely (private_data && private_data->trace)) dest_trace = private_data->trace;
@@ -707,8 +709,8 @@ void ltt_vtrace(void *probe_data, void */* Out-of-order commit */ ltt_commit_slot (channel, &transport_data, buffer, slot_size); } - ltt_nesting[smp_processor_id ()]--; -preempt_enable (); + ltt_nesting[ipipe_processor_id ()]--; +ipipe_preempt_enable (irqflags); }EXPORT_SYMBOL_GPL (ltt_vtrace);
mm/memory.c +108 -0
117 lines not on this page · raw message
kernel/marker.c +6 -6
@@ -103,14 +103,14 @@ void marker_probe_cb(const struct marker {va_list args;char ptype; +unsigned long irqflags;/* * rcu_read_lock does two things : disabling preemption to make sure the * teardown of the callbacks can be done correctly when they are in * modules and they insure RCU read coherency. */ -rcu_read_lock (); -preempt_disable (); +ipipe_preempt_disable (irqflags); ptype = mdata->ptype;if (likely (!ptype)) {marker_probe_func *func;
@@ -143,8 +143,7 @@ void marker_probe_cb(const struct markerva_end (args); } } -preempt_enable (); -rcu_read_unlock (); +ipipe_preempt_enable (irqflags); }EXPORT_SYMBOL_GPL (marker_probe_cb);
@@ -162,8 +161,9 @@ void marker_probe_cb_noarg(const struct {va_list args;/* not initialized */ char ptype; +unsigned long irqflags; -preempt_disable (); +ipipe_preempt_disable (irqflags); ptype = mdata->ptype;if (likely (!ptype)) {marker_probe_func *func;
@@ -191,7 +191,7 @@ void marker_probe_cb_noarg(const struct multi[i].func (multi[i].probe_private, call_private, fmt, &args); } -preempt_enable (); +ipipe_preempt_enable (irqflags); }EXPORT_SYMBOL_GPL (marker_probe_cb_noarg);
adeos-ipipe-2.6.24-x86-2.0-03.patch
prepare-lttng.patch
markers-support-for-proprietary-modules.patch fix-arm-to-play-nicely-with-generic-instrumentation-menu.patch # to test and send to mm #folded. fix-ARMv6-oprofile-support.patch #submitted for 2.6.24
#merged by Linus fix-blackfin-oprofile-support.patch
# BEGIN SUBMITTED
#
# cmpxchg_local and cmpxchg64_local standardization #SUBMITTED TO ANDREW add-cmpxchg-local-to-generic-for-up.patch i386-cmpxchg64-80386-80486-fallback.patch add-cmpxchg64-to-alpha.patch add-cmpxchg64-to-mips.patch add-cmpxchg64-to-powerpc.patch add-cmpxchg64-to-x86_64.patch # add-cmpxchg-local-to-arm.patch add-cmpxchg-local-to-avr32.patch add-cmpxchg-local-to-blackfin.patch add-cmpxchg-local-to-cris.patch add-cmpxchg-local-to-frv.patch add-cmpxchg-local-to-h8300.patch add-cmpxchg-local-to-ia64.patch add-cmpxchg-local-to-m32r.patch fix-m32r-__xchg.patch fix-m32r-include-sched-h-in-smpboot.patch local_t_m32r_optimized.patch add-cmpxchg-local-to-m68k.patch add-cmpxchg-local-to-m68knommu.patch add-cmpxchg-local-to-parisc.patch add-cmpxchg-local-to-ppc.patch add-cmpxchg-local-to-s390.patch add-cmpxchg-local-to-sh.patch add-cmpxchg-local-to-sh64.patch add-cmpxchg-local-to-sparc.patch add-cmpxchg-local-to-sparc64.patch add-cmpxchg-local-to-v850.patch add-cmpxchg-local-to-xtensa.patch # #in -mm markers-support-multiple-probes.patch #in -mm linux-kernel-markers-create-modpost-file.patch # # instrumentation menu removal #From Haavard avr32-kconfig-instr.patch avr32-kconfig-instr2.patch #for -mm add-kconfig-to-arch.patch #repost after ARM fix. add-have-oprofile.patch #repost after ARM fix. add-have-kprobes.patch #repost after ARM fix. move-kconfig-instrumentation-to-arch.patch #to repost # #Markers updates # ## END SUBMITTED # ### RFC # BEGIN SUBMITTED #Text Edit Lock #TO REPOST for -mm kprobes-use-mutex-for-insn-pages.patch kprobes-dont-use-kprobes-mutex-in-arch-code.patch kprobes-declare-kprobes-mutex-static.patch declare-array.patch #TO REMOVE text-edit-lock-architecture-independent-code.patch text-edit-lock-alternative-i386-and-x86_64.patch text-edit-lock-kprobes-architecture-independent.patch text-edit-lock-kprobes-i386.patch text-edit-lock-kprobes-x86_64.patch text-edit-lock-i386-standardize-debug-rodata.patch text-edit-lock-x86_64-standardize-debug-rodata.patch # #Immediate Values #TO REPOST for -mm immediate-values-architecture-independent-code.patch immediate-values-kconfig-embedded.patch add-x86-asm-asm-h.patch immediate-values-x86-optimization.patch add-text-poke-to-powerpc.patch immediate-values-powerpc-optimization.patch immediate-values-documentation.patch # profiling-use-immediate-values.patch # #Kallsyms weak symbols fix #To be posted by the author kallsyms-non-weak.patch # immediate-values-move-kprobes-x86-restore-interrupt-to-kdebug-h.patch add-discard-section-to-x86.patch immediate-values-x86-optimization-nmi-mce-support.patch immediate-values-powerpc-optimization-nmi-mce-support.patch immediate-values-use-arch-nmi-mce-support.patch linux-kernel-markers-immediate-values.patch # #NEVER submit as-is. Need to add #include <linux/marker.h> everywhere. lttng-instrument-kernelh.patch # NOT FOR UPSTREAM # lttng-instrumentation-fs.patch lttng-instrumentation-ipc.patch lttng-instrumentation-kernel.patch lttng-instrumentation-mm.patch lttng-instrumentation-net.patch add-markers-into-semaphore-primitives.patch # # END SUBMITTED # #kernel trace thread flag : required for arch-dependent syscall entry/exit #instrumentation. lttng-kernel-trace-thread-flag-alpha.patch lttng-kernel-trace-thread-flag-arm.patch lttng-kernel-trace-thread-flag-avr32.patch lttng-kernel-trace-thread-flag-blackfin.patch lttng-kernel-trace-thread-flag-cris.patch lttng-kernel-trace-thread-flag-frv.patch lttng-kernel-trace-thread-flag-h8300.patch lttng-kernel-trace-thread-flag-i386.patch lttng-kernel-trace-thread-flag-ia64.patch lttng-kernel-trace-thread-flag-m32r.patch lttng-kernel-trace-thread-flag-m68k.patch lttng-kernel-trace-thread-flag-m68knommu.patch lttng-kernel-trace-thread-flag-mips.patch lttng-kernel-trace-thread-flag-parisc.patch lttng-kernel-trace-thread-flag-powerpc.patch lttng-kernel-trace-thread-flag-s390.patch lttng-kernel-trace-thread-flag-sh.patch lttng-kernel-trace-thread-flag-sh64.patch lttng-kernel-trace-thread-flag-sparc.patch lttng-kernel-trace-thread-flag-sparc64.patch lttng-kernel-trace-thread-flag-um.patch lttng-kernel-trace-thread-flag-v850.patch lttng-kernel-trace-thread-flag-x86_64.patch lttng-kernel-trace-thread-flag-xtensa.patch lttng-kernel-trace-thread-flag-api.patch # #NEVER submit as-is. Need to add #include <linux/marker.h> everywhere. lttng-instrumentation-arm.patch lttng-instrumentation-i386.patch lttng-instrumentation-mips.patch lttng-instrumentation-powerpc.patch lttng-instrumentation-ppc.patch lttng-instrumentation-sh.patch lttng-instrumentation-sh64.patch lttng-instrumentation-sparc.patch lttng-instrumentation-x86_64.patch lttng-instrumentation-s390.patch #FIXME : add missing architectures. # lttng-build-instrumentation-menu.patch # #LTTng timestamping # lttng-timestamp-core.patch lttng-timestamp-generic.patch lttng-timestamp-ppc.patch lttng-mips-export-hpt-frequency.patch lttng-timestamp-mips.patch lttng-timestamp-powerpc.patch lttng-timestamp-sh.patch lttng-test-tsc.patch lttng-timestamp-x86.patch # #LTTng tracer, architecture independent # lttng-relay-hotplug.patch lttng-core-header.patch lttng-core.patch lttng-core-i386.patch lttng-core-powerpc.patch lttng-tracer-header.patch lttng-tracer.patch lttng-transport.patch lttng-netlink-control.patch lttng-serialize.patch # #LTTng statedump, extraction of inner kernel information at trace start. # lttng-export-tasklist-lock.patch lttng-export-irq_desc.patch lttng-statedump.patch export-get-files-struct-symbol.patch rcu_fd_statedump.patch lttng-statedump-module-list.patch # #LTTng tracer Kconfig menu # lttng-menus.patch # #Linux Kernel Markers /proc interface # seq_file_sorted.patch module.c-sort-module-list.patch linux-kernel-markers-iterator.patch lttng-marker-control.patch # #extra instrumentation add-input-subsystem-instrumentation.patch # markers-multi-probes-test.patch fix-wan-desc-offset.patch lttng-statedump-x86.patch # lttng-sched-instrumentation-probe.patch #needs work # to be updated blktrace-port-to-lttng.patch #linux-kernel-markers-port-blktrace-to-markers.patch # # Disabled for now. Need work. #lttng-instrumentation-fs-data.patch #lttng-instrumentation-stack-i386.patch #lttng-instrumentation-stack-x86_64.patch #lttng-instrumentation-stack.patch #lttng-probes.patch # # Userspace tracing. Disabled for now. # #lttng-userspace-tracing.patch #lttng-userspace-tracing-arm.patch #lttng-userspace-tracing-i386.patch #lttng-userspace-tracing-mips.patch #lttng-userspace-tracing-powerpc.patch #lttng-userspace-tracing-sh.patch #lttng-userspace-tracing-x86_64.patch #lttng-userspace-tracing-menus.patch
lttng-ipipe-2.6.24-x86-2.0-02.patch
Quoted 7 lines · Jan Kiszka
[Steven, I promised you this tool earlier, and now it runs. It /may/ help to understand some of your problems, at least it should give an overview of your schedule...]
This is an update on how to get latest LTTng running with latest Xenomai!
Just realized that the final patch suffered from a dependency on some not-yet-merged cleanup patch from my queue. Here is a refreshed version for vanilla.
Jan
Signature · 2 lines
Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux
--- arch/x86/kernel/Makefile_64 | 2 arch/x86/kernel/ipipe.c | 5 -- include/linux/ipipe.h | 3 - include/linux/kernel.h | 1 kernel/exit.c | 1 kernel/marker.c | 12 ++-- kernel/sched.c | 63 +++++++++++++++++++++++++ ltt/ltt-relay.c | 2 ltt/ltt-serialize.c | 12 ++-- mm/memory.c | 108 ++++++++++++++++++++++++++++++++++++++++++++ 10 files changed, 191 insertions(+), 18 deletions(-)
arch/x86/kernel/Makefile_64 +2 -0
@@ -36,6 +36,8 @@ obj-$(CONFIG_X86_VSMP) += vsmp_64.o obj-$(CONFIG_K8_NB) += k8.o obj-$(CONFIG_AUDIT) += audit_64.o obj-$(CONFIG_IMMEDIATE) += immediate.o +obj-$(CONFIG_IPIPE) += ipipe.o +obj-$(CONFIG_IPIPE_TRACE_MCOUNT) += mcount_64.o obj-$(CONFIG_MODULES) += module_64.o obj-$(CONFIG_PCI) += early-quirks.o
arch/x86/kernel/ipipe.c +0 -5
@@ -987,7 +987,6 @@ EXPORT_SYMBOL(ipipe_critical_exit);EXPORT_SYMBOL (ipipe_trigger_irq);EXPORT_SYMBOL (ipipe_get_sysinfo); -EXPORT_SYMBOL_GPL (irq_desc);struct task_struct *__switch_to (struct task_struct *prev_p,struct task_struct *next_p);EXPORT_SYMBOL_GPL (__switch_to);
@@ -1002,10 +1001,6 @@ EXPORT_PER_CPU_SYMBOL_GPL(cpu_tlbstate);EXPORT_SYMBOL_GPL (cpu_gdt_descr);#endif /* !CONFIG_X86_32 */ -#if defined(CONFIG_SMP ) || defined(CONFIG_DEBUG_SPINLOCK ) -EXPORT_SYMBOL (tasklist_lock); -#endif /* CONFIG_SMP || CONFIG_DEBUG_SPINLOCK */ -#ifdef CONFIG_IPIPE_TRACE_MCOUNT void notrace mcount(void);EXPORT_SYMBOL (mcount);
include/linux/ipipe.h +2 -1
@@ -535,7 +535,8 @@ static inline void local_irq_restore_nos#define ipipe_irq_unlock (irq) do { } while(0)#define ipipe_root_domain_p 1 -#define ipipe_safe_current current +#define ipipe_processor_id () smp_processor_id() +#define ipipe_safe_current () current#define local_irq_disable_head () local_irq_disable()
include/linux/kernel.h +1 -0
@@ -15,6 +15,7 @@#include <linux/bitops.h> #include <linux/log2.h> #include <linux/marker.h> +#include <linux/ipipe_base.h> #include <asm/byteorder.h> #include <asm/bug.h>
kernel/exit.c +1 -0
@@ -1000,6 +1000,7 @@ fastcall NORET_TYPE void do_exit(long coacct_process ();trace_mark (kernel_process_exit,"pid %d" , tsk->pid); +ipipe_exit_notify (tsk);exit_sem (tsk);__exit_files (tsk);__exit_fs (tsk);
kernel/sched.c +63 -0
66 lines not on this page · raw message
ltt/ltt-relay.c +1 -1
@@ -1012,7 +1012,7 @@ static void *ltt_relay_reserve_slot(stru/* * Perform retryable operations. */ -if (ltt_nesting[smp_processor_id ()] >4 ) { +if (ltt_nesting[ipipe_processor_id ()] >4 ) {local_inc (<t_buf->events_lost);return NULL ; }
ltt/ltt-serialize.c +7 -5
@@ -15,6 +15,7 @@#include <linux/ctype.h> #include <linux/string.h> #include <linux/module.h> +#include <linux/ipipe_base.h> #include <linux/ltt-tracer.h> enum ltt_type {
@@ -625,6 +626,7 @@ void ltt_vtrace(void *probe_data, void *u32 compact_data =0 ;void *serialize_private =NULL ;int cpu; +unsigned long irqflags; pdata = (struct ltt_active_marker *)probe_data;if (unlikely (private_data && private_data->id <MARKER_CORE_IDS ))
@@ -641,13 +643,13 @@ void ltt_vtrace(void *probe_data, void * && (!private_data || !private_data->force))) return; -preempt_disable (); +ipipe_preempt_disable (irqflags);if (likely (!private_data || !private_data->force || private_data->cpu ==-1 )) - cpu =smp_processor_id (); + cpu =ipipe_processor_id ();else cpu = private_data->cpu; - ltt_nesting[smp_processor_id ()]++; + ltt_nesting[ipipe_processor_id ()]++;if (unlikely (private_data && private_data->trace)) dest_trace = private_data->trace;
@@ -707,8 +709,8 @@ void ltt_vtrace(void *probe_data, void */* Out-of-order commit */ ltt_commit_slot (channel, &transport_data, buffer, slot_size); } - ltt_nesting[smp_processor_id ()]--; -preempt_enable (); + ltt_nesting[ipipe_processor_id ()]--; +ipipe_preempt_enable (irqflags); }EXPORT_SYMBOL_GPL (ltt_vtrace);
mm/memory.c +108 -0
117 lines not on this page · raw message
kernel/marker.c +6 -6
@@ -103,14 +103,14 @@ void marker_probe_cb(const struct marker {va_list args;char ptype; +unsigned long irqflags;/* * rcu_read_lock does two things : disabling preemption to make sure the * teardown of the callbacks can be done correctly when they are in * modules and they insure RCU read coherency. */ -rcu_read_lock (); -preempt_disable (); +ipipe_preempt_disable (irqflags); ptype = mdata->ptype;if (likely (!ptype)) {marker_probe_func *func;
@@ -143,8 +143,7 @@ void marker_probe_cb(const struct markerva_end (args); } } -preempt_enable (); -rcu_read_unlock (); +ipipe_preempt_enable (irqflags); }EXPORT_SYMBOL_GPL (marker_probe_cb);
@@ -162,8 +161,9 @@ void marker_probe_cb_noarg(const struct {va_list args;/* not initialized */ char ptype; +unsigned long irqflags; -preempt_disable (); +ipipe_preempt_disable (irqflags); ptype = mdata->ptype;if (likely (!ptype)) {marker_probe_func *func;
@@ -191,7 +191,7 @@ void marker_probe_cb_noarg(const struct multi[i].func (multi[i].probe_private, call_private, fmt, &args); } -preempt_enable (); +ipipe_preempt_enable (irqflags); }EXPORT_SYMBOL_GPL (marker_probe_cb_noarg);