Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(455)

Issue 1616223002: rewrite_to_chrome_style: Add a lock file when writing replacements. (Closed)

Created:
4 years, 11 months ago by danakj
Modified:
4 years, 10 months ago
Reviewers:
dcheng
CC:
chromium-reviews, piman
Base URL:
https://chromium.googlesource.com/chromium/src.git@rewrite-operators
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

rewrite_to_chrome_style: Add a lock file when writing replacements. The tool is run in parallel many times, so they may clobber each other writing to the rewrite-sym.txt file. So add a rewrite-sym.lock file that each instance grabs when writing. Also attempts a windows implementation which is untested. R=dcheng BUG=578344 Committed: https://crrev.com/bf6983ea366435a931b8f8af4408855b0b580de1 Cr-Commit-Position: refs/heads/master@{#371650}

Patch Set 1 #

Total comments: 4

Patch Set 2 : rewrite-lock: nomemset #

Total comments: 2

Patch Set 3 : rewrite-lock: semicolonsforall #

Total comments: 4

Patch Set 4 : rewrite-lock: windoze #

Total comments: 3

Patch Set 5 : rewrite-lock: reuse-struct #

Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -0 lines) Patch
M tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp View 1 2 3 4 3 chunks +26 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 26 (7 generated)
danakj
4 years, 11 months ago (2016-01-22 00:13:44 UTC) #1
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1616223002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1616223002/1
4 years, 11 months ago (2016-01-22 00:14:03 UTC) #3
dcheng
https://codereview.chromium.org/1616223002/diff/1/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp File tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp (right): https://codereview.chromium.org/1616223002/diff/1/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp#newcode526 tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp:526: memset(&lock_out, 0, sizeof(lock_out)); OVERLAPPED lock_out = {}; then you ...
4 years, 11 months ago (2016-01-22 00:31:30 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-22 00:39:12 UTC) #6
danakj
https://codereview.chromium.org/1616223002/diff/1/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp File tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp (right): https://codereview.chromium.org/1616223002/diff/1/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp#newcode526 tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp:526: memset(&lock_out, 0, sizeof(lock_out)); On 2016/01/22 00:31:30, dcheng wrote: > ...
4 years, 11 months ago (2016-01-22 23:33:36 UTC) #7
danakj
PTAL no memset.
4 years, 11 months ago (2016-01-22 23:52:49 UTC) #8
dcheng
https://codereview.chromium.org/1616223002/diff/20001/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp File tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp (right): https://codereview.chromium.org/1616223002/diff/20001/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp#newcode524 tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp:524: OVERLAPPED lock_out = {} LockFileEx(lockfd, LOCKFILE_EXCLUSIVE_LOCK, 0, 1, 0, ...
4 years, 11 months ago (2016-01-23 00:10:07 UTC) #9
danakj
https://codereview.chromium.org/1616223002/diff/20001/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp File tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp (right): https://codereview.chromium.org/1616223002/diff/20001/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp#newcode524 tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp:524: OVERLAPPED lock_out = {} LockFileEx(lockfd, LOCKFILE_EXCLUSIVE_LOCK, 0, 1, 0, ...
4 years, 11 months ago (2016-01-23 00:22:38 UTC) #10
danakj
PTAL
4 years, 11 months ago (2016-01-23 00:22:45 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1616223002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1616223002/40001
4 years, 11 months ago (2016-01-23 01:14:05 UTC) #13
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-23 01:45:23 UTC) #15
dcheng
(Sorry I forgot to send my drafts) https://codereview.chromium.org/1616223002/diff/40001/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp File tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp (right): https://codereview.chromium.org/1616223002/diff/40001/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp#newcode523 tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp:523: HFILE lockfd ...
4 years, 10 months ago (2016-01-26 07:04:15 UTC) #16
danakj
https://codereview.chromium.org/1616223002/diff/40001/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp File tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp (right): https://codereview.chromium.org/1616223002/diff/40001/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp#newcode523 tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp:523: HFILE lockfd = OpenFile("rewrite-sym.lock", &lockfd_out, OF_CREATE); On 2016/01/26 07:04:15, ...
4 years, 10 months ago (2016-01-26 23:34:53 UTC) #17
dcheng
lgtm with a nit https://codereview.chromium.org/1616223002/diff/60001/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp File tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp (right): https://codereview.chromium.org/1616223002/diff/60001/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp#newcode546 tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp:546: UnlockFileEx(lockfd, 0, 1, 0, &unlock_out); ...
4 years, 10 months ago (2016-01-26 23:41:45 UTC) #18
danakj
https://codereview.chromium.org/1616223002/diff/60001/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp File tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp (right): https://codereview.chromium.org/1616223002/diff/60001/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp#newcode546 tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp:546: UnlockFileEx(lockfd, 0, 1, 0, &unlock_out); On 2016/01/26 23:41:45, dcheng ...
4 years, 10 months ago (2016-01-26 23:43:52 UTC) #19
danakj
https://codereview.chromium.org/1616223002/diff/60001/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp File tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp (right): https://codereview.chromium.org/1616223002/diff/60001/tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp#newcode546 tools/clang/rewrite_to_chrome_style/RewriteToChromeStyle.cpp:546: UnlockFileEx(lockfd, 0, 1, 0, &unlock_out); On 2016/01/26 23:43:51, danakj ...
4 years, 10 months ago (2016-01-26 23:44:53 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1616223002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1616223002/80001
4 years, 10 months ago (2016-01-26 23:48:56 UTC) #23
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 10 months ago (2016-01-27 00:12:17 UTC) #24
commit-bot: I haz the power
4 years, 10 months ago (2016-01-27 00:13:33 UTC) #26
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/bf6983ea366435a931b8f8af4408855b0b580de1
Cr-Commit-Position: refs/heads/master@{#371650}

Powered by Google App Engine
This is Rietveld 408576698