Closed Bug 994163 Opened 6 years ago Closed 6 years ago

TraceLogger doesn't compile with --disable-threadsafe

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: bbouvier, Assigned: h4writer)

References

Details

Attachments

(1 file)

Not sure whether we want --enable-threadsafe to be a dependency of --enable-trace-logger or not, but there is clearly something we need to do here.
Blocks: 944392
Correct. Tracelogger should be able to work with --disable-threadsafe
Assignee: nobody → hv1989
Attachment #8404509 - Flags: review?(benj)
Comment on attachment 8404509 [details] [diff] [review]
tracelogging-fix-threadsafe

Review of attachment 8404509 [details] [diff] [review]:
-----------------------------------------------------------------

Nice, thanks!

::: js/src/vm/TraceLogging.cpp
@@ +797,5 @@
>      return mainThread->traceLogger;
>  }
>  
>  TraceLogger *
> +js::TraceLoggerForThread()

The name is not really clear anymore, now that there's no argument anymore. How about renaming it TraceLoggerForCurrentThread() or something better you'd have in mind?

::: js/src/vm/TraceLogging.h
@@ +389,5 @@
>      typedef HashMap<PRThread *,
>                      TraceLogger *,
>                      PointerHasher<PRThread *, 3>,
>                      SystemAllocPolicy> ThreadLoggerHashMap;
> +#endif

Could you suffix these #endif with // JS_THREADSAFE, so that we don't get confused with which ifdef we're closing?

@@ +400,2 @@
>      ThreadLoggerHashMap threadLoggers;
> +#endif

ditto

@@ +418,2 @@
>      TraceLogger *forThread(PRThread *thread);
> +#endif

ditto
Attachment #8404509 - Flags: review?(benj) → review+
Duplicate of this bug: 995526
https://hg.mozilla.org/mozilla-central/rev/f2adbe2a41c0
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
You need to log in before you can comment on or make changes to this bug.