Commit 888d5e98 authored by Christian Borntraeger's avatar Christian Borntraeger Committed by Martin Schwidefsky

KVM: s390: use pid of cpu thread for sampling tagging

Right now we use the address of the sie control block as tag for
the sampling data. This is hard to get for users. Let's just use
the PID of the cpu thread to mark the hardware samples.
Reviewed-by: default avatarDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent d0164ee2
...@@ -199,7 +199,7 @@ ENTRY(sie64a) ...@@ -199,7 +199,7 @@ ENTRY(sie64a)
jo .Lsie_skip # exit if fp/vx regs changed jo .Lsie_skip # exit if fp/vx regs changed
tm __LC_MACHINE_FLAGS+6,0x20 # MACHINE_FLAG_LPP tm __LC_MACHINE_FLAGS+6,0x20 # MACHINE_FLAG_LPP
jz .Lsie_enter jz .Lsie_enter
.insn s,0xb2800000,__SF_EMPTY(%r15) # set guest id .insn s,0xb2800000,__LC_CURRENT_PID # set guest id to pid
.Lsie_enter: .Lsie_enter:
sie 0(%r14) sie 0(%r14)
tm __LC_MACHINE_FLAGS+6,0x20 # MACHINE_FLAG_LPP tm __LC_MACHINE_FLAGS+6,0x20 # MACHINE_FLAG_LPP
......
...@@ -1019,12 +1019,9 @@ static int perf_push_sample(struct perf_event *event, struct sf_raw_sample *sfr) ...@@ -1019,12 +1019,9 @@ static int perf_push_sample(struct perf_event *event, struct sf_raw_sample *sfr)
break; break;
} }
/* The host-program-parameter (hpp) contains the sie control /* The host-program-parameter (hpp) contains the pid of
* block that is set by sie64a() in entry64.S. Check if hpp * the CPU thread as set by sie64a() in entry.S.
* refers to a valid control block and set sde_regs flags * If non-zero assume a guest sample.
* accordingly. This would allow to use hpp values for other
* purposes too.
* For now, simply use a non-zero value as guest indicator.
*/ */
if (sfr->basic.hpp) if (sfr->basic.hpp)
sde_regs->in_guest = 1; sde_regs->in_guest = 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment