From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932220AbcGOHaK (ORCPT ); Fri, 15 Jul 2016 03:30:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51585 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752503AbcGOHaH (ORCPT ); Fri, 15 Jul 2016 03:30:07 -0400 From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: "Steven Rostedt (Red Hat)" , Jiri Pirko , Songshan Gong , lkml , David Ahern , Ingo Molnar , Namhyung Kim , Peter Zijlstra Subject: [PATCHv2 0/3] perf python: Add support to access tracepoint fields Date: Fri, 15 Jul 2016 09:29:54 +0200 Message-Id: <1468567797-27564-1-git-send-email-jolsa@kernel.org> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 15 Jul 2016 07:30:07 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hi, adding support to access tracepoint fields in python scripts. v2 changes: - most of the patches is already pulled in, this is just leftover - fixed is_printable_array [Steven] - making is_printable_array global - attached unrelated fix 3/3 With this patchset it's possible to access tracepoint fields in event python object like: print "time %u prev_comm=%s prev_pid=%d prev_prio=%d prev_state=0x%x ==> next_comm=%s next_pid=%d next_prio=%d" % ( event.sample_time, event.prev_comm, event.prev_pid, event.prev_prio, event.prev_state, event.next_comm, event.next_pid, event.next_prio) Also available in: git://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git perf/fixes thanks, jirka Cc: Steven Rostedt (Red Hat) Cc: Jiri Pirko Cc: Songshan Gong --- Jiri Olsa (3): perf script python: Fix string vs byte array resolving perf tools: Make is_printable_array global tools lib api fs: Use base 0 in filename__read_ull tools/lib/api/fs/fs.c | 7 ++++++- tools/perf/util/python.c | 12 ------------ tools/perf/util/scripting-engines/trace-event-python.c | 25 ++++++++++++++++++------- tools/perf/util/util.c | 14 ++++++++++++++ tools/perf/util/util.h | 1 + 5 files changed, 39 insertions(+), 20 deletions(-)