lkml.org 
[lkml]   [2013]   [Oct]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2 12/14] perf sched: Fix optimized build time
Em Tue, Oct 22, 2013 at 10:34:16AM +0300, Adrian Hunter escreveu:
> builtin-sched.c took a log time to build with
> -O6 optimization. This turned out to be caused
> by:
>
> .curr_pid = { [0 ... MAX_CPUS - 1] = -1 },
>
> Fix by initializing curr_pid programmatically.

Ok, understood, so its just this bit that was causing the delay,
applying both patches, thanks!

- Arnaldo

> Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> tools/perf/builtin-sched.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
> index 5a33856..ddb5dc1 100644
> --- a/tools/perf/builtin-sched.c
> +++ b/tools/perf/builtin-sched.c
> @@ -1670,7 +1670,6 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
> .sort_list = LIST_HEAD_INIT(sched.sort_list),
> .start_work_mutex = PTHREAD_MUTEX_INITIALIZER,
> .work_done_wait_mutex = PTHREAD_MUTEX_INITIALIZER,
> - .curr_pid = { [0 ... MAX_CPUS - 1] = -1 },
> .sort_order = default_sort_order,
> .replay_repeat = 10,
> .profile_cpu = -1,
> @@ -1732,6 +1731,10 @@ int cmd_sched(int argc, const char **argv, const char *prefix __maybe_unused)
> .switch_event = replay_switch_event,
> .fork_event = replay_fork_event,
> };
> + unsigned int i;
> +
> + for (i = 0; i < ARRAY_SIZE(sched.curr_pid); i++)
> + sched.curr_pid[i] = -1;
>
> argc = parse_options(argc, argv, sched_options, sched_usage,
> PARSE_OPT_STOP_AT_NON_OPTION);
> --
> 1.7.11.7


\
 
 \ /
  Last update: 2013-10-23 15:41    [W:0.182 / U:0.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site