• Hendrik Brueckner's avatar
    s390/cpum_sf: load program parameter at sampler enablement · d4c7e649
    Hendrik Brueckner authored
    The lpp instruction is used to place the PID of the current
    task in the program-parameter (PP) register.  The register
    contents is then included in the sampling data entries.
    
    The lpp instruction loads the PP register only when at least
    one sampling function is enabled.  Otherwise it is executed
    as a no-op.
    
    Linux calls lpp at context switch.  If the context switch
    happens before the sampler is enabled, the PP register is
    empty.  That means, the PID of the task that is sampled is
    not stored in sampling data until the next context switch.
    
    Hence, always call lpp when enabling the sampler.
    Signed-off-by: default avatarHendrik Brueckner <brueckner@linux.vnet.ibm.com>
    Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
    d4c7e649
cpu_mf.h 8.92 KB