From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762904AbcALPjb (ORCPT ); Tue, 12 Jan 2016 10:39:31 -0500 Received: from mail.kernel.org ([198.145.29.136]:60677 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1761252AbcALPj2 (ORCPT ); Tue, 12 Jan 2016 10:39:28 -0500 Date: Tue, 12 Jan 2016 12:39:24 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: Namhyung Kim , Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , David Ahern , Andi Kleen , Wang Nan Subject: Re: [PATCH 4/4] perf tools: Fallback to srcdir/Documentation/tips.txt Message-ID: <20160112153924.GG18367@kernel.org> References: <1452334589-8782-1-git-send-email-namhyung@kernel.org> <1452334589-8782-4-git-send-email-namhyung@kernel.org> <20160111091820.GB15415@krava.brq.redhat.com> <20160112153435.GF18367@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160112153435.GF18367@kernel.org> X-Url: http://acmel.wordpress.com 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 Em Tue, Jan 12, 2016 at 12:34:35PM -0300, Arnaldo Carvalho de Melo escreveu: > Em Mon, Jan 11, 2016 at 10:18:20AM +0100, Jiri Olsa escreveu: > > On Sat, Jan 09, 2016 at 07:16:29PM +0900, Namhyung Kim wrote: > > > + help = perf_tip(DOCDIR); > > > + if (help == NULL) > > > + help = "Cannot load tips.txt file, please install perf!"; > > > + } > > > > hum, I can't get this one.. seems like perf_tip does > > not retun NULL if there's no tip.txt file > > Neither me, fixing it up, this fallback will never take place. With this patch on top, it works: [root@felicio ~]# perf trace --no-inherit -e access perf report --stdio 0.094 ( 0.017 ms): access(filename: /etc/ld.so.preload, mode: R ) = -1 ENOENT No such file or directory 1.940 ( 0.008 ms): access(filename: /home/acme/etc/perfconfig, mode: R ) = -1 ENOENT No such file or directory 1.979 ( 0.004 ms): access(filename: /home/acme/etc/perfconfig, mode: R ) = -1 ENOENT No such file or directory 2.000 ( 0.004 ms): access(filename: /home/acme/etc/perfconfig, mode: R ) = -1 ENOENT No such file or directory 2.177 ( 0.006 ms): access(filename: /usr/bin/pager, mode: X ) = -1 ENOENT No such file or directory 2.189 ( 0.011 ms): access(filename: /usr/bin/less, mode: X ) = 0 17.250 ( 0.018 ms): access(filename: /home/acme/share/doc/perf-tip/tips.txt ) = -1 ENOENT No such file or directory 17.259 ( 0.006 ms): access(filename: /home/acme/git/linux/tools/perf/Documentation/tips.txt) = 0 # To display the perf.data header info, please use --header/--header-only options. # # # Total Lost Samples: 0 # # Samples: 5 of event 'cycles:pp' # Event count (approx.): 24954605 # # Overhead Command Shared Object Symbol # ........ ....... ................ ......................... # 99.68% usleep [kernel.vmlinux] [k] vma_rb_erase 0.32% perf [kernel.vmlinux] [k] nmi_cpu_backtrace 0.00% perf [kernel.vmlinux] [k] native_write_msr_safe # # (Tip: To see callchains in a more compact form: perf report -g folded) # [root@felicio ~]#