Commit 317f33bc authored by Robert Richter's avatar Robert Richter

oprofile: simplify sync_buffer()

Make code more readable. No functional changes.
Signed-off-by: default avatarRobert Richter <robert.richter@amd.com>
parent 9741b309
...@@ -579,14 +579,22 @@ void sync_buffer(int cpu) ...@@ -579,14 +579,22 @@ 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)
/* ignore sample */
continue;
if (add_sample(mm, s, in_kernel))
continue;
/* ignore backtraces if failed to add a sample */
if (state == sb_bt_start) { if (state == sb_bt_start) {
state = sb_bt_ignore; state = sb_bt_ignore;
atomic_inc(&oprofile_stats.bt_lost_no_mapping); atomic_inc(&oprofile_stats.bt_lost_no_mapping);
} }
} }
}
release_mm(mm); release_mm(mm);
mark_done(cpu); mark_done(cpu);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment