mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
oprofile: simplify sync_buffer()
Make code more readable. No functional changes. Signed-off-by: Robert Richter <robert.richter@amd.com>
This commit is contained in:
parent
9741b309bb
commit
317f33bce6
1 changed files with 14 additions and 6 deletions
|
@ -579,12 +579,20 @@ void sync_buffer(int cpu)
|
||||||
add_user_ctx_switch(new, cookie);
|
add_user_ctx_switch(new, cookie);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else if (state >= sb_bt_start &&
|
continue;
|
||||||
!add_sample(mm, s, in_kernel)) {
|
}
|
||||||
if (state == sb_bt_start) {
|
|
||||||
state = sb_bt_ignore;
|
if (state < sb_bt_start)
|
||||||
atomic_inc(&oprofile_stats.bt_lost_no_mapping);
|
/* ignore sample */
|
||||||
}
|
continue;
|
||||||
|
|
||||||
|
if (add_sample(mm, s, in_kernel))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
/* ignore backtraces if failed to add a sample */
|
||||||
|
if (state == sb_bt_start) {
|
||||||
|
state = sb_bt_ignore;
|
||||||
|
atomic_inc(&oprofile_stats.bt_lost_no_mapping);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
release_mm(mm);
|
release_mm(mm);
|
||||||
|
|
Loading…
Add table
Reference in a new issue