Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(18)

Issue 309340043: i#1680 large pages: In the API, replace PAGE_SIZE with dr_page_size(). (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 1 month ago by Edmund.Grimley.Evans
Modified:
10 years ago
Reviewers:
zhaoqin, bruening
CC:
dynamorio-devs_googlegroups.com
Visibility:
Public.

Description

Commit log for first patchset: --------------- i#1680 large pages: In the API, replace PAGE_SIZE with dr_page_size(). When the page size is not a compile-time constant it is misleading to provide the traditional PAGE_SIZE macro, so we provide a function instead, though we provisionally define PAGE_SIZE as dr_page_size() in globals.h for DynamoRIO's internal use. Modify non-core code to use the new API. Currently the value returned by dr_page_size() is always 4096. In future on AArch64 it will sometimes be 16384 or 65536. ---------------

Patch Set 1 #

Total comments: 13

Patch Set 2 : os_page_size #

Total comments: 16

Patch Set 3 : #undef PAGE_SIZE #

Total comments: 19

Patch Set 4 : Move PAGE_START #

Patch Set 5 : DynamoRIO_PAGE_SIZE_COMPATIBILITY #

Total comments: 3

Patch Set 6 : auto-set DynamoRIO_PAGE_SIZE_COMPATIBILITY #

Total comments: 3

Patch Set 7 : Committed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+157 lines, -39 lines) Patch
M api/docs/API.doxy View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M api/docs/release.dox View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
M api/samples/instrace_x86.c View 1 2 4 chunks +6 lines, -4 lines 0 comments Download
M api/samples/memtrace_x86.c View 1 2 4 chunks +6 lines, -4 lines 0 comments Download
M clients/drcov/postprocess/drcov2lcov.cpp View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M core/arch/proc.h View 1 2 3 4 5 6 1 chunk +0 lines, -8 lines 0 comments Download
M core/lib/genapi.pl View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M core/lib/instrument.c View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
M core/lib/instrument_api.h View 1 2 3 4 5 6 1 chunk +23 lines, -0 lines 0 comments Download
M core/os_shared.h View 1 2 3 4 5 6 1 chunk +14 lines, -0 lines 0 comments Download
M core/unix/os.c View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
M core/win32/os.c View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
M ext/drcontainers/drtable.c View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M ext/drx/drx_buf.c View 1 2 3 4 5 6 4 chunks +7 lines, -5 lines 0 comments Download
M make/DynamoRIOConfig.cmake.in View 1 2 3 4 5 6 2 chunks +8 lines, -0 lines 0 comments Download
M make/DynamoRIOConfigVersion.cmake.in View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M suite/tests/client-interface/file_io.dll.c View 1 chunk +3 lines, -3 lines 0 comments Download
M suite/tests/client_tools.h View 1 2 1 chunk +12 lines, -0 lines 0 comments Download
M suite/tests/common/tool.drcov.fib.template View 1 2 1 chunk +1 line, -1 line 0 comments Download
M suite/tests/security-common/TestMemProtChg.c View 1 3 chunks +17 lines, -4 lines 0 comments Download
M suite/tests/tools.h View 1 2 3 4 5 6 3 chunks +21 lines, -7 lines 0 comments Download

Messages

