Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128213
b: refs/heads/master
c: d358e75
h: refs/heads/master
i:
  128211: 50a1fca
v: v3
  • Loading branch information
Robert Richter committed Jan 7, 2009
1 parent e6a5879 commit 9b29939
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 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: d0e233846dcef56ae78f6d8fd0e0cba85a2a1489
refs/heads/master: d358e75fc40cc3bbab11654ba0a88b232c543d12
26 changes: 13 additions & 13 deletions trunk/drivers/oprofile/buffer_sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -325,36 +325,36 @@ static void add_trace_begin(void)
*/
static void add_ibs_begin(int cpu, int code, struct mm_struct *mm)
{
unsigned long rip;
unsigned long pc;
int i, count;
unsigned long ibs_cookie = 0;
unsigned long cookie = 0;
off_t offset;
struct op_sample *sample;

sample = op_cpu_buffer_read_entry(cpu);
if (!sample)
return;
rip = sample->eip;
pc = sample->eip;

#ifdef __LP64__
rip += sample->event << 32;
pc += sample->event << 32;
#endif

if (mm) {
ibs_cookie = lookup_dcookie(mm, rip, &offset);
cookie = lookup_dcookie(mm, pc, &offset);

if (ibs_cookie == NO_COOKIE)
offset = rip;
if (ibs_cookie == INVALID_COOKIE) {
if (cookie == NO_COOKIE)
offset = pc;
if (cookie == INVALID_COOKIE) {
atomic_inc(&oprofile_stats.sample_lost_no_mapping);
offset = rip;
offset = pc;
}
if (ibs_cookie != last_cookie) {
add_cookie_switch(ibs_cookie);
last_cookie = ibs_cookie;
if (cookie != last_cookie) {
add_cookie_switch(cookie);
last_cookie = cookie;
}
} else
offset = rip;
offset = pc;

add_event_entry(ESCAPE_CODE);
add_event_entry(code);
Expand Down

0 comments on commit 9b29939

Please sign in to comment.