Skip to content

Commit

Permalink
x86, bts: correctly report invalid bts records
Browse files Browse the repository at this point in the history
Impact: change the reporting of empty BTS records

Correctly report a cleared BTS record as invalid. Used to be reported
as branch from 0 to 0.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Markus Metzger authored and Ingo Molnar committed Dec 16, 2008
1 parent cc1dc6d commit d072c25
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions arch/x86/kernel/ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,9 @@ static int bts_read(struct bts_tracer *tracer, const void *at,
out->qualifier = bts_branch;
out->variant.lbr.from = bts_get(at, bts_from);
out->variant.lbr.to = bts_get(at, bts_to);

if (!out->variant.lbr.from && !out->variant.lbr.to)
out->qualifier = bts_invalid;
}

return ds_cfg.sizeof_rec[ds_bts];
Expand Down

0 comments on commit d072c25

Please sign in to comment.