[lkml]   [2012]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] perf tools: Allow multiple threads or processes in record, stat, top
Em Fri, Feb 10, 2012 at 02:42:01PM +0900, Namhyung Kim escreveu:
> 2012-02-09 11:44 PM, Arnaldo Carvalho de Melo wrote:
> > [root@aninha linux]# tools/perf/python/
> > Traceback (most recent call last):
> > File "tools/perf/python/", line 16, in<module>
> > import perf
> > ImportError: /home/acme/git/build/perf/python/ undefined symbol: ui__error

> > it breaks, I'll check an alternative way to report problems without
> > calling ui__ methods from thread_map.
> I have a different result:
> $ git checkout tip/perf/core
> HEAD is now at c98fdeaa9273... x86/sched/perf/AMD: Set sched_clock_stable
> $ patch -p1 < perf-allow-multiple-threads.patch
> patching file tools/perf/Documentation/perf-record.txt
> $ cd tools/perf
> $ make -j8
> $ sudo python/
> Traceback (most recent call last):
> File "python/", line 41, in <module>
> main()
> File "python/", line 25, in main
> = cpus, threads = threads);
> OSError: [Errno 22] Invalid argument

This is another problem and one I would appreciate if you could fix :-)

I mentioned it to David in a private message and there was at least one
instance where Linus was involved and I promised to fix this but haven't
find the time to do so.

The problem is that one needs to research how to make the python binding
to be rebuilt when one of the files that are linked into it changes.

Please take a look at tools/perf/util/ and you'll see:

perf = Extension('perf',
sources = ['util/python.c', 'util/ctype.c', 'util/evlist.c',
'util/evsel.c', 'util/cpumap.c', 'util/thread_map.c',
'util/util.c', 'util/xyarray.c', 'util/cgroup.c',
include_dirs = ['util/include'],
extra_compile_args = cflags,

Probably is something simple in the Makefiles.

So please try again after doing:

cd tools/perf
rm -rf python/

And you should get the same problem. Also check
/proc/sys/kernel/perf_event_paranoid as this script does syswide sampling.

I'll try to fix this problem now that I took the time to think about it

- Arnaldo

 \ /
  Last update: 2012-02-10 15:31    [W:0.058 / U:6.720 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site