percpu: add tracepoint support for percpu memory

Add support for tracepoints to the following events: chunk allocation,
chunk free, area allocation, area free, and area allocation failure.
This should let us replay percpu memory requests and evaluate
corresponding decisions.

Signed-off-by: Dennis Zhou <dennisz@fb.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
Dennis Zhou
2017-06-19 19:28:32 -04:00
committed by Tejun Heo
parent 30a5b5367e
commit df95e795a7
4 changed files with 141 additions and 0 deletions

View File

@@ -345,6 +345,7 @@ static struct pcpu_chunk *pcpu_create_chunk(void)
chunk->base_addr = vms[0]->addr - pcpu_group_offsets[0];
pcpu_stats_chunk_alloc();
trace_percpu_create_chunk(chunk->base_addr);
return chunk;
}
@@ -352,6 +353,7 @@ static struct pcpu_chunk *pcpu_create_chunk(void)
static void pcpu_destroy_chunk(struct pcpu_chunk *chunk)
{
pcpu_stats_chunk_dealloc();
trace_percpu_destroy_chunk(chunk->base_addr);
if (chunk && chunk->data)
pcpu_free_vm_areas(chunk->data, pcpu_nr_groups);