Search
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
LTTng-UST
All Projects
LTTng
»
LTTng-UST
Overview
Activity
Roadmap
Issues
Gantt
Calendar
News
Repository
Download (736 Bytes)
Bug #142
» sample_tracepoint_python.c
Yannick Brosseau, 03/01/2012 10:43 AM
#include
<Python.h>
#define TRACEPOINT_CREATE_PROBES
/*
* The header containing our TRACEPOINT_EVENTs.
*/
#define TRACEPOINT_DEFINE
#include
"sample_tracepoint.h"
static
PyObject
*
sample_tracepoint_message
(
PyObject
*
self
,
PyObject
*
args
)
{
const
char
*
text
;
int
sts
;
if
(
!
PyArg_ParseTuple
(
args
,
"s"
,
&
text
))
return
NULL
;
tracepoint
(
sample_tracepoint
,
message
,
text
);
Py_INCREF
(
Py_None
);
return
Py_None
;
}
static
PyMethodDef
UstMethods
[]
=
{
{
"message"
,
sample_tracepoint_message
,
METH_VARARGS
,
"Execute a tracepoint."
},
{
NULL
,
NULL
,
0
,
NULL
}
/* Sentinel */
};
PyMODINIT_FUNC
initsample_tracepoint
(
void
)
{
(
void
)
Py_InitModule
(
"sample_tracepoint"
,
UstMethods
);
}
« Previous
1
2
3
4
Next »
(1-1/4)
Loading...