From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754371AbcAEU4I (ORCPT ); Tue, 5 Jan 2016 15:56:08 -0500 Received: from mail.kernel.org ([198.145.29.136]:39801 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752321AbcAEUz5 (ORCPT ); Tue, 5 Jan 2016 15:55:57 -0500 Date: Tue, 5 Jan 2016 17:55:52 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: "Wangnan (F)" , Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , David Ahern , Stephane Eranian , Andi Kleen , Masami Hiramatsu Subject: Re: [RFC/PATCH] perf report: Show random usage tip on the help line Message-ID: <20160105205552.GA25916@kernel.org> References: <1451972206-22481-1-git-send-email-namhyung@kernel.org> <568B638F.1030208@huawei.com> <20160105104307.GA13561@danjae.kornet> <20160105164010.GE15669@kernel.org> <20160105191925.GA8160@danjae.kornet> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160105191925.GA8160@danjae.kornet> 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 Wed, Jan 06, 2016 at 04:19:25AM +0900, Namhyung Kim escreveu: > Hi Arnaldo, > > On Tue, Jan 05, 2016 at 01:40:10PM -0300, Arnaldo Carvalho de Melo wrote: > > Em Tue, Jan 05, 2016 at 07:43:07PM +0900, Namhyung Kim escreveu: > > > On Tue, Jan 05, 2016 at 02:32:47PM +0800, Wangnan (F) wrote: > > > > 3. What about creating a tools/perf/Documentation/tips.txt and generate > > > > tips table dynamically? > > > I don't see much difference doing that. I guess most of users don't > > > want to go to see the documentation anyway. Do I miss something? > > Yes, I think what he suggests is to use: > > tips = strlist__new("file://tools/perf/Documentation/tips.txt", NULL); > > tip = strlist__entry(tips, random() % strlist__nr_entries(tips)); > > Or even do as 'perf trace' does, and have a directory with one file per > > tip, see 005438a8eef0 ("perf trace: Support 'strace' syscall event > > groups") > Thanks for the info. It's really easy doing that, nice.. > I understand what he suggesting, but not why. :) Because then adding new tips will not require rebuilding the tool? I thought you didn't understood his point, judging by your "I guess most of users don't want to go to see the documentation anyway" statement, which I thought meant you thought that users would have to look at some man-page or documentation directory to go find some particular file with the tips... - Arnaldo