From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751567AbdGQWKx (ORCPT ); Mon, 17 Jul 2017 18:10:53 -0400 Received: from mail-pg0-f54.google.com ([74.125.83.54]:33899 "EHLO mail-pg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751318AbdGQWKv (ORCPT ); Mon, 17 Jul 2017 18:10:51 -0400 From: Arun Kalyanasundaram To: Arnaldo Carvalho de Melo , linux-kernel@vger.kernel.org Cc: Peter Zijlstra , Ingo Molnar , Alexander Shishkin , Arun Kalyanasundaram , Jiri Olsa , Daniel Borkmann , "David S . Miller" , SeongJae Park , davidcc@google.com, Stephane Eranian Subject: [RFC 0/4] perf script python: Provide perf_sample dict to all handlers Date: Mon, 17 Jul 2017 15:10:36 -0700 Message-Id: <20170717221040.88148-1-arunkaly@google.com> X-Mailer: git-send-email 2.13.2.932.g7449e964c-goog Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The process_event python hook receives a dict with all perf_sample entries. Other handlers (e.g. trace_unhandled, python_process_tracepoint) predate the introduction of this dict and do not receive it. This patch series adds the dict to all handlers, aiming to unify the information passed to them. This change adds an additional argument to the affected handlers. To keep backwards compatibility (and avoid unnecessary work), do not pass the aforementioned dict if the number of arguments signals that handler version predates this change. Initial Discussion: https://lkml.org/lkml/2017/7/1/108 Arun Kalyanasundaram (4): perf script python: Allocate memory only if handler exists perf script python: Refactor creation of perf sample dict perf script python: Add perf_sample dict to tracepoint handlers perf script python: Generate hooks with additional argument .../util/scripting-engines/trace-event-python.c | 189 ++++++++++++++------- 1 file changed, 128 insertions(+), 61 deletions(-) -- 2.13.2.932.g7449e964c-goog