Closed Bug 976971 Opened 6 years ago Closed 6 years ago

enable textperf logging for optimized builds

Categories

(Core :: Layout: Text and Fonts, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: jtd, Assigned: jtd)

Details

Attachments

(1 file)

When checking in the textperf logging code, I neglected to carefully test optimized builds.  The logic in nsPresContext::xxx relies on PR logging macros being enabled but FORCE_PR_LOGGING isn't enabled in that file so the PR_LOG_TEST macro evaluates to (0) in non-debug builds:

  // if text perf logging enabled, init stats struct
  PRLogModuleInfo *log = gfxPlatform::GetLog(eGfxLog_textperf);
  if (log && PR_LOG_TEST(log, PR_LOG_WARNING)) {
    mTextPerf = new gfxTextPerfMetrics();
  }

Rather than force logging in this place (no logging is done, the construction of the textperf object is simply conditionalized on logging being enabled), I just need to test the log level directly and avoid the macro.
This allows textperf logging to work correctly in optimized builds (it's use is disabled for release builds within gfx code).
Attachment #8381988 - Flags: review?(cam)
Attachment #8381988 - Flags: review?(cam) → review+
https://hg.mozilla.org/mozilla-central/rev/8e126867f926
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.