Граф коммитов

724938 Коммитов

Автор SHA1 Сообщение Дата
Benjamin Bouvier e16e5f0a18 Bug 1661016: aarch64: Invalidate icache when compiling on a background thread; r=nbp,lth
On real hardware, when a background thread finishes compilation, it must signal
to the other executing threads that they need to reload a new version of the
code. Ideally, each executing thread would run an ISB instruction to do so. We
hereby use a system call membarrier that interrupts every other running thread,
and will cause the same effect as a local ISB would. It is heavyweight, so we
make sure to only run it in the case where we're on a background thread.

In the simulator, pending icache flushing requests were never satisfied before
this patch, when the request was emitted from a thread other than the main
thread. Similar behavior as above is emulated.

Differential Revision: https://phabricator.services.mozilla.com/D88395
2020-09-02 08:17:33 +00:00
Alexandre Poirot 2452f172af Bug 1661627 - Stop ignoring PDF print preview documents. r=nchevobbe
PDF print preview are using about:blank documents, which are ignored
by DevTools in order to save resources.
We avoid creating targets for these, very often, transcient documents.
I tried to find ways to distinguish typical temporary about:blank documents
from this print preview one.

Differential Revision: https://phabricator.services.mozilla.com/D88956
2020-09-02 07:38:59 +00:00
Jan de Mooij cbc5eb3bd9 Bug 1662366 part 7 - Some MBoxNonStrictThis optimizations. r=anba
This adds an OOL path to handle null/undefined => globalThis without a VM call.
IonBuilder optimizes that case based on TI and this ensures we're not a lot slower
for that.

Also give the MIR instruction an empty AliasSet so we can optimize it better in
inlined functions. We no longer have the thisValue hook mentioned in the comment.

Differential Revision: https://phabricator.services.mozilla.com/D88974
2020-09-02 07:39:37 +00:00
Jan de Mooij 287b183550 Bug 1662366 part 6 - Trace cloned CacheIR stub data. r=iain
Initially the plan was to reuse TraceCacheIRStub but this patch adds the tracing
code for Warp separately because:

* CacheIR stub data in Warp contains nursery indexes. It's nice to keep that out of the IC-tracing code.
* We can use WarpGCPtr similar to other snapshotted GC pointers. It asserts GC things are not moved.

Differential Revision: https://phabricator.services.mozilla.com/D88965
2020-09-02 07:35:15 +00:00
Jan de Mooij 70f4e1f948 Bug 1662366 part 5 - Print CompileInfo pointer in WarpCacheIR::dumpData. r=iain
Longer-term more CompileInfo fields should be moved into WarpSnapshot, we can
then dump these fields.

Depends on D88963

Differential Revision: https://phabricator.services.mozilla.com/D88964
2020-09-01 15:35:38 +00:00
Jan de Mooij 26af3accda Bug 1662366 part 4 - Rename some TODOs to TODO(post-Warp). r=iain
Depends on D88962

Differential Revision: https://phabricator.services.mozilla.com/D88963
2020-09-01 15:35:05 +00:00
Jan de Mooij 61e6f7db24 Bug 1662366 part 3 - Remove/rename some TODOs in WarpBuilder. r=iain
Use TODO(post-Warp) for TODOs that can only be addressed when IonBuilder is gone.

Remove some TODOs that are no longer relevant or don't need to be addressed
short-term.

Depends on D88961

Differential Revision: https://phabricator.services.mozilla.com/D88962
2020-09-02 07:30:34 +00:00
Jan de Mooij cc3e1eb429 Bug 1662366 part 2 - Call setImplicitlyUsedUnchecked for JSOp::ToString. r=iain
Allowlisting this op in the checker is wrong because we don't want a
MagicValue to show up for JSOp::ToString in Baseline.

Depends on D88960

Differential Revision: https://phabricator.services.mozilla.com/D88961
2020-09-01 15:25:18 +00:00
Jan de Mooij 3f78c1c5fd Bug 1662366 part 1 - Remove some TODOs in WarpOracle. r=iain
The ones in maybeInlineIC have been addressed. The one about extra var environments
isn't really a TODO for Warp specifically.

