1. 18 5月, 2010 37 次提交
  2. 17 5月, 2010 3 次提交
    • A
      perf tui: Add workaround for slang < 2.1.4 · dc4ff193
      Arnaldo Carvalho de Melo 提交于
      Older versions of the slang library didn't used the 'const' specifier,
      causing problems with modern compilers of this kind:
      
      util/newt.c:252: error: passing argument 1 of ‘SLsmg_printf’ discards
      qualifiers from pointer target type
      
      Fix it by using some wrappers that when needed const the affected
      parameters back to plain (char *).
      Reported-by: NLin Ming <ming.m.lin@intel.com>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Lin Ming <ming.m.lin@intel.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <20100517145421.GD29052@ghostprotocols.net>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      dc4ff193
    • S
      perf record: Fix bug mismatch with -c option definition · 3de29cab
      Stephane Eranian 提交于
      The -c option defines the user requested sampling period. It was implemented
      using an unsigned int variable but the type of the option was OPT_LONG. Thus,
      the option parser was overwriting memory belonging to other variables, namely
      the mmap_pages leading to a zero page sampling buffer. The bug was exposed only
      when compiling at -O0, probably because the compiler was padding variables at
      higher optimization levels.
      
      This patch fixes this problem by declaring user_interval as u64. This also
      avoids wrap-around issues for large period on 32-bit systems.
      
      Commiter note:
      
      Made it use OPT_U64(user_interval) after implementing OPT_U64 in the
      previous patch.
      
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      LKML-Reference: <4bf11ae9.e88cd80a.06b0.ffffa8e3@mx.google.com>
      Signed-off-by: NStephane Eranian <eranian@google.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      3de29cab
    • A
      perf options: Introduce OPT_U64 · 6ba85cea
      Arnaldo Carvalho de Melo 提交于
      We have things like user_interval (-c/--count) in 'perf record' that
      needs this.
      
      Cc: Frédéric Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Tom Zanussi <tzanussi@gmail.com>
      LKML-Reference: <new-submission>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6ba85cea