On 4/22/22 09:22, ISHIKAWA,chiaki wrote:
Problem with C++/C macros is that most of the macros for debugging
purposes lack the notion of INFORMATIONAL messages. The macros are
about something went wrong, so abort with messages.: NS_ABORT, NS_ASSERTION,
MOZ_ASSERT, etc.
something went wrong, so print an error message, but go on.
something seems fishy, so print a warning message, and go on.: NS_WARNING, etc.

So this is only about debug asserts / warnings / NS_ENSURE_* macros, right? Because MOZ_LOG does support a variety of log levels:


https://searchfox.org/mozilla-central/rev/6da1ebe13b260efabd88eb98dec5fa8ee65987b2/xpcom/base/Logging.h#62-69

Anyways, I agree that warnings that happen all the time should probably not be warnings. I'd recommend just filing bug and ni?ing the relevant developer if you're seeing super-spammy warnings in test logs.

I think Eric Rahm had a tool that used to keep track of this? Not sure if somebody is maintaining / running that anymore, see:

  https://bugzilla.mozilla.org/show_bug.cgi?id=765224

[..]

Yes, (b) can be implemented locally by each developer to satisfy their
tastes for the local debug test runs, BUT I believe tryserver ought to
create a debug log file that would be meaningful for someone who sees
it for the first time.
(Well, I may be the only person in the world who regularly checks the
content of debug log file at least locally. Ugh...)

Not really. I check them very often at least. Using rr it's very easy to basically replay the run, save the log to a file, and go to the point of the program where the warning / message / test failure you care about happens.

[..]

10 top most warnings coming from /libeditor/ during local mochitest
run of debug version of TB.

I suspect Thunderbird uses the editor much more heavily than Firefox, so these aren't generally problems for most Gecko developers. If they're causing trouble on Thunderbird, chances are you should look into those, some of those look like potentially real bugs. Some others seem like they can expectedly happen in some edge cases so maybe NS_WARNING isn't quite warranted and that should be a MOZ_LOG or just be silent.

2947: Main Thread] WARNING: Scrolled rect smaller than scrollport?: file /NEW-SSD/NREF-COMM-CENTRAL/mozilla/layout/generic/nsGfxScrollFrame.cpp:7154

This one I just sent a patch to remove.

2164: Main Thread] WARNING: NS_ENSURE_TRUE(rootFrame) failed: file /NEW-SSD/NREF-COMM-CENTRAL/mozilla/dom/base/nsGlobalWindowOuter.cpp:4147

I see this on local Firefox startup too, and it's harmless:

  https://bugzilla.mozilla.org/show_bug.cgi?id=1765961

1659: Main Thread] WARNING: XPCOM object nsStringBuffer released from static ctor/dtor: file /NEW-SSD/NREF-COMM-CENTRAL/mozilla/xpcom/base/nsTraceRefcnt.cpp:206

This one is probably something in Thunderbird having an `static nsString` or so, should be fixed rather than the warning being suppressed.

'!ClientIsValidPrincipalInfo(mClientInfo.PrincipalInfo())', file /NEW-SSD/NREF-COMM-CENTRAL/mozilla/dom/clients/manager/ClientSource.cpp:183

This one seems like it should be investigated in comm-central. Seems like it might be expected for some URIs? If it's harmless probably can be turned into a log message.

1011: Main Thread] WARNING: no request to cancel: file /NEW-SSD/NREF-COMM-CENTRAL/mozilla/comm/mailnews/base/src/nsMsgProtocol.cpp:763

This one seems TB specific as well.

Cheers,

 -- Emilio

--
You received this message because you are subscribed to the Google Groups 
"[email protected]" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/mozilla.org/d/msgid/dev-platform/afcc20df-fcf1-24ee-1094-561fbfc3b93e%40mozilla.com.

Reply via email to