mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-07-16 17:57:38 -04:00
Merge branch 'akpm' (patches from Andrew)
Merge misc fixes from Andrew Morton: "10 fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: scripts/gdb: fix lx-lsmod refcnt omfs: fix potential integer overflow in allocator omfs: fix sign confusion for bitmap loop counter omfs: set error return when d_make_root() fails fs, omfs: add NULL terminator in the end up the token list MAINTAINERS: update CAPABILITIES pattern fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings tracing/mm: don't trace mm_page_pcpu_drain on offline cpus tracing/mm: don't trace mm_page_free on offline cpus tracing/mm: don't trace kmem_cache_free on offline cpus
This commit is contained in:
@@ -140,19 +140,42 @@ DEFINE_EVENT(kmem_free, kfree,
|
||||
TP_ARGS(call_site, ptr)
|
||||
);
|
||||
|
||||
DEFINE_EVENT(kmem_free, kmem_cache_free,
|
||||
DEFINE_EVENT_CONDITION(kmem_free, kmem_cache_free,
|
||||
|
||||
TP_PROTO(unsigned long call_site, const void *ptr),
|
||||
|
||||
TP_ARGS(call_site, ptr)
|
||||
TP_ARGS(call_site, ptr),
|
||||
|
||||
/*
|
||||
* This trace can be potentially called from an offlined cpu.
|
||||
* Since trace points use RCU and RCU should not be used from
|
||||
* offline cpus, filter such calls out.
|
||||
* While this trace can be called from a preemptable section,
|
||||
* it has no impact on the condition since tasks can migrate
|
||||
* only from online cpus to other online cpus. Thus its safe
|
||||
* to use raw_smp_processor_id.
|
||||
*/
|
||||
TP_CONDITION(cpu_online(raw_smp_processor_id()))
|
||||
);
|
||||
|
||||
TRACE_EVENT(mm_page_free,
|
||||
TRACE_EVENT_CONDITION(mm_page_free,
|
||||
|
||||
TP_PROTO(struct page *page, unsigned int order),
|
||||
|
||||
TP_ARGS(page, order),
|
||||
|
||||
|
||||
/*
|
||||
* This trace can be potentially called from an offlined cpu.
|
||||
* Since trace points use RCU and RCU should not be used from
|
||||
* offline cpus, filter such calls out.
|
||||
* While this trace can be called from a preemptable section,
|
||||
* it has no impact on the condition since tasks can migrate
|
||||
* only from online cpus to other online cpus. Thus its safe
|
||||
* to use raw_smp_processor_id.
|
||||
*/
|
||||
TP_CONDITION(cpu_online(raw_smp_processor_id())),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( unsigned long, pfn )
|
||||
__field( unsigned int, order )
|
||||
@@ -253,12 +276,35 @@ DEFINE_EVENT(mm_page, mm_page_alloc_zone_locked,
|
||||
TP_ARGS(page, order, migratetype)
|
||||
);
|
||||
|
||||
DEFINE_EVENT_PRINT(mm_page, mm_page_pcpu_drain,
|
||||
TRACE_EVENT_CONDITION(mm_page_pcpu_drain,
|
||||
|
||||
TP_PROTO(struct page *page, unsigned int order, int migratetype),
|
||||
|
||||
TP_ARGS(page, order, migratetype),
|
||||
|
||||
/*
|
||||
* This trace can be potentially called from an offlined cpu.
|
||||
* Since trace points use RCU and RCU should not be used from
|
||||
* offline cpus, filter such calls out.
|
||||
* While this trace can be called from a preemptable section,
|
||||
* it has no impact on the condition since tasks can migrate
|
||||
* only from online cpus to other online cpus. Thus its safe
|
||||
* to use raw_smp_processor_id.
|
||||
*/
|
||||
TP_CONDITION(cpu_online(raw_smp_processor_id())),
|
||||
|
||||
TP_STRUCT__entry(
|
||||
__field( unsigned long, pfn )
|
||||
__field( unsigned int, order )
|
||||
__field( int, migratetype )
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__entry->pfn = page ? page_to_pfn(page) : -1UL;
|
||||
__entry->order = order;
|
||||
__entry->migratetype = migratetype;
|
||||
),
|
||||
|
||||
TP_printk("page=%p pfn=%lu order=%d migratetype=%d",
|
||||
pfn_to_page(__entry->pfn), __entry->pfn,
|
||||
__entry->order, __entry->migratetype)
|
||||
|
||||
Reference in New Issue
Block a user