mem/pmc: Print pid for debug sake

When logs are massive it is convenient for grepping.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
Signed-off-by: Andrei Vagin <avagin@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2019-07-05 18:38:06 +03:00 committed by Andrei Vagin
parent 7eec03bd95
commit cb7b013dd0

View file

@ -105,8 +105,8 @@ static int pmc_fill_cache(pmc_t *pmc, const struct vma_area *vma)
pmc->start = vma->e->start;
pmc->end = vma->e->end;
pr_debug("filling VMA %lx-%lx (%zuK) [l:%lx h:%lx]\n",
(long)vma->e->start, (long)vma->e->end, len >> 10, low, high);
pr_debug("%d: filling VMA %lx-%lx (%zuK) [l:%lx h:%lx]\n",
pmc->pid, (long)vma->e->start, (long)vma->e->end, len >> 10, low, high);
/*
* If we meet a small VMA, lets try to fit 2M cache
@ -123,8 +123,8 @@ static int pmc_fill_cache(pmc_t *pmc, const struct vma_area *vma)
size_t size_cov = len;
size_t nr_vmas = 1;
pr_debug("\t%16lx-%-16lx nr:%-5zu cov:%zu\n",
(long)vma->e->start, (long)vma->e->end, nr_vmas, size_cov);
pr_debug("\t%d: %16lx-%-16lx nr:%-5zu cov:%zu\n",
pmc->pid, (long)vma->e->start, (long)vma->e->end, nr_vmas, size_cov);
list_for_each_entry_continue(vma, pmc->vma_head, list) {
if (vma->e->start > high || vma->e->end > high)
@ -134,8 +134,8 @@ static int pmc_fill_cache(pmc_t *pmc, const struct vma_area *vma)
size_cov += vma_area_len(vma);
nr_vmas++;
pr_debug("\t%16lx-%-16lx nr:%-5zu cov:%zu\n",
(long)vma->e->start, (long)vma->e->end, nr_vmas, size_cov);
pr_debug("\t%d: %16lx-%-16lx nr:%-5zu cov:%zu\n",
pmc->pid, (long)vma->e->start, (long)vma->e->end, nr_vmas, size_cov);
}
if (nr_vmas > 1) {
@ -145,9 +145,9 @@ static int pmc_fill_cache(pmc_t *pmc, const struct vma_area *vma)
* allows us to save a couple of code bytes.
*/
pmc->end = high;
pr_debug("\tcache mode [l:%lx h:%lx]\n", pmc->start, pmc->end);
pr_debug("\t%d: cache mode [l:%lx h:%lx]\n", pmc->pid, pmc->start, pmc->end);
} else
pr_debug("\tsimple mode [l:%lx h:%lx]\n", pmc->start, pmc->end);
pr_debug("\t%d: simple mode [l:%lx h:%lx]\n", pmc->pid, pmc->start, pmc->end);
}
size_map = PAGEMAP_LEN(pmc->end - pmc->start);