Linux-Trace-Devel Archive on lore.kernel.org
 help / Atom feed
* [PATCH] trace-cmd: make python work again
@ 2019-01-19  9:15 Johannes Berg
  0 siblings, 0 replies; 1+ messages in thread
From: Johannes Berg @ 2019-01-19  9:15 UTC (permalink / raw)
  To: linux-trace-devel; +Cc: Steven Rostedt, Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

Code reshuffling/renaming wasn't complete in ctracecmd.i:
 * it needs to %include "trace-seq.h" so that we
   can access those functions from python
 * it needs to use tep_* instead of pevent_* everywhere,
   even function calls done as parameters to functions,
   I guess some sort of automatic conversion missed those

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 python/ctracecmd.i | 1 +
 python/tracecmd.py | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/python/ctracecmd.i b/python/ctracecmd.i
index b18cba9b3b5f..55fd8755c237 100644
--- a/python/ctracecmd.i
+++ b/python/ctracecmd.i
@@ -239,4 +239,5 @@ static int python_callback(struct trace_seq *s,
 #define __thread
 
 %include "trace-cmd.h"
+%include "trace-seq.h"
 %include "event-parse.h"
diff --git a/python/tracecmd.py b/python/tracecmd.py
index f551a1489e25..a3816dfdb788 100644
--- a/python/tracecmd.py
+++ b/python/tracecmd.py
@@ -106,7 +106,7 @@ class Event(object, DictMixin):
         f = tep_find_any_field(self._format, name)
         if f is None:
             return None
-        ret, val = tep_read_number_field(f, pevent_record_data_get(self._record))
+        ret, val = tep_read_number_field(f, tep_record_data_get(self._record))
         if ret:
             return None
         return val
@@ -142,7 +142,7 @@ class Field(object):
 
     def __long__(self):
         ret, val =  tep_read_number_field(self._field,
-                                             pevent_record_data_get(self._record))
+                                          tep_record_data_get(self._record))
         if ret:
             raise FieldError("Not a number field")
         return val
-- 
2.17.2


^ permalink raw reply	[flat|nested] 1+ messages in thread

only message in thread, back to index

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-19  9:15 [PATCH] trace-cmd: make python work again Johannes Berg

Linux-Trace-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-trace-devel/0 linux-trace-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-trace-devel linux-trace-devel/ https://lore.kernel.org/linux-trace-devel \
		linux-trace-devel@vger.kernel.org linux-trace-devel@archiver.kernel.org
	public-inbox-index linux-trace-devel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-trace-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox