Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751559AbcDGHLh (ORCPT ); Thu, 7 Apr 2016 03:11:37 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50497 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755272AbcDGHLf (ORCPT ); Thu, 7 Apr 2016 03:11:35 -0400 From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: lkml , David Ahern , Ingo Molnar , Namhyung Kim , Peter Zijlstra , Andreas Hollmann , Milian Wolff Subject: [PATCH 3/3] perf script: Process event update events Date: Thu, 7 Apr 2016 09:11:13 +0200 Message-Id: <1460013073-18444-3-git-send-email-jolsa@kernel.org> In-Reply-To: <1460013073-18444-1-git-send-email-jolsa@kernel.org> References: <1460013073-18444-1-git-send-email-jolsa@kernel.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1467 Lines: 38 Andreas reported following command produces no output: $ cat test.py #!/usr/bin/env python def stat__krava(cpu, thread, time, val, ena, run): print "event %s cpu %d, thread %d, time %d, val %d, ena %d, run %d" % \ ("krava", cpu, thread, time, val, ena, run) $ perf stat -a -I 1000 -e cycles,"cpu/config=0x6530160,name=krava/" record | perf script -s test.py The reason is that perf script does not process event update events and will never get the event name update thus the python callback is never called. The fix is just to add already existing callback we use in the perf stat report. Reported-by: Andreas Hollmann Link: http://lkml.kernel.org/n/tip-5tyy9xeoiyg1nvy32tkjrlv1@git.kernel.org Signed-off-by: Jiri Olsa --- tools/perf/builtin-script.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index 3770c3dffe5e..59009aa7e2ca 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -1961,6 +1961,7 @@ int cmd_script(int argc, const char **argv, const char *prefix __maybe_unused) .exit = perf_event__process_exit, .fork = perf_event__process_fork, .attr = process_attr, + .event_update = perf_event__process_event_update, .tracing_data = perf_event__process_tracing_data, .build_id = perf_event__process_build_id, .id_index = perf_event__process_id_index, -- 2.4.11