WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
170644
[Cocoa] WebKit unnecessarily soft-links CorePrediction
https://bugs.webkit.org/show_bug.cgi?id=170644
Summary
[Cocoa] WebKit unnecessarily soft-links CorePrediction
mitz
Reported
2017-04-08 13:13:56 PDT
CorePrediction isn’t dependent on WebKit, so it can be linked at build time. Patch forthcoming.
Attachments
Link CorePrediction at build time
(17.95 KB, patch)
2017-04-08 13:18 PDT
,
mitz
no flags
Details
Formatted Diff
Diff
Patch for EWS
(17.71 KB, patch)
2017-04-09 18:30 PDT
,
mitz
no flags
Details
Formatted Diff
Diff
Patch for EWS
(17.76 KB, patch)
2017-04-09 18:39 PDT
,
mitz
no flags
Details
Formatted Diff
Diff
Patch for EWS
(18.50 KB, patch)
2017-04-09 19:22 PDT
,
mitz
no flags
Details
Formatted Diff
Diff
Link CorePrediction at build time
(20.62 KB, patch)
2017-04-10 21:05 PDT
,
mitz
sam
: review+
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
mitz
Comment 1
2017-04-08 13:18:24 PDT
Created
attachment 306580
[details]
Link CorePrediction at build time
Build Bot
Comment 2
2017-04-08 13:19:59 PDT
Attachment 306580
[details]
did not pass style-queue: ERROR: Source/WebKit2/Platform/spi/Cocoa/CorePredictionSPI.h:35: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebKit2/Platform/spi/Cocoa/CorePredictionSPI.h:49: The parameter name "model" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 2 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
mitz
Comment 3
2017-04-08 13:20:54 PDT
(In reply to mitz from
comment #1
)
> Created
attachment 306580
[details]
> Link CorePrediction at build time
This may break the iOS device build.
mitz
Comment 4
2017-04-08 13:24:52 PDT
Looks like the “soft linking” was introduced in
bug 168347
but it’s not entirely clear what problem it was meant to solve.
mitz
Comment 5
2017-04-08 13:35:59 PDT
(In reply to mitz from
comment #4
)
> Looks like the “soft linking” was introduced in
bug 168347
but it’s not > entirely clear what problem it was meant to solve.
Perhaps because CorePrediction is 64-bit only.
Alexey Proskuryakov
Comment 6
2017-04-08 16:06:23 PDT
Comment on
attachment 306580
[details]
Link CorePrediction at build time EWS says the build is broken indeed.
John Wilander
Comment 7
2017-04-09 08:21:38 PDT
It is soft linked because of Base System. In recovery it's not there even though everything else indicates it is.
mitz
Comment 8
2017-04-09 08:41:00 PDT
(In reply to John Wilander from
comment #7
)
> It is soft linked because of Base System. In recovery it's not there even > though everything else indicates it is.
Thanks, John! It’s a misconception that libraries that aren’t present in the Base System need to be soft linked.
Attachment 306580
[details]
handles this using weak linking. I will update the patch to work with iOS device builds and 32-bit macOS.
mitz
Comment 9
2017-04-09 18:30:32 PDT
Created
attachment 306641
[details]
Patch for EWS
mitz
Comment 10
2017-04-09 18:39:46 PDT
Created
attachment 306642
[details]
Patch for EWS
Build Bot
Comment 11
2017-04-09 18:41:11 PDT
Attachment 306642
[details]
did not pass style-queue: ERROR: Source/WebKit2/Platform/spi/Cocoa/CorePredictionSPI.h:37: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebKit2/Platform/spi/Cocoa/CorePredictionSPI.h:51: The parameter name "model" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 2 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
mitz
Comment 12
2017-04-09 19:22:10 PDT
Created
attachment 306644
[details]
Patch for EWS
Build Bot
Comment 13
2017-04-09 19:24:42 PDT
Attachment 306644
[details]
did not pass style-queue: ERROR: Source/WebKit2/Platform/spi/Cocoa/CorePredictionSPI.h:37: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebKit2/Platform/spi/Cocoa/CorePredictionSPI.h:51: The parameter name "model" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 2 in 8 files If any of these errors are false positives, please file a bug against check-webkit-style.
mitz
Comment 14
2017-04-10 21:05:08 PDT
Created
attachment 306772
[details]
Link CorePrediction at build time
Build Bot
Comment 15
2017-04-10 21:07:54 PDT
Attachment 306772
[details]
did not pass style-queue: ERROR: Source/WebKit2/Platform/spi/Cocoa/CorePredictionSPI.h:37: This { should be at the end of the previous line [whitespace/braces] [4] ERROR: Source/WebKit2/Platform/spi/Cocoa/CorePredictionSPI.h:51: The parameter name "model" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 2 in 10 files If any of these errors are false positives, please file a bug against check-webkit-style.
Sam Weinig
Comment 16
2017-04-11 10:34:59 PDT
Comment on
attachment 306772
[details]
Link CorePrediction at build time View in context:
https://bugs.webkit.org/attachment.cgi?id=306772&action=review
> Source/WebKit2/Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp:75 > +static inline bool isNullFunctionPointer(void* functionPointer)
This surprising function should probably have a comment explaining why it needs inline-asm. Also, is this something that can be lifted into WTF somewhere, as it seems like something that could be generally useful for other weak linking.
> Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.h:36 > +#if PLATFORM(COCOA) && HAVE(CORE_PREDICTION)
Is it really necessary to have both predicates. Given that CORE_PREDICTION is only on COCOA systems, it seems like just specifying it would be enough.
mitz
Comment 17
2017-04-11 12:08:23 PDT
(In reply to Sam Weinig from
comment #16
)
> Comment on
attachment 306772
[details]
> Link CorePrediction at build time > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=306772&action=review
> > > Source/WebKit2/Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp:75 > > +static inline bool isNullFunctionPointer(void* functionPointer) > > This surprising function should probably have a comment explaining why it > needs inline-asm.
I’ll add a comment.
> Also, is this something that can be lifted into WTF > somewhere, as it seems like something that could be generally useful for > other weak linking.
I won’t do this as part of fixing this bug, but I agree. Is there an existing WTF header where this function could live?
> > Source/WebKit2/UIProcess/WebResourceLoadStatisticsStore.h:36 > > +#if PLATFORM(COCOA) && HAVE(CORE_PREDICTION) > > Is it really necessary to have both predicates. Given that CORE_PREDICTION > is only on COCOA systems, it seems like just specifying it would be enough.
I’ll change to check only for HAVE(CORE_PREDICTION).
mitz
Comment 18
2017-04-11 12:13:39 PDT
Fixed in <
https://trac.webkit.org/r215247
>.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug