Bug 531271 - Add support for the perf_event_open syscall
Summary: Add support for the perf_event_open syscall
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: valgrind
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL: https://bugs.kde.org/show_bug.cgi?id=...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-27 14:30 UTC by William Cohen
Modified: 2009-11-02 09:44 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-02 09:44:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description William Cohen 2009-10-27 14:30:59 UTC
Description of problem:

The 2.6.31 kernel has a new perf_event_open_syscall. It would be nice if valgrind could run program that make use of that systemcall.

There is a upstream valgrind bz that describes the problems and has a patch for it. The patch has been incorporated into upstream valgrind.

	      https://bugs.kde.org/show_bug.cgi?id=211499


Version-Release number of selected component (if applicable):
valgrind-3.5.0-6

How reproducible:

always


Steps to Reproduce:
1. yum install perf
2. valgrind /usr/libexec/perf.`uname -r` stat ls

  
Actual results:


==15336== Memcheck, a memory error detector
==15336== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==15336== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==15336== Command: /usr/libexec/perf.2.6.31.5-96.fc12.x86_64 stat ls
==15336== 
--15336-- WARNING: unhandled syscall: 298
--15336-- You may be able to write your own handler.
--15336-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--15336-- Nevertheless we consider this a bug.  Please report
--15336-- it at http://valgrind.org/support/bug_reports.html.
...
 Performance counter stats for 'ls':

       0.000000  task-clock-msecs         #      0.000 CPUs 
              0  context-switches         #       -nan M/sec
              0  CPU-migrations           #       -nan M/sec
              0  page-faults              #       -nan M/sec
              0  cycles                   #       -nan M/sec
              0  instructions             #       -nan IPC  
              0  cache-references         #       -nan M/sec
              0  cache-misses             #       -nan M/sec

    0.016513978  seconds time elapsed
...

Expected results:


==15367== Memcheck, a memory error detector
==15367== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==15367== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==15367== Command: /usr/libexec/perf.2.6.31.5-96.fc12.x86_64 stat ls
==15367== 
bin   dev  home   lib	 lost+found  misc  net	proc  sbin     srv  tmp  var
boot  etc  home2  lib64  media	     mnt   opt	root  selinux  sys  usr

 Performance counter stats for 'ls':

       2.041129  task-clock-msecs         #      0.132 CPUs 
              0  context-switches         #      0.000 M/sec
              0  CPU-migrations           #      0.000 M/sec
            235  page-faults              #      0.115 M/sec
        2435588  cycles                   #   1193.255 M/sec
        1155651  instructions             #      0.474 IPC  
         463198  cache-references         #    226.932 M/sec
          14870  cache-misses             #      7.285 M/sec

    0.015504695  seconds time elapsed

==15367== 
==15367== HEAP SUMMARY:
==15367==     in use at exit: 78 bytes in 2 blocks
==15367==   total heap usage: 8 allocs, 6 frees, 1,133 bytes allocated
==15367== 
==15367== LEAK SUMMARY:
==15367==    definitely lost: 65 bytes in 1 blocks
==15367==    indirectly lost: 0 bytes in 0 blocks
==15367==      possibly lost: 0 bytes in 0 blocks
==15367==    still reachable: 13 bytes in 1 blocks
==15367==         suppressed: 0 bytes in 0 blocks
==15367== Rerun with --leak-check=full to see details of leaked memory
==15367== 
==15367== For counts of detected and suppressed errors, rerun with: -v
==15367== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 4 from 4)



Additional info:

Comment 1 Jakub Jelinek 2009-10-27 19:23:20 UTC
KDE#211499 is about cpuid emulation, not about this syscall.

Comment 2 William Cohen 2009-10-27 19:44:15 UTC
Sorry, cut and pasted the wrong line the correct bug is:

https://bugs.kde.org/show_bug.cgi?id=211498

Comment 3 Jakub Jelinek 2009-11-02 09:44:24 UTC
Should be fixed in valgrind-3.5.0-7.


Note You need to log in before you can comment on or make changes to this bug.