]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
tracepoint: Use __idx instead of idx in DO_TRACE macro to make it unique
authorZenghui Yu <yuzenghui@huawei.com>
Wed, 28 Nov 2018 03:35:23 +0000 (03:35 +0000)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Fri, 30 Nov 2018 03:08:38 +0000 (22:08 -0500)
commit0c7a52e4d4b5c4d35b31f3c3ad32af814f1bf491
tree9a4f0aa2071f6b1561c3b0f8b382368ab49eb834
parent3054426dc68e5d63aa6a6e9b91ac4ec78e3f3805
tracepoint: Use __idx instead of idx in DO_TRACE macro to make it unique

After enabling KVM event tracing, almost all of trace_kvm_exit()'s
printk shows

"kvm_exit: IRQ: ..."

even if the actual exception_type is NOT IRQ.  More specifically,
trace_kvm_exit() is defined in virt/kvm/arm/trace.h by TRACE_EVENT.

This slight problem may have existed after commit e6753f23d961
("tracepoint: Make rcuidle tracepoint callers use SRCU"). There are
two variables in trace_kvm_exit() and __DO_TRACE() which have the
same name, *idx*. Thus the actual value of *idx* will be overwritten
when tracing. Fix it by adding a simple prefix.

Cc: Joel Fernandes <joel@joelfernandes.org>
Cc: Wang Haibin <wanghaibin.wang@huawei.com>
Cc: linux-trace-devel@vger.kernel.org
Cc: stable@vger.kernel.org
Fixes: e6753f23d961 ("tracepoint: Make rcuidle tracepoint callers use SRCU")
Reviewed-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Zenghui Yu <yuzenghui@huawei.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
include/linux/tracepoint.h