Skip to content

Commit

Permalink
Merge pull request iovisor#1584 from palmtenor/printargs
Browse files Browse the repository at this point in the history
Implement get_text for Python USDT class
  • Loading branch information
yonghong-song committed Feb 11, 2018
2 parents cbfd285 + 918fad8 commit 3c468a4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/python/bcc/usdt.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ def enable_probe_or_bail(self, probe, fn_name):
def get_context(self):
return self.context

def get_text(self):
ctx_array = (ct.c_void_p * 1)()
ctx_array[0] = ct.c_void_p(self.context)
return lib.bcc_usdt_genargs(ctx_array, 1).decode()

def get_probe_arg_ctype(self, probe_name, arg_index):
return lib.bcc_usdt_get_probe_argctype(
self.context, probe_name, arg_index)
Expand Down

0 comments on commit 3c468a4

Please sign in to comment.