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

198 Коммитов

Автор SHA1 Сообщение Дата
Gerald Squelart 00e7a0e136 Bug 1766357 - Remove unused and empty TimerThread::InitLocks - r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D144660
2022-04-27 01:14:37 +00:00
Razvan Cojocaru 80c01fc4fe Bug 1757668 - Use TimeDuration::ToMicroseconds() in TimerThread::Run(). r=sefeng,nika
Modify the code so that instead of getting microseconds by first
getting milliseconds, then multiplying by 1000, it retrieves the
microseconds value directly.

Differential Revision: https://phabricator.services.mozilla.com/D143472
2022-04-12 19:39:48 +00:00
Randell Jesup 76e867287e Bug 1207753 - xpcom Timer thread-safety annotations r=nika
Differential Revision: https://phabricator.services.mozilla.com/D130572
2022-03-19 03:43:57 +00:00
Randell Jesup fcaf70841e Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 18:47:08 +00:00
Noemi Erli 2390d257e6 Backed out changeset 12a59e5a50bf (bug 1207753) for causing build bustage CLOSED TREE 2022-03-16 18:32:51 +02:00
Randell Jesup 4b033a5256 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 16:16:14 +00:00
Butkovits Atila 927ad62c6a Backed out changeset a68ee4b09f92 (bug 1207753) for causing Hazard bustages. CLOSED TREE 2022-03-16 14:38:14 +02:00
Randell Jesup 7d4b5fae04 Bug 1207753 - Add MOZ_UNANNOTATED to all Mutexes/Monitors r=nika,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D140849
2022-03-16 12:01:14 +00:00
Randell Jesup deef57618a Bug 1746523: xpcom Timer cleanup, assertions and comments r=bwc,xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D134089
2022-02-01 20:25:16 +00:00
Gerald Squelart 5399574d8b Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-08 23:59:35 +00:00
Cristian Tuns 1aeac93d23 Backed out 5 changesets (bug 1738627) for causing xpcshell failures on test_ext_geckoProfiler_schema.js CLOSED TREE
Backed out changeset 42d385d7da97 (bug 1738627)
Backed out changeset edeb3a338954 (bug 1738627)
Backed out changeset 98f02e35134d (bug 1738627)
Backed out changeset 711daa6dd24b (bug 1738627)
Backed out changeset 49e12753a40c (bug 1738627)
2021-11-05 05:12:28 -04:00
Gerald Squelart 7fa084ae7c Bug 1738627 - profiler_thread_is_being_profiled_for_markers - r=canaltinova
`profiler_thread_is_being_profiled` is used a lot for markers, so it makes sense to have a specialized version, which is a bit shorter, and lives in ProfilerMarkers.h.

Differential Revision: https://phabricator.services.mozilla.com/D130009
2021-11-05 05:52:28 +00:00
Gerald Squelart 424aac2b72 Bug 1735697 - Only record markers from actually-profiled threads - r=florian
`profiler_add_marker()` now checks if the marker's target thread is actively being profiled. This is to prevent adding markers that would be discarded anyway, from taking CPU time to process, and from using space in the profile buffer.

This means that `profiler_thread_is_being_profiled(ProfilerThreadId)` must be used when a marker is intended for another thread, i.e., when it uses the MarkerThreadId option.

(Note: since baseprofiler::profiler_thread_is_being_profiled(ProfilerThreadId) is not available, baseprofiler::AddMarker cannot prevent markers targetted at non-profiled thread; There are none yet anyway.)

Differential Revision: https://phabricator.services.mozilla.com/D128576
2021-10-18 23:11:30 +00:00
Andreas Pehrson 404b158fe7 Bug 1729964 - Move timer-release threading assert from TimerThread to nsTimerImpl. r=xpcom-reviewers,nika
Differential Revision: https://phabricator.services.mozilla.com/D127622
2021-10-06 14:33:41 +00:00
Daniel Holbert 9d65c831ed Bug 1733729: Fix non-unified build bustage in xpcom directory. r=mccr8
These changes were necessary for me to build successfully with this in my
mozconfig:
 ac_add_options --enable-debug
 ac_add_options --disable-unified-build
 ac_add_options --enable-profiling

