Bug 225465

Summary: Reduce use of dmb ish on ARM64
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch
none
the patch keith_miller: review+, ews-feeder: commit-queue-

Description Filip Pizlo 2021-05-06 09:48:40 PDT
We use loadLoadFence a lot, often in situations like:

Foo* ptr = loadStuff;
loadLoadFence();
use ptr

On ARM64, we don't need a dmb ish here.  We also use loadLoadFence in some places where I can't actually think of any good reason for the fence other than paranoia.
Comment 1 Filip Pizlo 2021-05-06 09:49:06 PDT
Created attachment 427897 [details]
the patch
Comment 2 Filip Pizlo 2021-05-06 09:49:37 PDT
Comment on attachment 427897 [details]
the patch

Ooops forgot changeling
Comment 3 Filip Pizlo 2021-05-06 11:37:31 PDT
Created attachment 427912 [details]
the patch
Comment 4 Keith Miller 2021-05-06 12:43:26 PDT
Comment on attachment 427912 [details]
the patch

r=me
Comment 5 EWS 2021-05-06 12:44:03 PDT
Creating invalid ChangeLogEntry:

Traceback (most recent call last):
  File "Tools/Scripts/webkit-patch", line 80, in <module>
    main()
  File "Tools/Scripts/webkit-patch", line 75, in main
    WebKitPatch(os.path.abspath(__file__)).main()
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 305, in main
    result = command.check_arguments_and_execute(options, args, self)
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 123, in check_arguments_and_execute
    return self.execute(options, args, tool) or 0
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/tool/commands/abstractsequencedcommand.py", line 55, in execute
    self._sequence.run_and_handle_errors(tool, options, state)
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 73, in run_and_handle_errors
    self._run(tool, options, state)
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 67, in _run
    step(tool, options).run(state)
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/tool/steps/validatereviewer.py", line 52, in run
    changelog_entry = ChangeLog(changelog_path).latest_entry()
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/common/checkout/changelog.py", line 377, in latest_entry
    return self.parse_latest_entry_from_file(changelog_file)
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/common/checkout/changelog.py", line 323, in parse_latest_entry_from_file
    return next(cls.parse_entries_from_file(changelog_file))
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/common/checkout/changelog.py", line 362, in parse_entries_from_file
    yield ChangeLogEntry(''.join(entry_lines[:-1]), revision=most_probable_revision)
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/common/checkout/changelog.py", line 112, in __init__
    self._parse_entry()
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/common/checkout/changelog.py", line 220, in _parse_entry
    self._date_line = match.group()
AttributeError: 'NoneType' object has no attribute 'group'
Comment 6 EWS 2021-05-06 13:43:59 PDT
Creating invalid ChangeLogEntry:

Traceback (most recent call last):
  File "Tools/Scripts/webkit-patch", line 80, in <module>
    main()
  File "Tools/Scripts/webkit-patch", line 75, in main
    WebKitPatch(os.path.abspath(__file__)).main()
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 305, in main
    result = command.check_arguments_and_execute(options, args, self)
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/tool/multicommandtool.py", line 123, in check_arguments_and_execute
    return self.execute(options, args, tool) or 0
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/tool/commands/abstractsequencedcommand.py", line 55, in execute
    self._sequence.run_and_handle_errors(tool, options, state)
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 73, in run_and_handle_errors
    self._run(tool, options, state)
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 67, in _run
    step(tool, options).run(state)
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/tool/steps/validatereviewer.py", line 52, in run
    changelog_entry = ChangeLog(changelog_path).latest_entry()
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/common/checkout/changelog.py", line 377, in latest_entry
    return self.parse_latest_entry_from_file(changelog_file)
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/common/checkout/changelog.py", line 323, in parse_latest_entry_from_file
    return next(cls.parse_entries_from_file(changelog_file))
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/common/checkout/changelog.py", line 362, in parse_entries_from_file
    yield ChangeLogEntry(''.join(entry_lines[:-1]), revision=most_probable_revision)
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/common/checkout/changelog.py", line 112, in __init__
    self._parse_entry()
  File "/Volumes/Data/worker/Commit-Queue/build/Tools/Scripts/webkitpy/common/checkout/changelog.py", line 220, in _parse_entry
    self._date_line = match.group()
AttributeError: 'NoneType' object has no attribute 'group'
Comment 7 Filip Pizlo 2021-05-06 13:56:29 PDT
Landed in https://trac.webkit.org/changeset/277117/webkit
Comment 8 Radar WebKit Bug Importer 2021-05-06 13:57:33 PDT
<rdar://problem/77623820>