Re: [webkit-dev] Offline Assembler build step always computes hashes even when nothing changes

2018-09-17 Thread Keith Miller
IIRC, it spends a bunch of time in the offline assembler ruby scripts. AFAIK, 
those scripts only depend on the LowLevelInterpreter*.asm files. So we should 
only need to run it if those files have changed. Or, for the assembly 
generation half, if there is also a new object offsets binary (from 
LLIntOffsetsExtractor.cpp).

Cheers,
Keith

> On Sep 17, 2018, at 10:21 AM, Filip Pizlo  wrote:
> 
> Sorry, I should have asked: does it even rebuild when you change nothing?
> 
> That llint step really does depend on most headers in WTF and JSC, so if you 
> change any of them then I would expect a rebuild of that file. It may be that 
> the right solution is to make that step faster and to make it possible to run 
> it in parallel to other steps. 
> 
> -Filip
> 
> On Sep 17, 2018, at 10:01 AM, Darin Adler  > wrote:
> 
>> I don’t know. 
>> 
>> Sent from my iPhone
>> 
>> On Sep 17, 2018, at 7:49 AM, Filip Pizlo > > wrote:
>> 
>>> 
>>> 
>>> On Sep 16, 2018, at 8:48 PM, Darin Adler >> > wrote:
>>> 
> On Sep 16, 2018, at 5:59 PM, Filip Pizlo  > wrote:
> 
> Which offline assembler build step are you referring to?
 
 The one that is the “Offline Assembler” target in Xcode, which runs this 
 command:
 
 ruby JavaScriptCore/offlineasm/asm.rb 
 JavaScriptCore/llint/LowLevelInterpreter.asm 
 "${BUILT_PRODUCTS_DIR}/JSCLLIntOffsetsExtractor” LLIntAssembly.h
 
 For a “nothing rebuild” of all of WebKit and all of Safari for iOS on my 
 iMac, it takes about 10 seconds out of a 30 second total “build" time.
 
 Looking more carefully at the build log now, it seems that recompiling 
 LLIntOffsetExtractor.cpp is also taking multiple seconds. Not executing 
 generate_offset_extractor.rb, but compiling the output.
>>> 
>>> Does every build that you do rebuild LLIntOffsetExtractor.cpp?  Including a 
>>> clean build?
>>> 
>>> -Filip
>>> 
 
 — Darin
> ___
> webkit-dev mailing list
> webkit-dev@lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Offline Assembler build step always computes hashes even when nothing changes

2018-09-17 Thread Filip Pizlo
Sorry, I should have asked: does it even rebuild when you change nothing?

That llint step really does depend on most headers in WTF and JSC, so if you 
change any of them then I would expect a rebuild of that file. It may be that 
the right solution is to make that step faster and to make it possible to run 
it in parallel to other steps. 

-Filip

> On Sep 17, 2018, at 10:01 AM, Darin Adler  wrote:
> 
> I don’t know. 
> 
> Sent from my iPhone
> 
>> On Sep 17, 2018, at 7:49 AM, Filip Pizlo  wrote:
>> 
>> 
>> 
>>> On Sep 16, 2018, at 8:48 PM, Darin Adler  wrote:
>>> 
 On Sep 16, 2018, at 5:59 PM, Filip Pizlo  wrote:
 
 Which offline assembler build step are you referring to?
>>> 
>>> The one that is the “Offline Assembler” target in Xcode, which runs this 
>>> command:
>>> 
>>> ruby JavaScriptCore/offlineasm/asm.rb 
>>> JavaScriptCore/llint/LowLevelInterpreter.asm 
>>> "${BUILT_PRODUCTS_DIR}/JSCLLIntOffsetsExtractor” LLIntAssembly.h
>>> 
>>> For a “nothing rebuild” of all of WebKit and all of Safari for iOS on my 
>>> iMac, it takes about 10 seconds out of a 30 second total “build" time.
>>> 
>>> Looking more carefully at the build log now, it seems that recompiling 
>>> LLIntOffsetExtractor.cpp is also taking multiple seconds. Not executing 
>>> generate_offset_extractor.rb, but compiling the output.
>> 
>> Does every build that you do rebuild LLIntOffsetExtractor.cpp?  Including a 
>> clean build?
>> 
>> -Filip
>> 
>>> 
>>> — Darin
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Offline Assembler build step always computes hashes even when nothing changes

2018-09-17 Thread Darin Adler
I don’t know. 

Sent from my iPhone

> On Sep 17, 2018, at 7:49 AM, Filip Pizlo  wrote:
> 
> 
> 
>> On Sep 16, 2018, at 8:48 PM, Darin Adler  wrote:
>> 
>>> On Sep 16, 2018, at 5:59 PM, Filip Pizlo  wrote:
>>> 
>>> Which offline assembler build step are you referring to?
>> 
>> The one that is the “Offline Assembler” target in Xcode, which runs this 
>> command:
>> 
>> ruby JavaScriptCore/offlineasm/asm.rb 
>> JavaScriptCore/llint/LowLevelInterpreter.asm 
>> "${BUILT_PRODUCTS_DIR}/JSCLLIntOffsetsExtractor” LLIntAssembly.h
>> 
>> For a “nothing rebuild” of all of WebKit and all of Safari for iOS on my 
>> iMac, it takes about 10 seconds out of a 30 second total “build" time.
>> 
>> Looking more carefully at the build log now, it seems that recompiling 
>> LLIntOffsetExtractor.cpp is also taking multiple seconds. Not executing 
>> generate_offset_extractor.rb, but compiling the output.
> 
> Does every build that you do rebuild LLIntOffsetExtractor.cpp?  Including a 
> clean build?
> 
> -Filip
> 
>> 
>> — Darin
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Offline Assembler build step always computes hashes even when nothing changes

