From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1422694AbbA3N4t (ORCPT ); Fri, 30 Jan 2015 08:56:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54708 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751930AbbA3N4s (ORCPT ); Fri, 30 Jan 2015 08:56:48 -0500 Date: Fri, 30 Jan 2015 14:56:40 +0100 From: Jiri Olsa To: Namhyung Kim Cc: Arnaldo Carvalho de Melo , Ingo Molnar , Peter Zijlstra , LKML Subject: Re: [PATCH 2/3] perf tools: Do not rely on dso__data_read_offset() to open dso Message-ID: <20150130135640.GC6188@krava.brq.redhat.com> References: <1422585209-32742-1-git-send-email-namhyung@kernel.org> <1422585209-32742-2-git-send-email-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1422585209-32742-2-git-send-email-namhyung@kernel.org> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 30, 2015 at 11:33:28AM +0900, Namhyung Kim wrote: > Do not rely on dso__data_read_offset() will always call dso__data_fd() > internally. With multi-thread support, accessing a fd will be > protected by a lock and it'll cause a huge contention. It can be > avoided since we can skip reading from file if there's a data in the > dso cache. > > If one needs to call the dso__data_read_offset(), [s]he also needs to > call dso__data_fd() (or set dso->binary_type at least) first like the > dwarf unwind code does. hum, I dont see the need for this, but I haven't checked your patchset for the multithread support yet ;-) anyway, I dont mind tp straighten up the interface: Acked-by: Jiri Olsa thanks, jirka