From: Markus Metzger Date: Tue, 16 Dec 2008 14:53:11 +0000 (+0100) Subject: x86, bts: correctly report invalid bts records X-Git-Tag: v2.6.29-rc1~586^2~8^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=d072c25f531c6513994960401d2c7f059434c0d2;p=linux-2.6-omap-h63xx.git x86, bts: correctly report invalid bts records 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 Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/ds.c b/arch/x86/kernel/ds.c index 0dc795951d7..98d271e60e0 100644 --- a/arch/x86/kernel/ds.c +++ b/arch/x86/kernel/ds.c @@ -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];