-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 145995 b: refs/heads/master c: fc182a4 h: refs/heads/master i: 145993: 010915d 145991: 3d005cf v: v3
- Loading branch information
Zhaolei
authored and
Ingo Molnar
committed
Apr 12, 2009
1 parent
3854bf5
commit dabc14a
Showing
5 changed files
with
198 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 02af61bb50f5d5f0322dbe5ab2a0d75808d25c7b | ||
refs/heads/master: fc182a4330fc22ea1b68fa3d5064dd85a73a4c4a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,9 @@ | ||
#ifndef _TRACE_KMEM_H | ||
#define _TRACE_KMEM_H | ||
|
||
#include <linux/tracepoint.h> | ||
#include <linux/types.h> | ||
#include <linux/tracepoint.h> | ||
|
||
DECLARE_TRACE(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)); | ||
DECLARE_TRACE(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_TRACE(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)); | ||
DECLARE_TRACE(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_TRACE(kfree, | ||
TP_PROTO(unsigned long call_site, const void *ptr), | ||
TP_ARGS(call_site, ptr)); | ||
DECLARE_TRACE(kmem_cache_free, | ||
TP_PROTO(unsigned long call_site, const void *ptr), | ||
TP_ARGS(call_site, ptr)); | ||
#include <trace/kmem_event_types.h> | ||
|
||
#endif /* _TRACE_KMEM_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,193 @@ | ||
|
||
/* use <trace/kmem.h> instead */ | ||
#ifndef TRACE_EVENT | ||
# error Do not include this file directly. | ||
# error Unless you know what you are doing. | ||
#endif | ||
|
||
#undef TRACE_SYSTEM | ||
#define TRACE_SYSTEM kmem | ||
|
||
TRACE_EVENT(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), | ||
|
||
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=%08x", | ||
__entry->call_site, | ||
__entry->ptr, | ||
__entry->bytes_req, | ||
__entry->bytes_alloc, | ||
__entry->gfp_flags) | ||
); | ||
|
||
TRACE_EVENT(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), | ||
|
||
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=%08x", | ||
__entry->call_site, | ||
__entry->ptr, | ||
__entry->bytes_req, | ||
__entry->bytes_alloc, | ||
__entry->gfp_flags) | ||
); | ||
|
||
TRACE_EVENT(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), | ||
|
||
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=%08x node=%d", | ||
__entry->call_site, | ||
__entry->ptr, | ||
__entry->bytes_req, | ||
__entry->bytes_alloc, | ||
__entry->gfp_flags, | ||
__entry->node) | ||
); | ||
|
||
TRACE_EVENT(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), | ||
|
||
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=%08x node=%d", | ||
__entry->call_site, | ||
__entry->ptr, | ||
__entry->bytes_req, | ||
__entry->bytes_alloc, | ||
__entry->gfp_flags, | ||
__entry->node) | ||
); | ||
|
||
TRACE_EVENT(kfree, | ||
|
||
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) | ||
); | ||
|
||
TRACE_EVENT(kmem_cache_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) | ||
); | ||
|
||
#undef TRACE_SYSTEM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
#include <trace/irq.h> | ||
#include <trace/lockdep.h> | ||
#include <trace/skb.h> | ||
#include <trace/kmem.h> |