From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752527AbcFIOSz (ORCPT ); Thu, 9 Jun 2016 10:18:55 -0400 Received: from mail.kernel.org ([198.145.29.136]:55142 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751377AbcFIOSy (ORCPT ); Thu, 9 Jun 2016 10:18:54 -0400 Date: Thu, 9 Jun 2016 11:18:50 -0300 From: Arnaldo Carvalho de Melo To: Masami Hiramatsu Cc: linux-kernel@vger.kernel.org, Namhyung Kim , Peter Zijlstra , Ingo Molnar , Hemant Kumar , Ananth N Mavinakayanahalli , Brendan Gregg Subject: Re: [PATCH perf/core v10 07/23] perf probe: Add --cache option to cache the probe definitions Message-ID: <20160609141850.GO11589@kernel.org> References: <20160608092854.3116.29007.stgit@devbox> <20160608093010.3116.42221.stgit@devbox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160608093010.3116.42221.stgit@devbox> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, Jun 08, 2016 at 06:30:10PM +0900, Masami Hiramatsu escreveu: > @@ -2555,6 +2556,14 @@ static int __add_probe_trace_events(struct perf_probe_event *pev, > } > if (ret == -EINVAL && pev->uprobes) > warn_uprobe_event_compat(tev); > + if (ret == 0 && probe_conf.cache) { > + cache = probe_cache__new(pev->target); > + if (cache) { > + probe_cache__add_entry(cache, pev, tevs, ntevs); > + probe_cache__commit(cache); These two functions may fail, please check its return and forward errors appropriately. > + probe_cache__delete(cache);