aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/oprofile/buffer_sync.c
diff options
context:
space:
mode:
authorRobert Richter <robert.richter@amd.com>2008-12-18 13:44:20 -0500
committerRobert Richter <robert.richter@amd.com>2008-12-29 12:53:40 -0500
commit317f33bce6d43367a2fd170bc87ba18a88d2621d (patch)
treebed4d035c7702ba200f09234673e5485854b6f23 /drivers/oprofile/buffer_sync.c
parent9741b309bb4493eedd3cdb5c97b566338a0da2cc (diff)
oprofile: simplify sync_buffer()
Make code more readable. No functional changes. Signed-off-by: Robert Richter <robert.richter@amd.com>
Diffstat (limited to 'drivers/oprofile/buffer_sync.c')
-rw-r--r--drivers/oprofile/buffer_sync.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/oprofile/buffer_sync.c b/drivers/oprofile/buffer_sync.c
index 0abe29e7e4c7..22cdb5108360 100644
--- a/drivers/oprofile/buffer_sync.c
+++ b/drivers/oprofile/buffer_sync.c
@@ -579,12 +579,20 @@ void sync_buffer(int cpu)
579 add_user_ctx_switch(new, cookie); 579 add_user_ctx_switch(new, cookie);
580 break; 580 break;
581 } 581 }
582 } else if (state >= sb_bt_start && 582 continue;
583 !add_sample(mm, s, in_kernel)) { 583 }
584 if (state == sb_bt_start) { 584
585 state = sb_bt_ignore; 585 if (state < sb_bt_start)
586 atomic_inc(&oprofile_stats.bt_lost_no_mapping); 586 /* ignore sample */
587 } 587 continue;
588
589 if (add_sample(mm, s, in_kernel))
590 continue;
591
592 /* ignore backtraces if failed to add a sample */
593 if (state == sb_bt_start) {
594 state = sb_bt_ignore;
595 atomic_inc(&oprofile_stats.bt_lost_no_mapping);
588 } 596 }
589 } 597 }
590 release_mm(mm); 598 release_mm(mm);