@@ -24,7 +24,7 @@ args = 'file=+0($file):ustring delta_T=$delta_T:s64'
eprobe = ft.eprobe(event=eprobe_evt,
target_system='synthetic', target_event=synth_evt,
- fetchargs=args)
+ fetch_fields=args)
synth = ft.synth(name=synth_evt,
start_sys='syscalls', start_evt='sys_enter_' + syscall,
@@ -2366,7 +2366,7 @@ struct tep_event *dynevent_get_event(PyDynevent *event,
PyObject *PyFtrace_eprobe(PyObject *self, PyObject *args, PyObject *kwargs)
{
- static char *kwlist[] = {"event", "target_system", "target_event", "fetchargs", NULL};
+ static char *kwlist[] = {"event", "target_system", "target_event", "fetch_fields", NULL};
const char *event, *target_system, *target_event, *fetchargs;
struct tracefs_dynevent *eprobe;
PyObject *py_dyn;
@@ -473,13 +473,13 @@ class EprobeTestCase(unittest.TestCase):
evt2_args = 'res=$ret:u64'
ep1 = ft.eprobe(event=evt1, target_system=evt1_tsys, target_event=evt1_tevent,
- fetchargs=evt1_args)
+ fetch_fields=evt1_args)
self.assertEqual(evt1, ep1.event())
self.assertEqual("{}.{}".format(evt1_tsys, evt1_tevent), ep1.address())
self.assertEqual(evt1_args, ep1.probe())
ep2 = ft.eprobe(event=evt2, target_system=evt2_tsys, target_event=evt2_tevent,
- fetchargs=evt2_args)
+ fetch_fields=evt2_args)
self.assertEqual(evt2, ep2.event())
self.assertEqual("{}.{}".format(evt2_tsys, evt2_tevent), ep2.address())
self.assertEqual(evt2_args, ep2.probe())
@@ -496,7 +496,7 @@ class EprobeTestCase(unittest.TestCase):
evt1_args = 'res=$ret:u64'
ep1 = ft.eprobe(event=evt1, target_system=evt1_tsys, target_event=evt1_tevent,
- fetchargs=evt1_args)
+ fetch_fields=evt1_args)
ep1.register()
inst = ft.create_instance(instance_name)
ep1.enable(instance=inst)
The keyword (named) argument of the eprobe constrictor is renamed from 'fetchargs' to 'fetch_fields'. This is done because the old name can be confusing, since the probe is supposed to fetch a field of event (not a function argument). The new name also makes a better match with the 'snake case' naming convention used in trace-cruncher. Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com> --- examples/syscall_trace.py | 2 +- src/ftracepy-utils.c | 2 +- tracecruncher/tests/1_unit/test_01_ftracepy_unit.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-)