I think that the style guide rule was not meant to be enforced in cases like this. Looks like we have actually have a good reason to recommend using NonThreadSafe where possible (e.g. when it does not lead to multiple inheritance).
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
We use them in frequently used features of base/, such as WeakPtr - so this impacts every ObserverList, CancelableCallback, etc.
3 дек. 2016 г., в 0:39, Alexander Semashko <ah...@yandex-team.ru> написал(а):I'll add a counter and see what it shows at runtime.Any suggestions on which workloads to check?3 дек. 2016 г, в 0:34, dan...@chromium.org написал(а):
—
3 дек. 2016 г., в 0:34, dan...@chromium.org написал(а):
Side note: I'd like us to move towards non-thread-safe => SequenceChecker (most checks are incorrectly thread-affine in classes that merely require thread-safety). I'll soon kickoff a separate thread about this but please keep that in mind (and me in the loop) if you decide to change recommendations around thread checking practices.
Side note: I'd like us to move towards non-thread-safe => SequenceChecker (most checks are incorrectly thread-affine in classes that merely require thread-safety). I'll soon kickoff a separate thread about this but please keep that in mind (and me in the loop) if you decide to change recommendations around thread checking practices.
Le sam. 3 déc. 2016 09:34, Alexander Semashko <ah...@yandex-team.ru> a écrit :Here is some data. The numbers show how many instances of ThreadCheckerImpl existed in a process at a given point in time.after startupbrowser: 1877renderer: 500gpu: 113single tab, news sitebrowser: 3005gpu: 207renderer: 193315 tabs with "typical" sitesbrowser process: 18333gpu process: 472flash plugin: 83renderers: 574 + 756 + 878 + 624 + 776 + 7457 + 966 + 961 + 382 + 2523 + 460 + 1411 + 381 + 1401 + 3354, total 22904
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
If we find that the memory cost matters, it might suffice to put the most used checkers behind #if DCHECK_IS_ON() (I suspect a few checkers make the bulk of the usage)
5 дек. 2016 г., в 20:13, Gabriel Charette <g...@chromium.org> написал(а):
If we find that the memory cost matters, it might suffice to put the most used checkers behind #if DCHECK_IS_ON() (I suspect a few checkers make the bulk of the usage)
Le lun. 5 déc. 2016 12:06, David Benjamin <davi...@chromium.org> a écrit :On Mon, Dec 5, 2016 at 11:41 AM Gabriel Charette <g...@chromium.org> wrote:Side note: I'd like us to move towards non-thread-safe => SequenceChecker (most checks are incorrectly thread-affine in classes that merely require thread-safety). I'll soon kickoff a separate thread about this but please keep that in mind (and me in the loop) if you decide to change recommendations around thread checking practices.
Le sam. 3 déc. 2016 09:34, Alexander Semashko <ah...@yandex-team.ru> a écrit :Here is some data. The numbers show how many instances of ThreadCheckerImpl existed in a process at a given point in time.after startupbrowser: 1877renderer: 500gpu: 113single tab, news sitebrowser: 3005gpu: 207renderer: 193315 tabs with "typical" sitesbrowser process: 18333gpu process: 472flash plugin: 83renderers: 574 + 756 + 878 + 624 + 776 + 7457 + 966 + 961 + 382 + 2523 + 460 + 1411 + 381 + 1401 + 3354, total 22904How do the numbers look if you also count SequenceChecker? In particular, I see WeakReference::Flag has a SequenceChecker.David
I think this is one of the rare cases where inheritance works better than composition.However, on Windows, EBO does not come into effect (i.e. an empty base takes one byte space) if the empty base is not the first element in the base class list. Doing EBO for such cases breaks the ABI, so clang-win does not do that either.So, the difference between ThreadChecker and NonThreadSafe is relatively small on Windows: the extra space is optimized away if the NonThreadSafe is listed first in the base class list. I'm not sure this is a definite win for us on Windows. However, given that EBO is always effective on Android (am I right?), I guess we probably should always use NonThreadSafe.
Chromium Developers mailing list: chromium-dev@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
Chromium Developers mailing list: chromi...@chromium.org
5 дек. 2016 г., в 20:13, Gabriel Charette <g...@chromium.org> написал(а):If we find that the memory cost matters, it might suffice to put the most used checkers behind #if DCHECK_IS_ON() (I suspect a few checkers make the bulk of the usage)
This way the usual code like DCHECK(thread_checker_.CalledOnValidThread()) won't compile.See comment in logging.h:// DCHECK et al. make sure to reference |condition| regardless of// whether DCHECKs are enabled; this is so that we don't get unused// variable warnings if the only use of a variable is in a DCHECK.
Chromium Developers mailing list: chromium-dev@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev+unsubscribe@chromium.org.
Chromium Developers mailing list: chromi...@chromium.org
Is this behavior portable enough to rely on?
class EmptyClass {
};
struct EmptyStruct {
};
struct EmptyArrayStruct {
char a_[0];
};
EmptyClass etc
6 дек. 2016 г., в 0:43, Primiano Tucci <prim...@chromium.org> написал(а):
>>>>>>> Chromium Developers mailing list: chromium-dev@chromium.org
>>>>>>> View archives, change email options, or unsubscribe:
>>>>>>> http://groups.google.com/a/chromium.org/group/chromium-dev
>>>>>>
>>>>>>
>>>>>> --
>>>>>> --
>>>>>> Chromium Developers mailing list: chromium-dev@chromium.org
>>>>>> View archives, change email options, or unsubscribe:
>>>>>> http://groups.google.com/a/chromium.org/group/chromium-dev
>>>>>
>>>>> —
>>>>> Best regards,
>>>>> Alexander Semashko
>>>>> ah...@yandex-team.ru
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> —
>>>>> Best regards,
>>>>> Alexander Semashko
>>>>> ah...@yandex-team.ru
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> --
>>>>> Chromium Developers mailing list: chromium-dev@chromium.org
>>>>> View archives, change email options, or unsubscribe:
>>>>> http://groups.google.com/a/chromium.org/group/chromium-dev
>>>>
>>>>
>>>> --
>>>> --
>>>> Chromium Developers mailing list: chromium-dev@chromium.org
>>>> View archives, change email options, or unsubscribe:
>>>> http://groups.google.com/a/chromium.org/group/chromium-dev
>>>> ---
>>>>
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Chromium-dev" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to chromium-dev+unsubscribe@chromium.org.
>>
>>
>> —
>> Best regards,
>> Alexander Semashko
>> ah...@yandex-team.ru
>>
>>
>>
>> --
>> --
>> Chromium Developers mailing list: chromium-dev@chromium.org
>> View archives, change email options, or unsubscribe:
>> http://groups.google.com/a/chromium.org/group/chromium-dev
>
>
> --
> --
> Chromium Developers mailing list: chromium-dev@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-dev
--
--
Chromium Developers mailing list: chromium-dev@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev