Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1216605 > unrolled thread

[PATCH] perf tools: Fix random building error

Started byWang Nan <wangnan0@huawei.com>
First post2015-09-01 08:00 +0200
Last post2015-09-02 09:30 +0200
Articles 5 — 5 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] perf tools: Fix random building error Wang Nan <wangnan0@huawei.com> - 2015-09-01 08:00 +0200
    Re: [PATCH] perf tools: Fix random building error Adrian Hunter <adrian.hunter@intel.com> - 2015-09-01 08:30 +0200
      Re: [PATCH] perf tools: Fix random building error "Wangnan (F)" <wangnan0@huawei.com> - 2015-09-01 08:50 +0200
      Re: [PATCH] perf tools: Fix random building error Jiri Olsa <jolsa@redhat.com> - 2015-09-01 12:50 +0200
    [tip:perf/urgent] perf build:   Fix Intel PT instruction decoder dependency problem tip-bot for Wang Nan <tipbot@zytor.com> - 2015-09-02 09:30 +0200

#1216605 — [PATCH] perf tools: Fix random building error

FromWang Nan <wangnan0@huawei.com>
Date2015-09-01 08:00 +0200
Subject[PATCH] perf tools: Fix random building error
Message-ID<q3MLT-63J-3@gated-at.bofh.it>
I hit following building error randomly:

  ...
/bin/sh: /path/to/kernel/buildperf/util/intel-pt-decoder/inat-tables.c: No such file or directory
  ...
  LINK     /path/to/kernel/buildperf/plugin_mac80211.so
  LINK     /path/to/kernel/buildperf/plugin_kmem.so
  LINK     /path/to/kernel/buildperf/plugin_xen.so
  LINK     /path/to/kernel/buildperf/plugin_hrtimer.so
In file included from util/intel-pt-decoder/intel-pt-insn-decoder.c:25:0:
util/intel-pt-decoder/inat.c:24:25: fatal error: inat-tables.c: No such file or directory
 #include "inat-tables.c"
                         ^
compilation terminated.
make[4]: *** [/path/to/kernel/buildperf/util/intel-pt-decoder/intel-pt-insn-decoder.o] Error 1
make[4]: *** Waiting for unfinished jobs....
  LINK     /path/to/kernel/buildperf/plugin_function.so

This is caused by tools/perf/util/intel-pt-decoder/Build that, it tries to
generate $(OUTPUT)util/intel-pt-decoder/inat-tables.c atomatically but
forget to ensure the existance of $(OUTPUT)util/intel-pt-decoder directory.

This patch fixes it by adding $(call rule_mkdir) like other similar rules.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
---
 tools/perf/util/intel-pt-decoder/Build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/intel-pt-decoder/Build b/tools/perf/util/intel-pt-decoder/Build
index 240730d..2386322 100644
--- a/tools/perf/util/intel-pt-decoder/Build
+++ b/tools/perf/util/intel-pt-decoder/Build
@@ -4,6 +4,7 @@ inat_tables_script = util/intel-pt-decoder/gen-insn-attr-x86.awk
 inat_tables_maps = util/intel-pt-decoder/x86-opcode-map.txt
 
 $(OUTPUT)util/intel-pt-decoder/inat-tables.c: $(inat_tables_script) $(inat_tables_maps)
+	$(call rule_mkdir)
 	@$(call echo-cmd,gen)$(AWK) -f $(inat_tables_script) $(inat_tables_maps) > $@ || rm -f $@
 
 $(OUTPUT)util/intel-pt-decoder/intel-pt-insn-decoder.o: util/intel-pt-decoder/inat.c $(OUTPUT)util/intel-pt-decoder/inat-tables.c
-- 
1.8.3.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1216624

FromAdrian Hunter <adrian.hunter@intel.com>
Date2015-09-01 08:30 +0200
Message-ID<q3NeV-6Rp-3@gated-at.bofh.it>
In reply to#1216605
On 01/09/15 08:56, Wang Nan wrote:
> I hit following building error randomly:

Random presumably because there is a race to use/create the directory by
different make jobs (i.e. -j option).

> 
>   ...
> /bin/sh: /path/to/kernel/buildperf/util/intel-pt-decoder/inat-tables.c: No such file or directory
>   ...
>   LINK     /path/to/kernel/buildperf/plugin_mac80211.so
>   LINK     /path/to/kernel/buildperf/plugin_kmem.so
>   LINK     /path/to/kernel/buildperf/plugin_xen.so
>   LINK     /path/to/kernel/buildperf/plugin_hrtimer.so
> In file included from util/intel-pt-decoder/intel-pt-insn-decoder.c:25:0:
> util/intel-pt-decoder/inat.c:24:25: fatal error: inat-tables.c: No such file or directory
>  #include "inat-tables.c"
>                          ^
> compilation terminated.
> make[4]: *** [/path/to/kernel/buildperf/util/intel-pt-decoder/intel-pt-insn-decoder.o] Error 1
> make[4]: *** Waiting for unfinished jobs....
>   LINK     /path/to/kernel/buildperf/plugin_function.so
> 
> This is caused by tools/perf/util/intel-pt-decoder/Build that, it tries to
> generate $(OUTPUT)util/intel-pt-decoder/inat-tables.c atomatically but
> forget to ensure the existance of $(OUTPUT)util/intel-pt-decoder directory.
> 
> This patch fixes it by adding $(call rule_mkdir) like other similar rules.
> 
> Signed-off-by: Wang Nan <wangnan0@huawei.com>
> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> Cc: Adrian Hunter <adrian.hunter@intel.com>

Looks ok to me. Jiri?

> ---
>  tools/perf/util/intel-pt-decoder/Build | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/tools/perf/util/intel-pt-decoder/Build b/tools/perf/util/intel-pt-decoder/Build
> index 240730d..2386322 100644
> --- a/tools/perf/util/intel-pt-decoder/Build
> +++ b/tools/perf/util/intel-pt-decoder/Build
> @@ -4,6 +4,7 @@ inat_tables_script = util/intel-pt-decoder/gen-insn-attr-x86.awk
>  inat_tables_maps = util/intel-pt-decoder/x86-opcode-map.txt
>  
>  $(OUTPUT)util/intel-pt-decoder/inat-tables.c: $(inat_tables_script) $(inat_tables_maps)
> +	$(call rule_mkdir)
>  	@$(call echo-cmd,gen)$(AWK) -f $(inat_tables_script) $(inat_tables_maps) > $@ || rm -f $@
>  
>  $(OUTPUT)util/intel-pt-decoder/intel-pt-insn-decoder.o: util/intel-pt-decoder/inat.c $(OUTPUT)util/intel-pt-decoder/inat-tables.c
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1216628

From"Wangnan (F)" <wangnan0@huawei.com>
Date2015-09-01 08:50 +0200
Message-ID<q3Nyi-7dR-9@gated-at.bofh.it>
In reply to#1216624

On 2015/9/1 14:24, Adrian Hunter wrote:
> On 01/09/15 08:56, Wang Nan wrote:
>> I hit following building error randomly:
> Random presumably because there is a race to use/create the directory by
> different make jobs (i.e. -j option).

Yes, I use -j 160 :)

>>    ...
>> /bin/sh: /path/to/kernel/buildperf/util/intel-pt-decoder/inat-tables.c: No such file or directory
>>    ...
>>    LINK     /path/to/kernel/buildperf/plugin_mac80211.so
>>    LINK     /path/to/kernel/buildperf/plugin_kmem.so
>>    LINK     /path/to/kernel/buildperf/plugin_xen.so
>>    LINK     /path/to/kernel/buildperf/plugin_hrtimer.so
>> In file included from util/intel-pt-decoder/intel-pt-insn-decoder.c:25:0:
>> util/intel-pt-decoder/inat.c:24:25: fatal error: inat-tables.c: No such file or directory
>>   #include "inat-tables.c"
>>                           ^
>> compilation terminated.
>> make[4]: *** [/path/to/kernel/buildperf/util/intel-pt-decoder/intel-pt-insn-decoder.o] Error 1
>> make[4]: *** Waiting for unfinished jobs....
>>    LINK     /path/to/kernel/buildperf/plugin_function.so
>>
>> This is caused by tools/perf/util/intel-pt-decoder/Build that, it tries to
>> generate $(OUTPUT)util/intel-pt-decoder/inat-tables.c atomatically but
>> forget to ensure the existance of $(OUTPUT)util/intel-pt-decoder directory.
>>
>> This patch fixes it by adding $(call rule_mkdir) like other similar rules.
>>
>> Signed-off-by: Wang Nan <wangnan0@huawei.com>
>> Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
>> Cc: Adrian Hunter <adrian.hunter@intel.com>
> Looks ok to me. Jiri?
>
>> ---
>>   tools/perf/util/intel-pt-decoder/Build | 1 +
>>   1 file changed, 1 insertion(+)
>>
>> diff --git a/tools/perf/util/intel-pt-decoder/Build b/tools/perf/util/intel-pt-decoder/Build
>> index 240730d..2386322 100644
>> --- a/tools/perf/util/intel-pt-decoder/Build
>> +++ b/tools/perf/util/intel-pt-decoder/Build
>> @@ -4,6 +4,7 @@ inat_tables_script = util/intel-pt-decoder/gen-insn-attr-x86.awk
>>   inat_tables_maps = util/intel-pt-decoder/x86-opcode-map.txt
>>   
>>   $(OUTPUT)util/intel-pt-decoder/inat-tables.c: $(inat_tables_script) $(inat_tables_maps)
>> +	$(call rule_mkdir)
>>   	@$(call echo-cmd,gen)$(AWK) -f $(inat_tables_script) $(inat_tables_maps) > $@ || rm -f $@
>>   
>>   $(OUTPUT)util/intel-pt-decoder/intel-pt-insn-decoder.o: util/intel-pt-decoder/inat.c $(OUTPUT)util/intel-pt-decoder/inat-tables.c
>>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1216765

FromJiri Olsa <jolsa@redhat.com>
Date2015-09-01 12:50 +0200
Message-ID<q3Riz-49v-27@gated-at.bofh.it>
In reply to#1216624
On Tue, Sep 01, 2015 at 09:24:14AM +0300, Adrian Hunter wrote:
> On 01/09/15 08:56, Wang Nan wrote:
> > I hit following building error randomly:
> 
> Random presumably because there is a race to use/create the directory by
> different make jobs (i.e. -j option).
> 
> > 
> >   ...
> > /bin/sh: /path/to/kernel/buildperf/util/intel-pt-decoder/inat-tables.c: No such file or directory
> >   ...
> >   LINK     /path/to/kernel/buildperf/plugin_mac80211.so
> >   LINK     /path/to/kernel/buildperf/plugin_kmem.so
> >   LINK     /path/to/kernel/buildperf/plugin_xen.so
> >   LINK     /path/to/kernel/buildperf/plugin_hrtimer.so
> > In file included from util/intel-pt-decoder/intel-pt-insn-decoder.c:25:0:
> > util/intel-pt-decoder/inat.c:24:25: fatal error: inat-tables.c: No such file or directory
> >  #include "inat-tables.c"
> >                          ^
> > compilation terminated.
> > make[4]: *** [/path/to/kernel/buildperf/util/intel-pt-decoder/intel-pt-insn-decoder.o] Error 1
> > make[4]: *** Waiting for unfinished jobs....
> >   LINK     /path/to/kernel/buildperf/plugin_function.so
> > 
> > This is caused by tools/perf/util/intel-pt-decoder/Build that, it tries to
> > generate $(OUTPUT)util/intel-pt-decoder/inat-tables.c atomatically but
> > forget to ensure the existance of $(OUTPUT)util/intel-pt-decoder directory.
> > 
> > This patch fixes it by adding $(call rule_mkdir) like other similar rules.
> > 
> > Signed-off-by: Wang Nan <wangnan0@huawei.com>
> > Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
> > Cc: Adrian Hunter <adrian.hunter@intel.com>
> 
> Looks ok to me. Jiri?