Total messages: 41
Edmund.Grimley.Evans
10 years, 1 month ago (2016-09-09 12:21:50 UTC) #1
zhaoqin
LGTM with a few questions https://codereview.appspot.com/309340043/diff/1/api/samples/instrace_x86.c File api/samples/instrace_x86.c (right): https://codereview.appspot.com/309340043/diff/1/api/samples/instrace_x86.c#newcode294 api/samples/instrace_x86.c:294: size_t page_size = dr_page_size(); ...
10 years, 1 month ago (2016-09-09 21:09:48 UTC) #2
Edmund.Grimley.Evans
https://codereview.appspot.com/309340043/diff/1/api/samples/instrace_x86.c File api/samples/instrace_x86.c (right): https://codereview.appspot.com/309340043/diff/1/api/samples/instrace_x86.c#newcode294 api/samples/instrace_x86.c:294: size_t page_size = dr_page_size(); On 2016/09/09 21:09:47, zhaoqin wrote: ...
10 years, 1 month ago (2016-09-09 21:29:21 UTC) #3
bruening
bug: there is no definition of dr_page_size on Windows I thought I was the reviewer ...
10 years, 1 month ago (2016-09-10 00:24:10 UTC) #4
Edmund.Grimley.Evans
https://codereview.appspot.com/309340043/diff/1/core/globals.h File core/globals.h (right): https://codereview.appspot.com/309340043/diff/1/core/globals.h#newcode347 core/globals.h:347: # define PAGE_SIZE dr_page_size() On 2016/09/10 00:24:09, bruening wrote: ...
10 years ago (2016-09-16 11:02:26 UTC) #5
Edmund.Grimley.Evans
Commit log for latest patchset: --------------- i#1680 large pages: In the API, replace PAGE_SIZE with ...
10 years ago (2016-09-16 11:03:55 UTC) #6
zhaoqin
On 2016/09/16 11:03:55, Edmund.Grimley.Evans wrote: > Commit log for latest patchset: > --------------- > i#1680 ...
10 years ago (2016-09-22 15:45:07 UTC) #7
bruening
Mostly looks good but there is one issue to discuss: whether it is safe to ...
10 years ago (2016-09-26 18:05:10 UTC) #8
Edmund.Grimley.Evans
https://codereview.appspot.com/309340043/diff/20001/core/globals.h File core/globals.h (right): https://codereview.appspot.com/309340043/diff/20001/core/globals.h#newcode342 core/globals.h:342: /* If PAGE_SIZE is not provided by the system, ...
10 years ago (2016-09-26 20:18:17 UTC) #9
Edmund.Grimley.Evans
I'm just going with #undef PAGE_SIZE for now.
10 years ago (2016-09-27 09:24:32 UTC) #10
Edmund.Grimley.Evans
Commit log for latest patchset: --------------- i#1680 large pages: In the API, replace PAGE_SIZE with ...
10 years ago (2016-09-27 09:24:52 UTC) #11
bruening
I think the drcov.fib change is not supposed to be here? https://codereview.appspot.com/309340043/diff/20001/clients/drcov/postprocess/drcov2lcov.cpp File clients/drcov/postprocess/drcov2lcov.cpp (right): ...
10 years ago (2016-09-28 19:53:57 UTC) #12
Edmund.Grimley.Evans
https://codereview.appspot.com/309340043/diff/20001/clients/drcov/postprocess/drcov2lcov.cpp File clients/drcov/postprocess/drcov2lcov.cpp (right): https://codereview.appspot.com/309340043/diff/20001/clients/drcov/postprocess/drcov2lcov.cpp#newcode717 clients/drcov/postprocess/drcov2lcov.cpp:717: ASSERT(ALIGNED(size, dr_page_size()), "Module size is not aligned"); On 2016/09/28 ...
10 years ago (2016-09-28 20:41:17 UTC) #13
Edmund.Grimley.Evans
https://codereview.appspot.com/309340043/diff/40001/core/lib/instrument_api.h File core/lib/instrument_api.h (right): https://codereview.appspot.com/309340043/diff/40001/core/lib/instrument_api.h#newcode2189 core/lib/instrument_api.h:2189: dr_page_size(void); On 2016/09/28 20:41:17, Edmund.Grimley.Evans wrote: > On 2016/09/28 ...
10 years ago (2016-09-28 21:06:20 UTC) #14
bruening
https://codereview.appspot.com/309340043/diff/40001/core/arch/proc.h File core/arch/proc.h (right): https://codereview.appspot.com/309340043/diff/40001/core/arch/proc.h#newcode59 core/arch/proc.h:59: #define PAGE_START(x) (((ptr_uint_t)(x)) & ~(os_page_size()-1)) bug: this is pasted ...
10 years ago (2016-09-28 21:55:54 UTC) #15
Edmund.Grimley.Evans
https://codereview.appspot.com/309340043/diff/40001/core/arch/proc.h File core/arch/proc.h (right): https://codereview.appspot.com/309340043/diff/40001/core/arch/proc.h#newcode59 core/arch/proc.h:59: #define PAGE_START(x) (((ptr_uint_t)(x)) & ~(os_page_size()-1)) On 2016/09/28 21:55:54, bruening ...
10 years ago (2016-09-28 22:38:53 UTC) #16
Edmund.Grimley.Evans
https://codereview.appspot.com/309340043/diff/40001/core/arch/proc.h File core/arch/proc.h (right): https://codereview.appspot.com/309340043/diff/40001/core/arch/proc.h#newcode59 core/arch/proc.h:59: #define PAGE_START(x) (((ptr_uint_t)(x)) & ~(os_page_size()-1)) > OK, I'll change ...
10 years ago (2016-09-29 09:44:54 UTC) #17
Edmund.Grimley.Evans
Commit log for latest patchset: --------------- i#1680 large pages: In the API, replace PAGE_SIZE with ...
10 years ago (2016-09-29 09:52:20 UTC) #18
bruening
https://codereview.appspot.com/309340043/diff/40001/core/arch/proc.h File core/arch/proc.h (right): https://codereview.appspot.com/309340043/diff/40001/core/arch/proc.h#newcode59 core/arch/proc.h:59: #define PAGE_START(x) (((ptr_uint_t)(x)) & ~(os_page_size()-1)) On 2016/09/29 09:44:54, Edmund.Grimley.Evans ...
10 years ago (2016-09-29 15:47:19 UTC) #19
bruening
https://codereview.appspot.com/309340043/diff/40001/core/lib/instrument_api.h File core/lib/instrument_api.h (right): https://codereview.appspot.com/309340043/diff/40001/core/lib/instrument_api.h#newcode2189 core/lib/instrument_api.h:2189: dr_page_size(void); On 2016/09/29 15:47:19, bruening wrote: > On 2016/09/28 ...
10 years ago (2016-09-29 16:02:23 UTC) #20
Edmund.Grimley.Evans
https://codereview.appspot.com/309340043/diff/40001/core/arch/proc.h File core/arch/proc.h (right): https://codereview.appspot.com/309340043/diff/40001/core/arch/proc.h#newcode59 core/arch/proc.h:59: #define PAGE_START(x) (((ptr_uint_t)(x)) & ~(os_page_size()-1)) On 2016/09/29 15:47:19, bruening ...
10 years ago (2016-09-29 16:08:46 UTC) #21
Edmund.Grimley.Evans
So, is the only remaining question here what to do about PAGE_SIZE and PAGE_START in ...
10 years ago (2016-10-01 08:52:15 UTC) #22
bruening
Let's get Qin's opinion. We may want to have the next release be 7.0 anyway ...
10 years ago (2016-10-03 01:17:13 UTC) #23
zhaoqin
https://codereview.appspot.com/309340043/diff/40001/core/lib/instrument_api.h File core/lib/instrument_api.h (right): https://codereview.appspot.com/309340043/diff/40001/core/lib/instrument_api.h#newcode2189 core/lib/instrument_api.h:2189: dr_page_size(void); On 2016/09/29 15:47:19, bruening wrote: > On 2016/09/28 ...
10 years ago (2016-10-03 04:09:59 UTC) #24
zhaoqin
On 2016/10/03 04:09:59, zhaoqin wrote: > https://codereview.appspot.com/309340043/diff/40001/core/lib/instrument_api.h > File core/lib/instrument_api.h (right): > > https://codereview.appspot.com/309340043/diff/40001/core/lib/instrument_api.h#newcode2189 > ...
10 years ago (2016-10-03 04:10:48 UTC) #25
bruening
https://codereview.appspot.com/309340043/diff/40001/core/lib/instrument_api.h File core/lib/instrument_api.h (right): https://codereview.appspot.com/309340043/diff/40001/core/lib/instrument_api.h#newcode2189 core/lib/instrument_api.h:2189: dr_page_size(void); On 2016/10/03 04:09:59, zhaoqin wrote: > On 2016/09/29 ...
10 years ago (2016-10-03 04:33:49 UTC) #26
Edmund.Grimley.Evans
Commit log for latest patchset: --------------- i#1680 large pages: In the API, replace PAGE_SIZE with ...
10 years ago (2016-10-03 13:41:10 UTC) #27
bruening
I think we should auto-set DynamoRIO_PAGE_SIZE_COMPATIBILITY if the client targets version 6.2 or earlier, just ...
10 years ago (2016-10-04 05:17:53 UTC) #28
Edmund.Grimley.Evans
Commit log for latest patchset: --------------- i#1680 large pages: In the API, replace PAGE_SIZE with ...
10 years ago (2016-10-04 09:07:55 UTC) #29
bruening
Please mention the auto-set in the commit msg. Contains a doxygen error -- see comment. ...
10 years ago (2016-10-04 15:02:31 UTC) #30
bruening
https://codereview.appspot.com/309340043/diff/100001/make/DynamoRIOConfig.cmake.in File make/DynamoRIOConfig.cmake.in (right): https://codereview.appspot.com/309340043/diff/100001/make/DynamoRIOConfig.cmake.in#newcode155 make/DynamoRIOConfig.cmake.in:155: # set(DynamoRIO_REG_COMPATIBILITY ON) Please document the new setting up ...
10 years ago (2016-10-05 03:12:15 UTC) #31
Edmund.Grimley.Evans
Committed as https://github.com/DynamoRIO/dynamorio/commit/326a0d5d0c79f6eb9f70ccee85b357291c2b7701 Final commit log: --------------- i#1680 large pages: In the API, replace PAGE_SIZE ...
10 years ago (2016-10-05 10:04:43 UTC) #32
Edmund.Grimley.Evans
https://codereview.appspot.com/309340043/diff/100001/core/lib/instrument_api.h File core/lib/instrument_api.h (right): https://codereview.appspot.com/309340043/diff/100001/core/lib/instrument_api.h#newcode2191 core/lib/instrument_api.h:2191: # undef PAGE_SIZE On 2016/10/04 15:02:31, bruening wrote: > ...
10 years ago (2016-10-05 10:06:17 UTC) #33
bruening
The Windows build is still broken (after the 2 bug fix CL's that followed this ...
10 years ago (2016-10-05 19:33:21 UTC) #34
Edmund.Grimley.Evans
On 2016/10/05 19:33:21, bruening wrote: > The Windows build is still broken (after the 2 ...
10 years ago (2016-10-05 19:40:42 UTC) #35
bruening
On Wed, Oct 5, 2016 at 3:40 PM, <Edmund.Grimley.Evans@gmail.com> wrote: > On 2016/10/05 19:33:21, bruening ...
10 years ago (2016-10-05 20:15:00 UTC) #36
bruening
I have the test fixes in a local tree, but am considering reverting as the ...
10 years ago (2016-10-05 20:19:51 UTC) #37
Edmund.Grimley.Evans
On 2016/10/05 20:19:51, bruening wrote: > I have the test fixes in a local tree, ...
10 years ago (2016-10-05 20:39:36 UTC) #38
bruening
I fixed the test, but this was not a pleasant scenario: too much build and ...
10 years ago (2016-10-05 21:16:01 UTC) #39
Edmund.Grimley.Evans
On 2016/10/05 21:16:01, bruening wrote: > I fixed the test, but this was not a ...
10 years ago (2016-10-07 10:22:39 UTC) #40
bruening
10 years ago (2016-10-07 16:09:43 UTC) #41
On 2016/10/07 10:22:39, Edmund.Grimley.Evans wrote:
> On 2016/10/05 21:16:01, bruening wrote:
> > I fixed the test, but this was not a pleasant scenario: too much build and
> test
> > breakage and affecting of other devs' time.  It doesn't seem a very workable
> > model to change Windows-affecting code without being able to test it
locally. 
> > Are you sure you can't get access to a Windows test env?  Any suggestions?
> 
> Thanks for fixing it. Fortunately these API-changing commits don't come too
> often, but I'll see if I can get (remote) access to a Windows system for
> testing. I'll also try to gather some ideas, in a brainstorming fashion, on
what
> we could perhaps do to make things easier...

Beyond just Windows, it has been getting hard to do DR work due to the number of
platforms increasing, and it may not be possible going forward for each
contributor to have access to every platform.  It is now quite easy to break the
Mac clang build due its picky warnings while succeeding in the Linux clang and
gcc builds; easy to break AArch64 tests while succeeding elsewhere; easy to
break certain types of Windows builds while local Windows builds succeed; etc. 
Travis at least gives us "trybots" for Mac -- having trybots for AArch64 tests
(not just builds) and for Windows would help but may not be easy to set up for
free.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b