Also change the stub data copying to just use nullptr if there's no stub data.
This is fairly common for simpler IC stubs.

Differential Revision: https://phabricator.services.mozilla.com/D88960
2020-09-01 15:23:01 +00:00
Henri Sivonen 2b250967a6 Bug 1661945 - Increase timeout for an intermittently timing out focus test. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D88982
2020-09-01 13:30:18 +00:00
Henri Sivonen cc43c80fae Bug 1661628 - Disable unreliable OOP iframe focus test for Fission. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D88529
2020-09-01 13:27:10 +00:00
Sam Foster 936704115a Bug 1660527 - Use printer.createDefaultSettings to get default and user settings for each printer. r=jwatt,emalysz
Differential Revision: https://phabricator.services.mozilla.com/D89070
2020-09-02 06:15:09 +00:00
Razvan Maries 83f4507fd3 Backed out changeset c0e35053e222 (bug 1662183) for perma failures on browser_contextmenu_sendtab.js. CLOSED TREE 2020-09-02 09:45:59 +03:00
Emma Malysz 97bb860597 Bug 1662183, hide fxa button from main menu when identity.fxaccounts.enabled is false r=Gijs,mkaply
Differential Revision: https://phabricator.services.mozilla.com/D88946
2020-09-02 04:18:01 +00:00
Gerald Squelart b1c2892ebb Bug 1646266 - Profiler Markers 2.0 tests - r=gregtatum
Differential Revision: https://phabricator.services.mozilla.com/D87260
2020-09-02 04:03:32 +00:00
Gerald Squelart ff8b12cb5c Bug 1646266 - {,Base}ProfilerMarkerTypes.h - r=gregtatum
This patch ports existing ProfilerMarkerPayload types to draft struct definitions that may be used with the new markers API.
This is just a starting point, they may be changed later on as needed, see meta-bug 1661394.

Differential Revision: https://phabricator.services.mozilla.com/D87259
2020-09-02 04:03:22 +00:00
Gerald Squelart e6bd850ec0 Bug 1646266 - {BASE_,}PROFILER_MARKER{,_TEXT} - r=gregtatum
This is the main public marker API:
- `AddMarkerToBuffer` can be used to store a marker to any buffer. This could be useful to code that wants to store markers outside of the default profiler buffers.
- `baseprofiler::AddMarker`/`profiler_add_marker` store a marker in the appropriate profiler buffer.
- BASE_PROFILER_MARKER and PROFILER_MARKER do the same, but are also defined (and empty) when MOZ_GECKO_PROFILER is not #defined.
All these take a name, marker options, a marker type, and the type's expected arguments if any (as expected by the `StreamJSONMarkerData` function).

Extra helpers for the most common types:
- BASE_PROFILER_MARKER_UNTYPED and PROFILER_MARKER_UNTYPED store a marker with no data payload.
- BASE_PROFILER_MARKER_TEXT and PROFILER_MARKER_TEXT store a text marker. `baseprofiler::markers::Text` is an example of how new marker types can be defined.

Differential Revision: https://phabricator.services.mozilla.com/D87257
2020-09-02 04:03:20 +00:00
Gerald Squelart 061abe0d50 Bug 1646266 - AddMarkerToBuffer - r=gregtatum
Main marker serialization function, which accepts the same arguments (with implicit conversions) as the marker type's `StreamJSONMarkerData(JSONWriter&, ...)` function, and stores them in a ProfileChunkedBuffer after the marker name and options.

Differential Revision: https://phabricator.services.mozilla.com/D87255
2020-09-02 04:02:06 +00:00
Gerald Squelart 0000b4f25a Bug 1646266 - Marker Deserialization - r=gregtatum
`DeserializeAfterKindAndStream()` is the main function that extracts all the marker data (past the already-read entry kind), and streams it to JSON using the user-provided `Stream(JSONWriter&, ...)` function in the appropriate marker type definition.

It currently requires two external functions to stream the name and the optional backtrace, because these are different between the two profilers. This may change in the future.

