Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128224
b: refs/heads/master
c: 9b93418
h: refs/heads/master
v: v3
  • Loading branch information
Carl Love authored and Robert Richter committed Jan 8, 2009
1 parent 993804e commit cd7b3d0
Show file tree
Hide file tree
Showing 16 changed files with 657 additions and 720 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d2852b932f0bb5e89177aa27c7bcf07f4167e129
refs/heads/master: 9b93418e7ee59dbc96d44cfde7f65f886e54dba9
2 changes: 0 additions & 2 deletions trunk/arch/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ config OPROFILE
tristate "OProfile system profiling (EXPERIMENTAL)"
depends on PROFILING
depends on HAVE_OPROFILE
select TRACING
select RING_BUFFER
help
OProfile is a profiling system capable of profiling the
whole system, include the kernel, kernel modules, libraries,
Expand Down
24 changes: 12 additions & 12 deletions trunk/arch/powerpc/oprofile/cell/spu_profiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ static unsigned int profiling_interval;

#define SPU_PC_MASK 0xFFFF

static DEFINE_SPINLOCK(sample_array_lock);
unsigned long sample_array_lock_flags;
static DEFINE_SPINLOCK(oprof_spu_smpl_arry_lck);
unsigned long oprof_spu_smpl_arry_lck_flags;

void set_spu_profiling_frequency(unsigned int freq_khz, unsigned int cycles_reset)
{
Expand Down Expand Up @@ -145,13 +145,13 @@ static enum hrtimer_restart profile_spus(struct hrtimer *timer)
* sample array must be loaded and then processed for a given
* cpu. The sample array is not per cpu.
*/
spin_lock_irqsave(&sample_array_lock,
sample_array_lock_flags);
spin_lock_irqsave(&oprof_spu_smpl_arry_lck,
oprof_spu_smpl_arry_lck_flags);
num_samples = cell_spu_pc_collection(cpu);

if (num_samples == 0) {
spin_unlock_irqrestore(&sample_array_lock,
sample_array_lock_flags);
spin_unlock_irqrestore(&oprof_spu_smpl_arry_lck,
oprof_spu_smpl_arry_lck_flags);
continue;
}

Expand All @@ -162,8 +162,8 @@ static enum hrtimer_restart profile_spus(struct hrtimer *timer)
num_samples);
}

spin_unlock_irqrestore(&sample_array_lock,
sample_array_lock_flags);
spin_unlock_irqrestore(&oprof_spu_smpl_arry_lck,
oprof_spu_smpl_arry_lck_flags);

}
smp_wmb(); /* insure spu event buffer updates are written */
Expand All @@ -182,13 +182,13 @@ static enum hrtimer_restart profile_spus(struct hrtimer *timer)

static struct hrtimer timer;
/*
* Entry point for SPU profiling.
* Entry point for SPU cycle profiling.
* NOTE: SPU profiling is done system-wide, not per-CPU.
*
* cycles_reset is the count value specified by the user when
* setting up OProfile to count SPU_CYCLES.
*/
int start_spu_profiling(unsigned int cycles_reset)
int start_spu_profiling_cycles(unsigned int cycles_reset)
{
ktime_t kt;

Expand All @@ -212,10 +212,10 @@ int start_spu_profiling(unsigned int cycles_reset)
return 0;
}

void stop_spu_profiling(void)
void stop_spu_profiling_cycles(void)
{
spu_prof_running = 0;
hrtimer_cancel(&timer);
kfree(samples);
pr_debug("SPU_PROF: stop_spu_profiling issued\n");
pr_debug("SPU_PROF: stop_spu_profiling_cycles issued\n");
}
Loading

0 comments on commit cd7b3d0

Please sign in to comment.