diff options
-rw-r--r-- | drivers/oprofile/buffer_sync.c | 20 |
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); |