(Deserialization is implemented before serialization, because the `Deserialize()` function is needed during serialization to get a marker type tag.)

Differential Revision: https://phabricator.services.mozilla.com/D87254
2020-09-02 04:01:48 +00:00
Gerald Squelart f304c42c99 Bug 1646266 - ProfileBufferEntryKind::Marker - r=gregtatum
A new entry kind is needed to serialize the new markers, because they are not encoded the same way.

Differential Revision: https://phabricator.services.mozilla.com/D87253
2020-09-02 04:01:20 +00:00
Gerald Squelart 2c20225e23 Bug 1646266 - NoPayload default type, with specialized empty helper - r=gregtatum
`NoPayload` will be mostly used internally when adding markers without payload data.
It has an empty specialization of the MarkerTypeHelper (mainly to catch misuses), and the add-marker code will need to have different compile-time paths to handle it.

Differential Revision: https://phabricator.services.mozilla.com/D87252
2020-09-02 04:01:02 +00:00
Gerald Squelart 77bdcef80c Bug 1646266 - MarkerType::Stream function helpers - r=gregtatum
Marker types will be defined with a simple struct that contains (amongst other things) one `StreamJSONMarkerData(JSONWriter&, ...)` function.
This patch introduces a type-traits-like helper to examine that function. This will be used to check the arguments given to the upcoming add-marker function, to serialize and deserialize them.

Differential Revision: https://phabricator.services.mozilla.com/D87251
2020-09-02 04:00:34 +00:00
Gerald Squelart 4ce2239212 Bug 1646266 - Deserializers and Tags - r=gregtatum
This is similar to the existing deserializer table in ProfilerMarkerPayload.*:
Each type of marker (except the `NoPayload` one) has its corresponding deserializer in a table, and the index is used as a tag in the serialization buffer.

Differential Revision: https://phabricator.services.mozilla.com/D87250
2020-09-02 04:00:16 +00:00
Gerald Squelart 9e07f05d90 Bug 1646266 - MarkerOptions - r=gregtatum
A `MarkerOptions` must be constructed from a MarkerCategory, e.g.: `mozilla::baseprofiler::category::OTHER`. This will be required for all markers.
`MarkerOptions` also contains defaulted `MarkerThreadId`, `MarkerTiming`, `MarkerStack`, and `MarkerInnerWindowId`. They may be set by calling `WithOptions()` on the MarkerCategory, e.g.:
`PROFILER_MARKER<...>("name", OTHER.WithOptions(MarkerThreadId(otherThread), MarkerStack::Capture()), ...);`

Differential Revision: https://phabricator.services.mozilla.com/D87249
2020-09-02 03:59:53 +00:00
Gerald Squelart 092e6ca746 Bug 1646266 - Marker option: MarkerInnerWindowId - r=gregtatum
This option can take an inner window id.

Differential Revision: https://phabricator.services.mozilla.com/D87248
2020-09-02 03:59:30 +00:00
Gerald Squelart e31033f92d Bug 1646266 - Marker option: MarkerStack - r=gregtatum
This marker option allows three cases:
- By default, no stacks are captured.
- The caller can request a stack capture, and the add-marker code will take care of it in the most efficient way.
- The caller can still provide an existing backtrace, for cases where a marker reports something that happened elsewhere.

Differential Revision: https://phabricator.services.mozilla.com/D87247
2020-09-02 03:59:13 +00:00
Gerald Squelart 6daee06496 Bug 1646266 - Rework backtrace-capture functions - r=gregtatum
`profiler_capture_backtrace(ProfileChunkedBuffer&)` renamed to `profiler_capture_backtrace_into(ProfileChunkedBuffer&)` (notice "_into"), which is clearer.

New function `profiler_capture_backtrace()` creates a buffer, uses `profiler_capture_backtrace_into()`, and returns a `UniquePtr<ProfileChunkedBuffer>`, which can later be given to `MarkerStack::TakeBacktrace`.

`profiler_get_backtrace()` (returning a `UniqueProfilerBacktrace`) now uses `profiler_capture_backtrace()`.

This patch reduces most duplicate code between these functions.

