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] [day] [month] [year] [list]
Date:	Fri, 13 Aug 2010 23:38:06 -0500
From:	Tom Zanussi <tzanussi@...il.com>
To:	eranian@...gle.com
Cc:	linux-kernel@...r.kernel.org, acme@...radead.org, mingo@...e.hu,
	acme@...hat.com, fweisbec@...il.com, peterz@...radead.org
Subject: Re: [PATCH] perf trace: get rid of the hard-coded paths in the
 report scripts

Hi Stephane,

On Fri, 2010-08-13 at 10:30 +0200, Stephane Eranian wrote:
> Tom,
> 
> Here is version that works for me. Besides the stat() to access() change, I fixed
> the pathname you were building, it was missing the language name. The way I solved
> that is by leveraging the scripting_ops->name field, but for that I had to make sure
> it would match the subdir name, i.e., all lower-case. I also add an error message
> when the script is not found, so users understand what went wrong without turning
> on any sort of debugging.
> 

Hmm, I'm not sure why the previous version didn't work for you, since
that version changed all the scripts to the form:

python/sctop.py

which applied to the format string there, "%s/scripts/%s"

gives

..../scripts/python/sctop.py

so it should have worked.

With your version, I get:

root@...picana:~# perf trace sctop
script python/sctop.py not found

because the script names still have the form python/sctop.py but are
applied to the new format string "%s/scripts/%s/%s" which gives:

..../scripts/python/python/sctop.py

After removing the python/ prefix from all the scripts, everything works
fine:

root@...picana:~# perf trace sctop
good output...

root@...picana:~# perf record -c 1 -e raw_syscalls:sys_enter -a -- sleep
1
[ perf record: Woken up 0 times to write data ]
[ perf record: Captured and wrote 22.546 MB perf.data (~985061
samples) ]
root@...picana:~# perf trace -g python
generated Python script: perf-trace.py
root@...picana:~# perf trace -s perf-trace.py > out
good output...

Anyway, for all the reasons you stated and the fact that it gets rid of
everything but the bare script name, I think your version is a nice
improvement - I'll repost it along with the small script changes
mentioned shortly.

Tom


--
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