Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252066
b: refs/heads/master
c: 6f7bd76
h: refs/heads/master
v: v3
  • Loading branch information
Rakib Mullick authored and Linus Torvalds committed May 27, 2011
1 parent f7c4117 commit ecd5a2e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 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: d98808a253f209465ed9f415c565f4c294a213b8
refs/heads/master: 6f7bd76f05eb2bfbb48d58c0408a50a7e16b2423
16 changes: 9 additions & 7 deletions trunk/kernel/profile.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,14 +303,12 @@ static void profile_discard_flip_buffers(void)
mutex_unlock(&profile_flip_mutex);
}

void profile_hits(int type, void *__pc, unsigned int nr_hits)
static void do_profile_hits(int type, void *__pc, unsigned int nr_hits)
{
unsigned long primary, secondary, flags, pc = (unsigned long)__pc;
int i, j, cpu;
struct profile_hit *hits;

if (prof_on != type || !prof_buffer)
return;
pc = min((pc - (unsigned long)_stext) >> prof_shift, prof_len - 1);
i = primary = (pc & (NR_PROFILE_GRP - 1)) << PROFILE_GRPSHIFT;
secondary = (~(pc << 1) & (NR_PROFILE_GRP - 1)) << PROFILE_GRPSHIFT;
Expand Down Expand Up @@ -417,16 +415,20 @@ static int __cpuinit profile_cpu_callback(struct notifier_block *info,
#define profile_discard_flip_buffers() do { } while (0)
#define profile_cpu_callback NULL

void profile_hits(int type, void *__pc, unsigned int nr_hits)
static void do_profile_hits(int type, void *__pc, unsigned int nr_hits)
{
unsigned long pc;

if (prof_on != type || !prof_buffer)
return;
pc = ((unsigned long)__pc - (unsigned long)_stext) >> prof_shift;
atomic_add(nr_hits, &prof_buffer[min(pc, prof_len - 1)]);
}
#endif /* !CONFIG_SMP */

void profile_hits(int type, void *__pc, unsigned int nr_hits)
{
if (prof_on != type || !prof_buffer)
return;
do_profile_hits(type, __pc, nr_hits);
}
EXPORT_SYMBOL_GPL(profile_hits);

void profile_tick(int type)
Expand Down

0 comments on commit ecd5a2e

Please sign in to comment.