Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191030
b: refs/heads/master
c: 9414e99
h: refs/heads/master
v: v3
  • Loading branch information
Phil Carmody authored and Robert Richter committed May 3, 2010
1 parent 4245c58 commit 710fc7a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 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: b971f06187d83b5c03d2b597cccdfef421c0ca91
refs/heads/master: 9414e99672271adcc661f3c160a30b374179b92f
12 changes: 10 additions & 2 deletions trunk/drivers/oprofile/cpu_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,16 @@ void oprofile_add_ext_sample(unsigned long pc, struct pt_regs * const regs,

void oprofile_add_sample(struct pt_regs * const regs, unsigned long event)
{
int is_kernel = !user_mode(regs);
unsigned long pc = profile_pc(regs);
int is_kernel;
unsigned long pc;

if (likely(regs)) {
is_kernel = !user_mode(regs);
pc = profile_pc(regs);
} else {
is_kernel = 0; /* This value will not be used */
pc = ESCAPE_CODE; /* as this causes an early return. */
}

__oprofile_add_ext_sample(pc, regs, event, is_kernel);
}
Expand Down

0 comments on commit 710fc7a

Please sign in to comment.