While I'm here, I removed a duplicate include in InputTaskManager.h, and made
nsThreadPool.cpp include its own header first, to match Gecko common practice.

Differential Revision: https://phabricator.services.mozilla.com/D127503
2021-10-05 00:29:56 +00:00
Nazım Can Altınova 0f657df07f Bug 1728544 - Make the MarkerSchema::Searchable enum class values CamelCased r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D124242
2021-09-03 14:30:10 +00:00
Nazım Can Altınova a38b25b295 Bug 1728544 - Make the MarkerSchema::Format enum class values CamelCased r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D124241
2021-09-03 14:30:10 +00:00
Nazım Can Altınova ddae0f7cd6 Bug 1728544 - Make the MarkerSchema::Location enum class values CamelCased r=gerald
Differential Revision: https://phabricator.services.mozilla.com/D124240
2021-09-03 14:30:09 +00:00
Florian Quèze 2ef0bca3f5 Bug 1728228 - Add profiler markers in the Timer thread to understand its activity, r=gerald,smaug,KrisWright.
Differential Revision: https://phabricator.services.mozilla.com/D123989
2021-08-31 13:41:46 +00:00
Olli Pettay 42e939719a Bug 1724107, be more precise when counting the number of allocator users, r=KrisWright
The patch is based on code inspection.

One could move sAllocatorUsers also to Free(), but shouldn't matter in practise.

Differential Revision: https://phabricator.services.mozilla.com/D121868
2021-08-05 19:36:32 +00:00
Florian Quèze dfeb53e219 Bug 1715257 - Remove Task Tracer code from the profiler, r=gerald,necko-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D117996
2021-06-17 09:33:00 +00:00
Iulian Moraru b02492de66 Backed out changeset 617a466d0cce (bug 1715257) for causing build bustages. CLOSED TREE 2021-06-17 10:58:16 +03:00
Florian Quèze 7b4906a6bd Bug 1715257 - Remove Task Tracer code from the profiler, r=gerald,necko-reviewers.
Differential Revision: https://phabricator.services.mozilla.com/D117996
2021-06-17 06:12:10 +00:00
Kershaw Chang 082d68bc40 Bug 1415923 - Ignore sleep and wake notifications on OSX r=xpcom-reviewers,KrisWright
Differential Revision: https://phabricator.services.mozilla.com/D103228
2021-02-04 21:40:47 +00:00
Honza Bambas e3c8fc6ab0 Bug 1648781 - MOZ_LOG of timer events dispatch and run, MOZ_LOG of idle-dispatch timeout, r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D81467
2020-06-30 10:57:28 +00:00
Dana Keeler ac4d01ea49 Bug 1644224 - make nsTimerEvent::sCanDeleteAllocator atomic/sequentially consistent r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78771
2020-06-08 19:59:40 +00:00
Simon Giesecke ebbc7ae838 Bug 1642989 - Use RemoveLastElements instead of RemoveElementsAt where possible. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D78049
2020-06-08 08:50:15 +00:00
Nathan Froyd 1a536ec126 Bug 1639632 - convert xpcom/ to inherit from mozilla::Runnable where possible; r=KrisWright
A little less boilerplate is nice.

Differential Revision: https://phabricator.services.mozilla.com/D76178
2020-05-20 20:37:58 +00:00
Andrew McCreight 4babb2b5ab Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown
Patch by bhackett and jlaster. Also reviewed by mccr8.

Differential Revision: https://phabricator.services.mozilla.com/D60197

