• Stéphane Eranian's avatar
    [PATCH] ia64: perfmon update · 02602b3a
    Stéphane Eranian authored
    Here is a new perfmon patch. It is important because it
    fixes the problem of the close() when the file descriptor
    is shared between two related processes. The good thing
    is that it simplifies a lot the cleanup of the sampling
    buffer.
    
    Here is the ChangeLog:
    
    - fix bug in pfm_close() when the descriptor is
      shared between related processed. Introduce
      a pfm_flush() called for each invocation of
      close(). pfm_close() only called for the last
      user.
    
    - fix pfm_restore_monitoring() to also reload
      the debug registers. They could be modified
      while monitoring is masked.
    
    - fix pfm_close() to clear ctx_fl_is_sampling.
    
    - fix a bug in pfm_handle_work() which could cause
      the wrong PMD to be reset. 
    
    - converted PROTECT_CTX/UNPROTECT_CTX into
      local_irq_save/restore to keep context protection
      but allow IPI to proceed.
    
    - updated pfm_syswide_force_stop() to use
      local_irq_save/restore now that the context
      is protected from the caller side.
    
    - updated pfm_mck_pmc_check() to check if context is 
      loaded before checking for special IBR/DBR combinations.
      Clearing the debug registers is not needed when the context
      is not yet loaded.
    
    - updated perfmon.h to have to correct prototype definitions
      for the pfm_mod_*() functions.
    
    - got rid of the PFM_CTX_TERMINATED state.
    
    - cleanup the DPRINT() statements to remove
      explicit output of current->pid. This is done
       systematically by the macros.
    
    - added a systctl entry (expert_mode) to bypass
      read/write checks on PMC/PMD. As its name indicates
      this is for experts ONLY. Must be root to toggle
      /proc/sys entry.
    
    - corrected pfm_mod_*() to check against the current task.
    
    - removed pfm_mod_fast_read_pmds(). It is never needed.
    
    - added pfm_mod_write_ibrs() and pfm_mod_write_dbrs().
    02602b3a
perfmon.h 9.64 KB