1. 26 5月, 2012 1 次提交
    • A
      perf top: Fix counter name fixup when fallbacking to cpu-clock · 895d9766
      Arnaldo Carvalho de Melo 提交于
      In 40491eaa "perf top: Update event name when falling back to cpu-clock"
      we freed counter->name but didn't reset it to NULL, then when setting it
      to the result of event_name(), event_name() would use the cached value,
      which by now was overwritten and thus we got garbage or a zero lenght
      string.
      
      Fix it by just freeing and setting counter->name to NULL, this way
      event_name() when called afterwards, will find the right counter name
      and cache it again.
      
      Found while trying 'cycles:pp' on a machine were :pp couldn't be
      honoured. Probably the best fallback here is to tell the user that that
      level of precision is not available on the PMU and then go removing 'p',
      levels of precision till we get to play 'cycles' and if even that fails,
      _then_ get to 'cpu-clock'.
      
      But that is the matter for another patch, this one just needs to fix the
      caching issue, which in the end will show 'cpu-clock' when tools ask for
      the event name being used, which clarifies things for the user, that
      will see that 'cycles:pp' or whatever not support event is not being
      used, some sort of fallback happened.
      
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-w1neie2dqli89we1bzwkf4id@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      895d9766
  2. 25 5月, 2012 2 次提交
  3. 24 5月, 2012 7 次提交
  4. 23 5月, 2012 4 次提交
  5. 22 5月, 2012 23 次提交
  6. 19 5月, 2012 2 次提交
    • D
      perf evsel: Create events initially disabled -- again · 5e1c81d9
      David Ahern 提交于
      764e16a3 changed perf-record to create events disabled by default and
      enable them once perf initializations are done. This setting was dropped
      by 0f82ebc4. Now perf events are once again generated during perf's
      initialization phase (e.g., generating maps).
      
      As an example, perf opens a lot of files at startup. Unpatched:
      
      perf record -e syscalls:sys_enter_open -ga -fo /tmp/perf.data -- sleep 1
      [ perf record: Woken up 1 times to write data ]
      [ perf record: Captured and wrote 0.087 MB /tmp/perf.data (~3798 samples) ]
      
      Using perf-script to look at the samples shows the perf command generating
      563 of the 566 total events.
      
      Patched:
      
      perf record -e syscalls:sys_enter_open -ga -fo /tmp/perf.data -- sleep 1
      [ perf record: Woken up 1 times to write data ]
      [ perf record: Captured and wrote 0.028 MB /tmp/perf.data (~1206 samples) ]
      
      Using perf-script to look at the samples does not show perf command.
      Signed-off-by: NDavid Ahern <dsahern@gmail.com>
      Link: http://lkml.kernel.org/r/1336968088-11531-1-git-send-email-dsahern@gmail.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      5e1c81d9
    • S
      ktest: Fix kernelrevision with POST_BUILD · 683a3e64
      Steven Rostedt 提交于
      The PRE_BUILD and POST_BUILD options of ktest are added to allow the
      user to add temporary patch to the system and remove it on builds. This
      is sometimes use to take a change from another git branch and add it to
      a series without the fix so that this series can be tested, when an
      unrelated bug exists in the series.
      
      The problem comes when a tagged commit is being used. For example, if
      v3.2 is being tested, and we add a patch to it, the kernelrelease for
      that commit will be 3.2.0+, but without the patch the version will be
      3.2.0. This can cause problems when the kernelrelease is determined for
      creating the /lib/modules directory. The kernel booting has the '+' but
      the module directory will not, and the modules will be missing for that
      boot, and may not allow the kernel to succeed.
      
      The fix is to put the creation of the kernelrelease in the POST_BUILD
      logic, before it applies the POST_BUILD operation. The POST_BUILD is
      where the patch may be removed, removing the '+' from the kernelrelease.
      
      The calculation of the kernelrelease will also stay in its current
      location but will be ignored if it was already calculated previously.
      Signed-off-by: NSteven Rostedt <rostedt@goodmis.org>
      683a3e64
  7. 18 5月, 2012 1 次提交