--HG--
extra : moz-landing-system : lando
2020-02-27 17:39:15 +00:00
Ciure Andrei 00dd87f6f4 Backed out changeset d407a28318e6 (bug 1609815) for causing windows ming bustages CLOSED TREE
--HG--
extra : histedit_source : b2c748e31e0f6ba8fcf9960a336e0bbd361b07e6
2020-02-27 07:05:19 +02:00
Andrew McCreight b197e1f783 Bug 1609815 - Remove Web Replay C++ implementation. r=jgilbert,jandem,gbrown
Patch by bhackett and jlaster. Also reviewed by mccr8.

Differential Revision: https://phabricator.services.mozilla.com/D60197

--HG--
extra : moz-landing-system : lando
2020-02-27 04:43:48 +00:00
Simon Giesecke 30984f7bab Bug 1613985 - Use default for equivalent-to-default constructors/destructors in xpcom. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D62543

--HG--
extra : moz-landing-system : lando
2020-02-12 11:13:33 +00:00
Gabriele Svelto 5dc21d568c Bug 1600545 - Remove useless inclusions of header files generated from IDL files in modules/, netwerk/, parser/, security/, startupcache/, storage/, toolkit/, tools/, uriloader/, widget/, xpcom/ and xpfe/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

Differential Revision: https://phabricator.services.mozilla.com/D55444

--HG--
extra : moz-landing-system : lando
2019-12-06 09:17:57 +00:00
Nathan Froyd 87c432d06a Bug 1570982 - remove `CPP_THROW_NEW`; r=glandium
We always define it to the same thing, and we're inconsistent in whether
we use `CPP_THROW_NEW` or `throw()`, so we might as well just use the
standard C++ thing and get rid of some baggage.

Differential Revision: https://phabricator.services.mozilla.com/D40425

--HG--
extra : moz-landing-system : lando
2019-08-14 01:32:41 +00:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Sylvestre Ledru 47a5dd1fb8 Bug 1519636 - Reformat everything to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D16388

--HG--
extra : moz-landing-system : lando
2019-01-16 08:50:07 +00:00
Nathan Froyd fc065671fb Bug 1513615 - part 3 - do more work in nsTimerEvent's constructor; r=glandium
nsTimerEvent goes through a multi-step initialization for reasons that
are lost to time.  We are also seeing peculiar crashes in
`nsTimerEvent::SetTimer()` that are only explainable by `SetTimer`
finding a non-null pointer where there should have been a null pointer.
The compiler ought to have been able to optimize those bits away, but no
matter: we can do the job ourselves and make the code clearer.

Since we only call `SetTimer` once, we should just move its work into
nsTimerEvent's constructor.
2019-01-08 19:31:40 -05:00
Nathan Froyd 7cb315f948 Bug 1513615 - part 2 - move some code around in PostTimerEvent; r=glandium
Doing this code movement separately will ideally make the next part of
this work easier to review.  The idea is that we want to extract all the
necessary information from `timer` before we pass ownership of it into
the newly-allocated nsTimerEvent.
2019-01-08 19:31:40 -05:00
Nathan Froyd b9a6220890 Bug 1513615 - part 1 - tweak nsTimerEvent allocation; r=glandium
Unlike many of our uses of `new`, nsTimerEvent has its own definition of
`operator new`, to ensure instances are allocated through
TimerEventAllocator.  And allocating with TimerEventAllocator can fail.
Later changes, however, want to assume that constructing an nsTimerEvent
can't fail, which is difficult to guarantee with the current structure.

To make that guarantee, we need to make explicit what calling `new`
does: there's an "allocate memory" step and a "construct the object"
step.  The first part can fail, and that's what we care about here.
Once we have a chunk of memory, we can construct the object as normal,
secure in the knowledge that calling (placement) `new` is now guaranteed
to succeed.
2019-01-08 19:31:40 -05:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Andrew McCreight 68a1d4dad7 Bug 1508818, part 3 - Shrink comments so they don't get poorly reflowed by clang-format. r=froydnj
Clang format does not always reflow comments correctly to get them
within 80 columns.

