perf/x86/intel: Discard zero length call entries in LBR call stack
perf/x86/intel: Discard zero length call entries in LBR call stack

"Zero length call" uses the attribute of the call instruction to push
the immediate instruction pointer on to the stack and then pops off
that address into a register. This is accomplished without any matching
return instruction. It confuses the hardware and make the recorded call
stack incorrect.

We can partially resolve this issue by: decode call instructions and
discard any zero length call entry in the LBR stack.

Signed-off-by: Yan, Zheng <45e2ee8c8b09e76a9d512320d4eb53c0cd9925c0@intel.com>
Signed-off-by: Kan Liang <6e4ed0645dbf05e706dc43d69b381839dca8944b@intel.com>
Signed-off-by: Peter Zijlstra (Intel) <3fddac958924aef220f202ca567388ddab3f14a8@infradead.org>
Cc: Arnaldo Carvalho de Melo <293abb6b76d7791c0732cc517d38c4b5c734b87f@kernel.org>
Cc: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>
Cc: Paul Mackerras <19a0ba370c443ba08d20b5061586430ab449ee8c@samba.org>
Cc: f199ae9781930a5b94b284ca2f471140752002a7@google.com
Cc: 2c6594f608aa3d41e98d48846a6328831f7084ad@redhat.com
Link: http://lkml.kernel.org/r/1415156173-10035-16-git-send-email-6e4ed0645dbf05e706dc43d69b381839dca8944b@intel.com
Signed-off-by: Ingo Molnar <9dbbbf0688fedc85ad4da37637f1a64b8c718ee2@kernel.org>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs