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]
Date:	Fri, 10 Feb 2012 12:28:21 -0200
From:	Arnaldo Carvalho de Melo <acme@...stprotocols.net>
To:	Namhyung Kim <namhyung@...il.com>
Cc:	David Ahern <dsahern@...il.com>, Ingo Molnar <mingo@...e.hu>,
	linux-kernel@...r.kernel.org, peterz@...radead.org,
	fweisbec@...il.com, paulus@...ba.org, tglx@...utronix.de
Subject: Re: [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@...nha linux]# tools/perf/python/twatch.py
> > Traceback (most recent call last):
> >    File "tools/perf/python/twatch.py", line 16, in<module>
> >      import perf
> > ImportError: /home/acme/git/build/perf/python/perf.so: 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
<SNIP>
>  $ cd tools/perf
>  $ make -j8
<SNIP>
>  $ sudo python/twatch.py
>  Traceback (most recent call last):
>    File "python/twatch.py", line 41, in <module>
>      main()
>    File "python/twatch.py", line 25, in main
>      evsel.open(cpus = 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/setup.py 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',
                     'util/debugfs.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/perf.so
  make

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

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