Differential Revision: https://phabricator.services.mozilla.com/D88280
2020-09-02 03:58:50 +00:00
Gerald Squelart c3ffba3e5c Bug 1646266 - ProfileChunkedBuffer::IsEmpty() and Serializer<ProfileChunkedBuffer*> - r=gregtatum
`IsEmpty()` makes it easier for users to determine if there is anything stored in the `ProfileChunkedBuffer`.

And `ProfileChunkedBuffer` can now be serialized from a raw pointer, which will be useful when adding markers with an optional stack.
Deserialization should be done to a `UniquePtr<ProfileChunkedBuffer>`, which is already implemented.

Differential Revision: https://phabricator.services.mozilla.com/D87246
2020-09-02 03:58:17 +00:00
Gerald Squelart 043c34629b Bug 1646266 - Marker option: MarkerTiming - r=gregtatum
This moves the existing MarkerTiming class introduced in bug 1640969 to the BaseProfilerMarkersPrerequesites.h header, and can be used as a marker option.

Some minor clarifying changes:
- `Instant()` is split into two functions: `InstantNow()` and `InstantAt(TimeStamp)`.
- `Interval(TimeStamp, TimeStamp)` must be given both start and end, otherwise `IntervalUntilNowFrom(TimeStamp)` takes the start only and ends "now".

Also the default construction is now reserved for internal marker usage, the private member function `IsUnspecified()` will be used by the add-marker code will replace it with `InstantNow()`.

The serialization contains the phase, and only one or two timestamps as needed, to save space for non-interval timings.

Differential Revision: https://phabricator.services.mozilla.com/D87245
2020-09-02 03:57:59 +00:00
Gerald Squelart 1d767d3fbb Bug 1646266 - Marker option: MarkerThreadId - r=gregtatum
This marker option captures a given thread id.
If left unspecified (by default construction) during the add-marker call, the current thread id will be used then.

Differential Revision: https://phabricator.services.mozilla.com/D87244
2020-09-02 03:57:31 +00:00
Gerald Squelart a021a0ef4e Bug 1646266 - Marker option: MarkerCategory - r=gregtatum
The main, and only compulsory, marker option is the `MarkerCategory`, which captures the "category pair", as well as the parent category.

Differential Revision: https://phabricator.services.mozilla.com/D88154
2020-09-02 03:57:24 +00:00
Gerald Squelart 7fc90b5c27 Bug 1646266 - CorePS buffer access - r=gregtatum
The upcoming profiler-specific add-marker function will need to know which `ProfileChunkedBuffer` to serialize to, `profiler_get_core_buffer()` give access to the profiler's buffer, and `CachedCoreBuffer()` keeps it stored in a function-static object.

Differential Revision: https://phabricator.services.mozilla.com/D87256
2020-09-02 03:57:19 +00:00
Gerald Squelart f55e5c3957 Bug 1646266 - ProfilerString{,8,16}View - r=gregtatum
These string views are similar to `std::string_view`, but they are optimized to be serialized in the profiler buffer, and later deserialized and streamed to JSON.
They accept literal strings, and keep them as unowned raw pointers and sizes.
They also accept any substring reference, assuming that they will only be used as parameters during function calls, and therefore the dependent string will live during that call where these `StringView`'s are used.

Internally, they also allow optional string ownership, which is only used during deserialization and streaming.
This is hidden, so that users are not tempted to use potentially expensive string allocations during profiling; it's only used *after* profiling, so it's less of an impact to allocate strings then. (But it could still be optimized later on, as part of bug 1577656.)

Differential Revision: https://phabricator.services.mozilla.com/D87242
2020-09-02 03:57:17 +00:00
Gerald Squelart e91236469e Bug 1646266 - ProfilerMarkers skeleton files - r=gregtatum
This patch introduces all new files that contain the new markers C++ API and implementation.
They are mostly empty at this time, only including each other as eventually needed, and with `#ifdef MOZ_GECKO_PROFILER` guards.