2018-09-17 Thread Filip Pizlo


> On Sep 16, 2018, at 8:48 PM, Darin Adler  wrote:
> 
>> On Sep 16, 2018, at 5:59 PM, Filip Pizlo  wrote:
>> 
>> Which offline assembler build step are you referring to?
> 
> The one that is the “Offline Assembler” target in Xcode, which runs this 
> command:
> 
> ruby JavaScriptCore/offlineasm/asm.rb 
> JavaScriptCore/llint/LowLevelInterpreter.asm 
> "${BUILT_PRODUCTS_DIR}/JSCLLIntOffsetsExtractor” LLIntAssembly.h
> 
> For a “nothing rebuild” of all of WebKit and all of Safari for iOS on my 
> iMac, it takes about 10 seconds out of a 30 second total “build" time.
> 
> Looking more carefully at the build log now, it seems that recompiling 
> LLIntOffsetExtractor.cpp is also taking multiple seconds. Not executing 
> generate_offset_extractor.rb, but compiling the output.

Does every build that you do rebuild LLIntOffsetExtractor.cpp?  Including a 
clean build?

-Filip

> 
> — Darin
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Offline Assembler build step always computes hashes even when nothing changes

2018-09-16 Thread Darin Adler
> On Sep 16, 2018, at 5:59 PM, Filip Pizlo  wrote:
> 
> Which offline assembler build step are you referring to?

The one that is the “Offline Assembler” target in Xcode, which runs this 
command:

ruby JavaScriptCore/offlineasm/asm.rb 
JavaScriptCore/llint/LowLevelInterpreter.asm 
"${BUILT_PRODUCTS_DIR}/JSCLLIntOffsetsExtractor” LLIntAssembly.h

For a “nothing rebuild” of all of WebKit and all of Safari for iOS on my iMac, 
it takes about 10 seconds out of a 30 second total “build" time.

Looking more carefully at the build log now, it seems that recompiling 
LLIntOffsetExtractor.cpp is also taking multiple seconds. Not executing 
generate_offset_extractor.rb, but compiling the output.

— Darin___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Offline Assembler build step always computes hashes even when nothing changes

2018-09-16 Thread Filip Pizlo


> On Sep 16, 2018, at 4:03 PM, Darin Adler  wrote:
> 
> I noticed that the “Offline Assembler” build step was taking between 5 and 30 
> seconds every time I build. Really stands out in incremental builds. I 
> realized that this step does not do any dependency analysis. Every time, it 
> builds a hash of the input to see if it needs to recompute the assembly.

Yup, that’s quite intentional. 

> 
> That’s probably not the best pattern; normally we like to use file 
> modification dates to avoid doing any work when files haven’t changed.

I don’t totally remember the details, but it’s not that simple. I vaguely 
recall a previous attempt to fix this that had to be reverted because it 
resulted in too many broken builds.

Which offline assembler build step are you referring to?  There is more than 
one. I think it’s the step that generates the LLInt using the offset extractor 
binary as input.

Note that one problem is that this step is slower than it could be. We 
sometimes regress it a lot and then make it faster again. Maybe we regressed it 
recently. 

> 
> Is there someone who can help me fix this so we get faster incremental builds?

Sounds like Michael volunteered.

I would favor a sure-to-be-sound fix of just making that phase run faster, 
possibly by reducing the number of options that the llint uses. That might get 
you the outcome you want (faster builds) without the risk of bad builds. 

-Filip

> 
> — Darin
> ___
> webkit-dev mailing list
> webkit-dev@lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


Re: [webkit-dev] Offline Assembler build step always computes hashes even when nothing changes

2018-09-16 Thread Michael Saboff
Darin,

I can take a look at this.

Filed > “Offline assembler always 
computes hashes even when nothing changes"

- Michael

> On Sep 16, 2018, at 4:03 PM, Darin Adler  > wrote:
> 
> I noticed that the “Offline Assembler” build step was taking between 5 and 30 
> seconds every time I build. Really stands out in incremental builds. I 
> realized that this step does not do any dependency analysis. Every time, it 
> builds a hash of the input to see if it needs to recompute the assembly.
> 
> That’s probably not the best pattern; normally we like to use file 
> modification dates to avoid doing any work when files haven’t changed.
> 
> Is there someone who can help me fix this so we get faster incremental builds?
> 
> — Darin
> ___
> webkit-dev mailing list
> webkit-dev@lists.webkit.org 
> https://lists.webkit.org/mailman/listinfo/webkit-dev

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev


[webkit-dev] Offline Assembler build step always computes hashes even when nothing changes

2018-09-16 Thread Darin Adler
I noticed that the “Offline Assembler” build step was taking between 5 and 30 
seconds every time I build. Really stands out in incremental builds. I realized 
that this step does not do any dependency analysis. Every time, it builds a 
hash of the input to see if it needs to recompute the assembly.

That’s probably not the best pattern; normally we like to use file modification 
dates to avoid doing any work when files haven’t changed.

Is there someone who can help me fix this so we get faster incremental builds?

— Darin
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev