1. 26 Feb, 2010 10 commits
    • Robert Richter's avatar
      oprofile/x86: fix perfctr nmi reservation for mulitplexing · 68dc819c
      Robert Richter authored
      Multiple virtual counters share one physical counter. The reservation
      of virtual counters fails due to duplicate allocation of the same
      counter. The counters are already reserved. Thus, virtual counter
      reservation may removed at all. This also makes the code easier.
      
      Cc: stable@kernel.org
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      68dc819c
    • Naga Chumbalkar's avatar
      oprofile/x86: add comment to counter-in-use warning · 8588d106
      Naga Chumbalkar authored
      Currently, oprofile fails silently on platforms where a non-OS entity
      such as the system firmware "enables" and uses a performance
      counter. There is a warning in the code for this case.
      
      The warning indicates an already running counter. If oprofile doesn't
      collect data, then try using a different performance counter on your
      platform to monitor the desired event. Delete the counter from the
      desired event by editing the
      
       /usr/share/oprofile/<cpu_type>/<cpu>/events
      
      file. If the event cannot be monitored by any other counter, contact
      your hardware or BIOS vendor.
      
      Cc: Shashi Belur <shashi-kiran.belur@hp.com>
      Cc: Tony Jones <tonyj@suse.de>
      Signed-off-by: default avatarNaga Chumbalkar <nagananda.chumbalkar@hp.com>
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      8588d106
    • Robert Richter's avatar
      oprofile/x86: warn user if a counter is already active · 98a2e73a
      Robert Richter authored
      This patch generates a warning if a counter is already active.
      
      Implemented for AMD and P6 models. P4 is not supported.
      
      Cc: Naga Chumbalkar <nagananda.chumbalkar@hp.com>
      Cc: Shashi Belur <shashi-kiran.belur@hp.com>
      Cc: Tony Jones <tonyj@suse.de>
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      98a2e73a
    • Robert Richter's avatar
      oprofile/x86: implement randomization for IBS periodic op counter · ba52078e
      Robert Richter authored
      IBS selects an op (execution operation) for sampling by counting
      either cycles or dispatched ops. Better statistical samples can be
      produced by adding a software generated random offset to the periodic
      op counter value with each sample.
      
      This patch adds software randomization to the IBS periodic op
      counter. The lower 12 bits of the 20 bit counter are
      randomized. IbsOpCurCnt is initialized with a 12 bit random value.
      
      There is a work around if the hw can not write to IbsOpCurCnt. Then
      the lower 8 bits of the 16 bit IbsOpMaxCnt [15:0] value are randomized
      in the range of -128 to +127 by adding/subtracting an offset to the
      maximum count (IbsOpMaxCnt).
      
      The linear feedback shift register (LFSR) algorithm is used for
      pseudo-random number generation to have low impact to the memory
      system.
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      ba52078e
    • Suravee Suthikulpanit's avatar
      oprofile/x86: implement lsfr pseudo-random number generator for IBS · f125be14
      Suravee Suthikulpanit authored
      This patch implements a linear feedback shift register (LFSR) for
      pseudo-random number generation for IBS.
      
      For IBS measurements it would be good to minimize memory traffic in
      the interrupt handler since every access pollutes the data
      caches. Computing a maximal period LFSR just needs shifts and ORs.
      
      The LFSR method is good enough to randomize the ops at low
      overhead. 16 pseudo-random bits are enough for the implementation and
      it doesn't matter that the pattern repeats with a fairly short
      cycle. It only needs to break up (hard) periodic sampling behavior.
      
      The logic was designed by Paul Drongowski.
      Signed-off-by: default avatarSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      f125be14
    • Robert Richter's avatar
      oprofile/x86: implement IBS cpuid feature detection · 64683da6
      Robert Richter authored
      This patch adds IBS feature detection using cpuid flags. An IBS
      capability mask is introduced to test for certain IBS features. The
      bit mask is the same as for IBS cpuid feature flags (Fn8000_001B_EAX),
      but bit 0 is used to indicate the existence of IBS.
      
      The patch also changes the handling of the IbsOpCntCtl bit (periodic
      op counter count control). The oprofilefs file for this feature
      (ibs_op/dispatched_ops) will be only exposed if the feature is
      available, also the default for the bit is set to count clock cycles.
      
      In general, the userland can detect the availability of a feature by
      checking for the corresponding file in oprofilefs. If it exists, the
      feature also exists. This may lead to a dynamic file layout depending
      on the cpu type with that the userland has to deal with. Current
      opcontrol is compatible.
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      64683da6
    • Robert Richter's avatar
      oprofile/x86: remove node check in AMD IBS initialization · 89baaaa9
      Robert Richter authored
      Standard AMD systems have the same number of nodes as there are
      northbridge devices. However, there may kernel configurations
      (especially for 32 bit) or system setups exist, where the node number
      is different or it can not be detected properly. Thus the check is not
      reliable and may fail though IBS setup was fine. For this reason it is
      better to remove the check.
      
      Cc: stable <stable@kernel.org>
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      89baaaa9
    • Robert Richter's avatar
      oprofile/x86: remove OPROFILE_IBS config option · 013cfc50
      Robert Richter authored
      OProfile support for IBS is now for several versions in the
      kernel. The feature is stable now and the code can be activated
      permanently.
      
      As a side effect IBS now works also on nosmp configs.
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      013cfc50
    • Robert Richter's avatar
      oprofile: remove EXPERIMENTAL from the config option description · b309a294
      Robert Richter authored
      OProfile is already used for a long time and no longer experimental.
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      b309a294
    • Robert Richter's avatar
      oprofile: remove tracing build dependency · 18b4a4d5
      Robert Richter authored
      The commit
      
       1155de47 ring-buffer: Make it generally available
      
      already made ring-buffer available without the TRACING option
      enabled. This patch removes the TRACING dependency from oprofile.
      
      Fixes also oprofile configuration on ia64.
      
      The patch also applies to the 2.6.32-stable kernel.
      Reported-by: default avatarTony Jones <tonyj@suse.de>
      Cc: stable@kernel.org
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      18b4a4d5
  2. 12 Feb, 2010 12 commits
  3. 11 Feb, 2010 18 commits