The major categories of failures I have noticed in xpcom/ are:

- Comments that are lists. I fixed these by manually getting them so
  they'll be within 80 columns after clang-format runs.

- Comments intermixed with lists of things like enums, initializers,
  or even fields in a class. It doesn't seem to associate the comment
  with the item in the list correctly. The worst cases of these happen
  when it changes initializer lists from having commas at the start of
  each item to having them at the end. In the initializer comma cases,
  I fixed them by making the commas at the end, so clang-format won't
  mix things up. For other cases, I often moved the comment for an
  item onto its own line, because it was not possible to have both the
  comment and the item on the same line and stay within 80 columns.

- One odd case is nsEnumeratorUtils.cpp, where the end of line comment
  after a NS_DECL macro confused clang-format and made it stop
  realizing that the NS_DECL thing was a complete statement. I also
  added a blank line to that file before a declaration because I think
  that is better.

Depends on D13183

Differential Revision: https://phabricator.services.mozilla.com/D13184

--HG--
extra : moz-landing-system : lando
2018-11-28 21:06:09 +00:00
Brian Hackett 54c917ef76 Bug 1465452 Part 13 - Avoid recording some timer thread state, r=froydnj.
--HG--
extra : rebase_source : f5a2e514099be1221960fb91de83d827e2121801
2018-07-21 14:36:02 +00:00
Nika Layzell 0c3ba13e4c Bug 1437167 - Part 1: Stop using PRIntervalTime as the argument to CondVar::Wait and Monitor::Wait, r=mstange, r=froydnj 2018-04-10 17:49:47 -04:00
Nathan Froyd efd709bd4f Bug 1447744 - don't implement nsINamed for mozilla::Runnable when it's unused; r=erahm
We only use nsINamed on runnables for certain kinds of telemetry, and
those kinds of telemetry aren't being gathered on RELEASE_OR_BETA
builds.  We effectively make nsINamed::GetName a no-op when we're not
collecting said telemetry.  But implementing nsINamed does have a cost:
the vtable of every runnable (and we have hundreds of subclasses of
mozilla::Runnable) will contain pointers for GetName (and extra pointers
for QueryInterface/AddRef/Release), and all those pointers times all
those subclasses adds up quickly.  Let's not implement nsINamed when
nsINamed isn't going to be used.

This change saves ~100K of binary size on x86-64 Linux; the savings
should be similar on other 64-bit systems, and ~50K on 32-bit systems.
2018-03-23 14:53:55 -04:00
Miko Mynttinen 65c6bee9d6 Bug 1445302 - Replace TArray.RemoveElementAt(TArray.Length() - 1) pattern with TArray.RemoveLastElement() or TArray.PopLastElement() r=froydnj
MozReview-Commit-ID: rGjabnP2iz

--HG--
extra : rebase_source : 1ef6c5ce028ac9ebd9f3176d57835c43fe46bada
2018-03-13 14:51:33 +01:00
Byron Campen [:bwc] 6b3da0609f Bug 1383019: Move more logic under the protection of nsTimerImpl::mMutex, and simplify. r=froydnj, a=abillings
MozReview-Commit-ID: JjYScKwyika

--HG--
extra : rebase_source : a5a8a17f86459ace51d9250454bd4cf1433130b0
2017-09-14 12:19:24 -05:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Carsten "Tomcat" Book 8a1350b5a6 Backed out changeset 4f6302a98ae4 (bug 1372405)
--HG--
extra : rebase_source : 41632f3158e88e692809731394a683d065a73dfb
2017-06-21 13:59:26 +02:00
Bill McCloskey 6b3e84ed5f Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book ea1b86680c Backed out changeset 9846de3bd954 (bug 1372405)
--HG--
extra : rebase_source : 5d4a48e8ec394c329994689d938d2a6e9b2752b0
2017-06-20 08:27:02 +02:00