1. 22 7月, 2013 1 次提交
  2. 09 7月, 2013 1 次提交
  3. 11 9月, 2012 1 次提交
    • I
      perf tools: Use __maybe_used for unused variables · 1d037ca1
      Irina Tirdea 提交于
      perf defines both __used and __unused variables to use for marking
      unused variables. The variable __used is defined to
      __attribute__((__unused__)), which contradicts the kernel definition to
      __attribute__((__used__)) for new gcc versions. On Android, __used is
      also defined in system headers and this leads to warnings like: warning:
      '__used__' attribute ignored
      
      __unused is not defined in the kernel and is not a standard definition.
      If __unused is included everywhere instead of __used, this leads to
      conflicts with glibc headers, since glibc has a variables with this name
      in its headers.
      
      The best approach is to use __maybe_unused, the definition used in the
      kernel for __attribute__((unused)). In this way there is only one
      definition in perf sources (instead of 2 definitions that point to the
      same thing: __used and __unused) and it works on both Linux and Android.
      This patch simply replaces all instances of __used and __unused with
      __maybe_unused.
      Signed-off-by: NIrina Tirdea <irina.tirdea@intel.com>
      Acked-by: NPekka Enberg <penberg@kernel.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Namhyung Kim <namhyung.kim@lge.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Link: http://lkml.kernel.org/r/1347315303-29906-7-git-send-email-irina.tirdea@intel.com
      [ committer note: fixed up conflict with a116e05d in builtin-sched.c ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1d037ca1
  4. 03 7月, 2012 1 次提交
  5. 28 6月, 2012 1 次提交
  6. 31 1月, 2012 1 次提交
  7. 25 1月, 2012 1 次提交
  8. 26 11月, 2010 1 次提交
    • H
      perf bench: Print both of prefaulted and no prefaulted results by default · 49ce8fc6
      Hitoshi Mitake 提交于
      After applying this patch, perf bench mem memcpy prints
      both of prefualted and without prefaulted score of memcpy().
      
      New options --no-prefault and --only-prefault are added
      to print single result, mainly for scripting usage.
      
      Usage example:
      
       | mitake@X201i:~/linux/.../tools/perf% ./perf bench mem memcpy -l 500MB
       | # Running mem/memcpy benchmark...
       | # Copying 500MB Bytes ...
       |
       |      634.969014 MB/Sec
       |        4.828062 GB/Sec (with prefault)
       | mitake@X201i:~/linux/.../tools/perf% ./perf bench mem memcpy -l 500MB --only-prefault
       | # Running mem/memcpy benchmark...
       | # Copying 500MB Bytes ...
       |
       |        4.705192 GB/Sec (with prefault)
       | mitake@X201i:~/linux/.../tools/perf% ./perf bench mem memcpy -l 500MB --no-prefault
       | # Running mem/memcpy benchmark...
       | # Copying 500MB Bytes ...
       |
       |      642.725568 MB/Sec
      Signed-off-by: NHitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: h.mitake@gmail.com
      Cc: Miao Xie <miaox@cn.fujitsu.com>
      Cc: Ma Ling <ling.ma@intel.com>
      Cc: Zhao Yakui <yakui.zhao@intel.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      LKML-Reference: <1290668693-27068-1-git-send-email-mitake@dcl.info.waseda.ac.jp>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      49ce8fc6
  9. 14 4月, 2010 1 次提交
    • I
      perf: Fix endianness argument compatibility with OPT_BOOLEAN() and introduce OPT_INCR() · c0555642
      Ian Munsie 提交于
      Parsing an option from the command line with OPT_BOOLEAN on a
      bool data type would not work on a big-endian machine due to the
      manner in which the boolean was being cast into an int and
      incremented. For example, running 'perf probe --list' on a
      PowerPC machine would fail to properly set the list_events bool
      and would therefore print out the usage information and
      terminate.
      
      This patch makes OPT_BOOLEAN work as expected with a bool
      datatype. For cases where the original OPT_BOOLEAN was
      intentionally being used to increment an int each time it was
      passed in on the command line, this patch introduces OPT_INCR
      with the old behaviour of OPT_BOOLEAN (the verbose variable is
      currently the only such example of this).
      
      I have reviewed every use of OPT_BOOLEAN to verify that a true
      C99 bool was passed. Where integers were used, I verified that
      they were only being used for boolean logic and changed them to
      bools to ensure that they would not be mistakenly used as ints.
      The major exception was the verbose variable which now uses
      OPT_INCR instead of OPT_BOOLEAN.
      Signed-off-by: NIan Munsie <imunsie@au.ibm.com>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Cc: <stable@kernel.org> # NOTE: wont apply to .3[34].x cleanly, please backport
      Cc: Git development list <git@vger.kernel.org>
      Cc: Ian Munsie <imunsie@au1.ibm.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
      Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Cc: Hitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Eric B Munson <ebmunson@us.ibm.com>
      Cc: Valdis.Kletnieks@vt.edu
      Cc: WANG Cong <amwang@redhat.com>
      Cc: Thiago Farina <tfransosi@gmail.com>
      Cc: Masami Hiramatsu <mhiramat@redhat.com>
      Cc: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com>
      Cc: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
      Cc: Arjan van de Ven <arjan@linux.intel.com>
      Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      Cc: Anton Blanchard <anton@samba.org>
      Cc: John Kacur <jkacur@redhat.com>
      Cc: Li Zefan <lizf@cn.fujitsu.com>
      Cc: Steven Rostedt <rostedt@goodmis.org>
      LKML-Reference: <1271147857-11604-1-git-send-email-imunsie@au.ibm.com>
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      c0555642
  10. 03 4月, 2010 1 次提交
  11. 24 11月, 2009 1 次提交
  12. 22 11月, 2009 1 次提交
    • H
      perf bench: Make the mem/memcpy tests more user-friendly · 12eac0bf
      Hitoshi Mitake 提交于
      mem-memcpy.c uses perf event system calls to obtain CPU clocks.
      And it suddenly dies with BUG_ON() when it running on Linux
      doesn't support perf event.
      
      Also fail at calloc() can occur easily when too large
      length is passed. Fail of calloc() causes sudden death
      with assert().
      
      These behaviours are not friendly. So I fixed the treating of
      errors.
      Signed-off-by: NHitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1258688237-3797-1-git-send-email-mitake@dcl.info.waseda.ac.jp>
      [ v2: improved a few small details ]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      12eac0bf
  13. 19 11月, 2009 1 次提交
    • H
      perf bench: Add memcpy() benchmark · 827f3b49
      Hitoshi Mitake 提交于
      'perf bench mem memcpy' is a benchmark suite for measuring memcpy()
      performance.
      
      Example on a Intel(R) Core(TM)2 Duo CPU E6850 @ 3.00GHz:
      
      | % perf bench mem memcpy -l 1GB
      | # Running mem/memcpy benchmark...
      | # Copying 1MB Bytes from 0xb7d98008 to 0xb7e99008 ...
      |
      |     726.216412 MB/Sec
      Signed-off-by: NHitoshi Mitake <mitake@dcl.info.waseda.ac.jp>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      LKML-Reference: <1258471212-30281-1-git-send-email-mitake@dcl.info.waseda.ac.jp>
      [ v2: updated changelog, clarified history of builtin-bench.c ]
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      827f3b49