Rough inclusion diagram: (header <-- includer)

    BaseProfilerMarkerPrerequesites.h <-- ProfilerMarkerPrerequesites.h  (Useful types: Input string view, marker options)
                  ^                                    ^
       BaseProfilerMarkerDetail.h     <--    ProfilerMarkerDetail.h      (Implementation details)
                  ^                                    ^
         BaseProfilerMarkers.h        <--      ProfilerMarkers.h         (Main API)
                  ^      ^---------                    ^   ^---------
       BaseProfilerMarkerTypes.h  |   <--    ProfilerMarkerTypes.h   |   (Common marker types)
                  ^         BaseProfiler.h        <--         GeckoProfiler.h  (Existing main profiler headers)

Differential Revision: https://phabricator.services.mozilla.com/D87241
2020-09-02 03:55:43 +00:00
Daisuke Akatsuka 9027b60d6b Bug 1662324: Add tests for updating resource of STYLESHEET type. r=ochameau
Depends on D88531

Differential Revision: https://phabricator.services.mozilla.com/D88950
2020-09-02 03:57:21 +00:00
Andrew McCreight ddf672deb0 Bug 1662413 - Only define bc in WindowGlobalChild::Create when needed. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D89008
2020-09-02 02:48:51 +00:00
Tooru Fujisawa 3478b236f8 Bug 1658971 - Part 13: Remove JSContext* field from CompilationInfo. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88613
2020-09-01 23:52:42 +00:00
Tooru Fujisawa 8334256472 Bug 1658971 - Part 12: Add JSContext* parameter to RealmInstrumentation::getInstrumentationKindName. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88612
2020-09-01 23:52:35 +00:00
Tooru Fujisawa 527c5a4c08 Bug 1658971 - Part 11: Add JSContext* parameter to ParserAtomToResumeKind. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88611
2020-09-01 23:52:27 +00:00
Tooru Fujisawa e82ab62e18 Bug 1658971 - Part 10: Add JSContext* parameter to Int32ToParserAtom and NumberToParserAtom. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88610
2020-09-01 23:52:19 +00:00
Tooru Fujisawa c0365679aa Bug 1658971 - Part 9: Add JSContext* field to FoldVisitor and FoldInfo. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88609
2020-09-01 23:52:10 +00:00
Tooru Fujisawa 4e8d257ace Bug 1658971 - Part 8: Add JSContext* parameter to liftParserAtomToJSAtom and lowerJSAtomToParserAtom. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88608
2020-09-01 23:52:02 +00:00
Tooru Fujisawa 7b926b0020 Bug 1658971 - Part 7: Use CompilationInput.enclosingScope in GCThingList::getScope. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88607
2020-09-01 23:51:54 +00:00
Tooru Fujisawa cbf462e163 Bug 1658971 - Part 6: Add JSContext* parameter to Smoosh::compileGlobalScript*. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88606
2020-09-01 23:51:47 +00:00
Tooru Fujisawa 2289962f8e Bug 1658971 - Part 5: Add JSContext* field to TokenStreamAnyChars. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88605
2020-09-01 23:51:44 +00:00
Tooru Fujisawa 0cf72ff50b Bug 1658971 - Part 4: Add JSContext* parameter to SourceAwareCompiler and subclasses methods. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88604
2020-09-01 23:51:37 +00:00
Tooru Fujisawa e603770e80 Bug 1658971 - Part 3: Add JSContext* parameter to ParseModuleToStencil. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88603
2020-09-01 23:51:29 +00:00
Tooru Fujisawa 038fa9f061 Bug 1658971 - Part 2: Add JSContext* parameter to CompileGlobalScript* and InstantiateStencils. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88602
2020-09-01 23:51:22 +00:00
Tooru Fujisawa fbd7e031b2 Bug 1658971 - Part 1: Store self-hosting global scope in CompilationInput.enclosingScope. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88601
2020-09-02 01:39:25 +00:00
Tooru Fujisawa cdda495ffc Bug 1658631 - Part 11: Perform ModuleObject::Freeze in CompilationInfo::instantiateStencils if instantiating on main thread. r=tcampbell
Differential Revision: https://phabricator.services.mozilla.com/D88600
2020-09-01 23:51:12 +00:00