perf/core: Factor out functions to allocate/free the task_ctx_data
authorKan Liang <kan.liang@linux.intel.com>
Fri, 3 Jul 2020 12:49:21 +0000 (05:49 -0700)
committerPeter Zijlstra <peterz@infradead.org>
Wed, 8 Jul 2020 09:38:54 +0000 (11:38 +0200)
commitff9ff926889dd8026b4ba55266a010c27f68604f
tree1b1c03a21b7aad24a5476430273ba413feb495dd
parent47125db27e47e9d44c878bf8925aa057824bb0d5
perf/core: Factor out functions to allocate/free the task_ctx_data

The method to allocate/free the task_ctx_data is going to be changed in
the following patch. Currently, the task_ctx_data is allocated/freed in
several different places. To avoid repeatedly modifying the same codes
in several different places, alloc_task_ctx_data() and
free_task_ctx_data() are factored out to allocate/free the
task_ctx_data. The modification only needs to be applied once.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/1593780569-62993-16-git-send-email-kan.liang@linux.intel.com
kernel/events/core.c