1. 31 Aug, 2010 2 commits
    • Will Deacon's avatar
      ARM: oprofile: fix and simplify init/exit functions · c7fd239a
      Will Deacon authored
      Now that oprofile_arch_exit is only called when the OProfile module
      is unloaded, it can assume that init completed successfully and not
      have to worry about double frees or releasing NULL perf events.
      
      This patch ensures that oprofile_arch_init fails gracefully on ARM
      and simplifies the exit code based on the above.
      
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Matt Fleming <matt@console-pimps.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      c7fd239a
    • Will Deacon's avatar
      oprofile: don't call arch exit code from init code on failure · 979048e1
      Will Deacon authored
      oprofile_init calls oprofile_arch_init to initialise the architecture-specific
      backend code. If this backend code returns failure, oprofile_arch_exit is
      called immediately, making it difficult to allocate and free resources
      correctly.
      
      This patch removes the oprofile_arch_exit call from oprofile_init,
      meaning that all architectures must ensure that oprofile_arch_init
      cleans up any mess it's made before returning an error. As far as
      I can tell, this only affects the code for ARM.
      
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Matt Fleming <matt@console-pimps.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Ingo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
      979048e1
  2. 29 Aug, 2010 3 commits
  3. 28 Aug, 2010 28 commits
  4. 27 Aug, 2010 7 commits