Closed Bug 1574388 Opened 5 years ago Closed 5 years ago

Implement PHC on Mac

Categories

(Core :: Memory Allocator, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla70
Tracking Status
firefox70 --- fixed

People

(Reporter: n.nethercote, Assigned: n.nethercote)

References

Details

Attachments

(1 file)

The number of Mac Nightly users is just over 5,000, very similar to the number of Linux users. (Windows is about 38,000.)

It won't make a huge difference, but we need all the coverage we can get, and (in theory) it's not hard to port to Mac.

With the attached patch I get some link errors involving recordreplay:

 0:08.91 Undefined symbols for architecture x86_64:
 0:08.91   "__ZN7mozilla12recordreplay30InternalEndOrderedAtomicAccessEv", referenced from:
 0:08.91       __ZN7mozilla12recordreplayL22EndOrderedAtomicAccessEv in Unified_cpp_memory_replace_phc0.o
 0:08.91   "__ZN7mozilla12recordreplay23gIsRecordingOrReplayingE", referenced from:
 0:08.91       __ZN7mozilla12recordreplayL22IsRecordingOrReplayingEv in Unified_cpp_memory_replace_phc0.o
 0:08.91   "__ZN7mozilla12recordreplay32InternalBeginOrderedAtomicAccessEPKv", referenced from:
 0:08.91       __ZN7mozilla12recordreplayL24BeginOrderedAtomicAccessEPKv in Unified_cpp_memory_replace_phc0.o
 0:08.92 ld: symbol(s) not found for architecture x86_64
 0:08.92 clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
 0:08.92 make[2]: *** [../../../../dist/bin/logalloc-replay] Error 1
 0:08.92 make[1]: *** [memory/replace/logalloc/replay/target] Error 2
 0:08.92 make[1]: *** Waiting for unfinished jobs....

bhackett, glandium: any ideas what is the matter?

Background:

  • PHC is somewhat special, being in memory/replace/, which means it's not part of libxul.
  • PHC doesn't contain any recordreplay code, AFAICT, though it's possible it pulls some in via header inclusion.
  • PHC is already implemented for Linux and Windows, and I haven't seen any problems like this on those platforms.
  • The error is in memory/replace/logalloc/replay/, and the moz.build file in that directory does have some PHC-specific stuff in it involving some .cpp files in mozglue and MFBT. So that might be relevant.
Flags: needinfo?(mh+mozilla)
Flags: needinfo?(bhackett1024)

Try changing the Atomics in PHC to add a mozilla::recordreplay::Behavior::DontPreserve template argument.

Flags: needinfo?(mh+mozilla)
Flags: needinfo?(bhackett1024)

It works, thank you.

Attachment #9085970 - Attachment description: Bug 1574388 - [DRAFT] Implement PHC on Mac. → Bug 1574388 - Implement PHC on Mac. r=glandium,gsvelto
Blocks: 1576515
No longer blocks: PHC
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: