lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160107104620.GB5499@danjae.kornet>
Date:	Thu, 7 Jan 2016 19:46:20 +0900
From:	Namhyung Kim <namhyung@...nel.org>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Ingo Molnar <mingo@...nel.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Jiri Olsa <jolsa@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	David Ahern <dsahern@...il.com>,
	Stephane Eranian <eranian@...gle.com>,
	Andi Kleen <andi@...stfloor.org>,
	Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>,
	Wang Nan <wangnan0@...wei.com>
Subject: Re: [RFC/PATCH v2] perf report: Show random usage tip on the help
 line

On Thu, Jan 07, 2016 at 09:09:59AM +0100, Jiri Olsa wrote:
> On Thu, Jan 07, 2016 at 09:07:17AM +0100, Jiri Olsa wrote:
> > On Thu, Jan 07, 2016 at 04:46:22PM +0900, Namhyung Kim wrote:
> > 
> > SNIP
> > 
> > >  
> > >  struct callchain_param	callchain_param = {
> > >  	.mode	= CHAIN_GRAPH_ABS,
> > > @@ -663,3 +665,28 @@ fetch_kernel_version(unsigned int *puint, char *str,
> > >  		*puint = (version << 16) + (patchlevel << 8) + sublevel;
> > >  	return 0;
> > >  }
> > > +
> > > +const char *perf_report_tip(const char *dirname)
> > > +{
> > > +	struct strlist *tips;
> > > +	struct str_node *node;
> > > +	char *tip = NULL;
> > > +	struct strlist_config conf = {
> > > +		.dirname = system_path(dirname) ,
> > > +	};
> > > +
> > > +	tips = strlist__new("tips.txt", &conf);
> > > +	if (tips == NULL || strlist__nr_entries(tips) == 1) {
> > > +		tip = (char *)"Cannot find tips.txt file";
> > > +		goto out;
> > 
> > could we also try to read "./Documentation/tips.txt" ?
> > 
> > so people who don't install perf and run it from 'tools/perf'
> > get some tips as well? ;-)
> > 
> > [jolsa@...va perf]$ ./perf report --stdio  | tail -3
> > #
> > # (Cannot find tips.txt file)
> > #
> > [jolsa@...va perf]$ 
> 
> also some people use local user install and it seems
> not to be installed under this one as well
> 
> 
> [jolsa@...va perf]$ make install
>   BUILD:   Doing 'make -j4' parallel build
>   SUBDIR   Documentation
>   INSTALL  Documentation-man
>   INSTALL  trace_plugins
>   INSTALL  GTK UI
>   INSTALL  binaries
>   INSTALL  tests
>   INSTALL  perf-read-vdso32
>   INSTALL  libexec
>   INSTALL  perf-archive
>   INSTALL  perf-with-kcore
>   INSTALL  strace/groups
>   INSTALL  perl-scripts
>   INSTALL  python-scripts
>   INSTALL  perf_completion-script
>   INSTALL  perf-tip
> [jolsa@...va perf]$ ./perf report --stdio  | tail -3
> #
> # (Cannot find tips.txt file)
> #

Oops, I should use tip_instdir_SQ instead of tipdir_SQ when
installing.  Will send the fix soon.

Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