right, each separate rule needs to have this

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [next] | [standalone]


#1217367 — [tip:perf/urgent] perf build: Fix Intel PT instruction decoder dependency problem

Fromtip-bot for Wang Nan <tipbot@zytor.com>
Date2015-09-02 09:30 +0200
Subject[tip:perf/urgent] perf build: Fix Intel PT instruction decoder dependency problem
Message-ID<q4aEy-6H0-11@gated-at.bofh.it>
In reply to#1216605
Commit-ID:  04aa90b529ee45c5ee88997bc214202e07b26979
Gitweb:     http://git.kernel.org/tip/04aa90b529ee45c5ee88997bc214202e07b26979
Author:     Wang Nan <wangnan0@huawei.com>
AuthorDate: Tue, 1 Sep 2015 05:56:45 +0000
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Tue, 1 Sep 2015 13:03:46 -0300

perf build: Fix Intel PT instruction decoder dependency problem

I hit following building error randomly:

    ...
  /bin/sh: /path/to/kernel/buildperf/util/intel-pt-decoder/inat-tables.c: No such file or directory
    ...
    LINK     /path/to/kernel/buildperf/plugin_mac80211.so
    LINK     /path/to/kernel/buildperf/plugin_kmem.so
    LINK     /path/to/kernel/buildperf/plugin_xen.so
    LINK     /path/to/kernel/buildperf/plugin_hrtimer.so
  In file included from util/intel-pt-decoder/intel-pt-insn-decoder.c:25:0:
  util/intel-pt-decoder/inat.c:24:25: fatal error: inat-tables.c: No such file or directory
   #include "inat-tables.c"
                           ^
  compilation terminated.
  make[4]: *** [/path/to/kernel/buildperf/util/intel-pt-decoder/intel-pt-insn-decoder.o] Error 1
  make[4]: *** Waiting for unfinished jobs....
    LINK     /path/to/kernel/buildperf/plugin_function.so

This is caused by tools/perf/util/intel-pt-decoder/Build that, it tries
to generate $(OUTPUT)util/intel-pt-decoder/inat-tables.c atomatically
but forget to ensure the existance of $(OUTPUT)util/intel-pt-decoder
directory.

This patch fixes it by adding $(call rule_mkdir) like other similar rules.

Signed-off-by: Wang Nan <wangnan0@huawei.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Zefan Li <lizefan@huawei.com>
Cc: pi3orama@163.com
Link: http://lkml.kernel.org/r/1441087005-107540-1-git-send-email-wangnan0@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/intel-pt-decoder/Build | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/intel-pt-decoder/Build b/tools/perf/util/intel-pt-decoder/Build
index 240730d..2386322 100644
--- a/tools/perf/util/intel-pt-decoder/Build
+++ b/tools/perf/util/intel-pt-decoder/Build
@@ -4,6 +4,7 @@ inat_tables_script = util/intel-pt-decoder/gen-insn-attr-x86.awk
 inat_tables_maps = util/intel-pt-decoder/x86-opcode-map.txt
 
 $(OUTPUT)util/intel-pt-decoder/inat-tables.c: $(inat_tables_script) $(inat_tables_maps)
+	$(call rule_mkdir)
 	@$(call echo-cmd,gen)$(AWK) -f $(inat_tables_script) $(inat_tables_maps) > $@ || rm -f $@
 
 $(OUTPUT)util/intel-pt-decoder/intel-pt-insn-decoder.o: util/intel-pt-decoder/inat.c $(OUTPUT)util/intel-pt-decoder/inat-tables.c
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web