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

Issue 312880043: i#2006 generalize drcachesim: add the reuse-distance tool

Can't Edit
Can't Publish+Mail
Start Review
Created:
7 years, 6 months ago by zhaoqin
Modified:
7 years, 5 months ago
Reviewers:
bruening
CC:
dynamorio-devs_googlegroups.com
Visibility:
Public.

Description

Commit log for first patchset: --------------- i#2006 generalize drcachesim: add the reuse-distance tool Adds the reuse-distance tool to track each cacheline usage by the trace Example result: Hello, world! ---- <application exited with code 0> ---- Cache Reuse Distance result: Cache Reuse Distance: 78851 total accesses Cache Reuse Distance: 2254 unique cache lines accessed Cache Reuse Distance: reuse distance threshold = 256 cache lines Cache Reuse Distance: top interested 10 cache lines cache line: #accesses #accesses (< threshold) (>= threshold) 0x7f1a055c0780: 250, 6 0x7f1a055d11c0: 373, 5 0x7f1a055d1180: 332, 5 0x7f1a04798480: 21, 5 0x7f1a057e3a40: 43, 4 0x7f1a04798940: 43, 4 0x7f1a057e4a40: 42, 4 0x7f1a055c07c0: 40, 4 0x7f1a057e2e80: 37, 4 0x7f1a057e4580: 27, 4 ---------------

Patch Set 1 #

Patch Set 2 : update commit msg #

Patch Set 3 : update commit msg #

Patch Set 4 : update test option for tool.reuse #

Patch Set 5 : fix a crash #

Patch Set 6 : update commit #

Patch Set 7 : use a different pipe name #

Patch Set 8 : adjust output #

Patch Set 9 : update commit msg #

Total comments: 37

Patch Set 10 : PTAL #

Patch Set 11 : fix two style violations (line too long) #

Total comments: 8

Patch Set 12 : final #

Patch Set 13 : Committed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+374 lines, -4 lines) Patch
M clients/drcachesim/CMakeLists.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M clients/drcachesim/analyzer.cpp View 2 chunks +5 lines, -1 line 0 comments Download
M clients/drcachesim/common/options.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -0 lines 0 comments Download
M clients/drcachesim/common/options.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +7 lines, -0 lines 0 comments Download
M clients/drcachesim/tests/histogram.templatex View 1 2 3 4 5 6 7 1 chunk +2 lines, -2 lines 0 comments Download
A clients/drcachesim/tests/reuse_distance.templatex View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +10 lines, -0 lines 0 comments Download
A clients/drcachesim/tools/reuse_distance.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +181 lines, -0 lines 0 comments Download
A clients/drcachesim/tools/reuse_distance.cpp View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +158 lines, -0 lines 0 comments Download
M suite/tests/CMakeLists.txt View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +8 lines, -1 line 0 comments Download

Messages

Total messages: 24
zhaoqin
7 years, 6 months ago (2016-10-18 02:27:59 UTC) #1
zhaoqin
Commit log for latest patchset: --------------- i#2006 generalize drcachesim: add the reuse-distance tool Adds the ...
7 years, 6 months ago (2016-10-18 02:37:43 UTC) #2
zhaoqin
Commit log for latest patchset: --------------- i#2006 generalize drcachesim: add the reuse-distance tool Adds the ...
7 years, 6 months ago (2016-10-18 02:38:47 UTC) #3
zhaoqin
Commit log for latest patchset: --------------- i#2006 generalize drcachesim: add the reuse-distance tool Adds the ...
7 years, 6 months ago (2016-10-18 02:44:26 UTC) #4
zhaoqin
Commit log for latest patchset: --------------- i#2006 generalize drcachesim: add the reuse-distance tool Adds the ...
7 years, 6 months ago (2016-10-18 15:13:15 UTC) #5
zhaoqin
Commit log for latest patchset: --------------- i#2006 generalize drcachesim: add the reuse-distance tool Adds the ...
7 years, 6 months ago (2016-10-18 15:17:01 UTC) #6
zhaoqin
Commit log for latest patchset: --------------- i#2006 generalize drcachesim: add the reuse-distance tool Adds the ...
7 years, 6 months ago (2016-10-18 15:45:48 UTC) #7
bruening
Woah, are you sure this is ready for review? I see 7 patchsets (!) already.
7 years, 6 months ago (2016-10-18 15:46:53 UTC) #8
zhaoqin
On 2016/10/18 15:46:53, bruening wrote: > Woah, are you sure this is ready for review? ...
7 years, 6 months ago (2016-10-18 16:01:21 UTC) #9
bruening
On 2016/10/18 15:45:48, zhaoqin wrote: > Example result: > Hello, world! > ---- <application exited ...
7 years, 6 months ago (2016-10-19 21:38:50 UTC) #10
zhaoqin
On 2016/10/19 21:38:50, bruening wrote: > On 2016/10/18 15:45:48, zhaoqin wrote: > > Example result: ...
7 years, 6 months ago (2016-10-20 01:04:50 UTC) #11
bruening
On 2016/10/20 01:04:50, zhaoqin wrote: > On 2016/10/19 21:38:50, bruening wrote: > > On 2016/10/18 ...
7 years, 6 months ago (2016-10-20 02:41:44 UTC) #12
zhaoqin
Commit log for latest patchset: --------------- i#2006 generalize drcachesim: add the reuse-distance tool Adds the ...
7 years, 6 months ago (2016-10-20 20:56:58 UTC) #13
zhaoqin
Commit log for latest patchset: --------------- i#2006 generalize drcachesim: add the reuse-distance tool Adds the ...
7 years, 6 months ago (2016-10-20 20:58:59 UTC) #14
bruening
There are a surprising number of code style violations so maybe another look is best. ...
7 years, 5 months ago (2016-10-27 04:25:27 UTC) #15
zhaoqin
https://codereview.appspot.com/312880043/diff/150001/clients/drcachesim/tools/reuse_distance.h File clients/drcachesim/tools/reuse_distance.h (right): https://codereview.appspot.com/312880043/diff/150001/clients/drcachesim/tools/reuse_distance.h#newcode44 clients/drcachesim/tools/reuse_distance.h:44: /* A double linked list for cache line reference ...
7 years, 5 months ago (2016-10-28 18:26:28 UTC) #16
bruening
https://codereview.appspot.com/312880043/diff/150001/clients/drcachesim/tools/reuse_distance.h File clients/drcachesim/tools/reuse_distance.h (right): https://codereview.appspot.com/312880043/diff/150001/clients/drcachesim/tools/reuse_distance.h#newcode47 clients/drcachesim/tools/reuse_distance.h:47: struct line_ref_t* prev; On 2016/10/28 18:26:28, zhaoqin wrote: > ...
7 years, 5 months ago (2016-10-29 17:59:04 UTC) #17
zhaoqin
Commit log for latest patchset: --------------- i#2006 generalize drcachesim: add the reuse-distance tool Adds the ...
7 years, 5 months ago (2016-11-04 15:15:30 UTC) #18
zhaoqin
https://codereview.appspot.com/312880043/diff/150001/clients/drcachesim/tests/reuse_distance.templatex File clients/drcachesim/tests/reuse_distance.templatex (right): https://codereview.appspot.com/312880043/diff/150001/clients/drcachesim/tests/reuse_distance.templatex#newcode4 clients/drcachesim/tests/reuse_distance.templatex:4: Cache Reuse Distance: [0-9]+ total accesses On 2016/10/27 04:25:26, ...
7 years, 5 months ago (2016-11-04 15:15:42 UTC) #19
zhaoqin
Commit log for latest patchset: --------------- i#2006 generalize drcachesim: add the reuse-distance tool Adds the ...
7 years, 5 months ago (2016-11-04 15:21:43 UTC) #20
bruening
On 2016/11/04 15:21:43, zhaoqin wrote: > Cache Reuse Distance result: > 78802 total accesses > ...
7 years, 5 months ago (2016-11-07 17:17:42 UTC) #21
zhaoqin
Commit log for latest patchset: --------------- i#2006 generalize drcachesim: add the reuse-distance tool Adds the ...
7 years, 5 months ago (2016-11-07 19:58:31 UTC) #22
zhaoqin
https://codereview.appspot.com/312880043/diff/190001/clients/drcachesim/tools/reuse_distance.h File clients/drcachesim/tools/reuse_distance.h (right): https://codereview.appspot.com/312880043/diff/190001/clients/drcachesim/tools/reuse_distance.h#newcode51 clients/drcachesim/tools/reuse_distance.h:51: uint64_t distant_refs; // the total number of distant references ...
7 years, 5 months ago (2016-11-07 20:00:03 UTC) #23
zhaoqin
7 years, 5 months ago (2016-11-07 20:25:31 UTC) #24
Committed as
https://github.com/DynamoRIO/dynamorio/commit/018a5f73a2a4eb90c0df774dc96eec9...

Final commit log: 
---------------
i#2006 generalize drcachesim: add the reuse-distance tool

Adds the reuse-distance tool to track each cacheline usage by the trace.

Adds reuse-distance test.

Adds -simulator_type reuse_distance and -reuse_distance_threshold.

Implements a doubly linked list based reuse distance checking algorithm.

Example result:
Hello, world!
---- <application exited with code 0> ----
cache reuse distance result:
78802 total accesses
2257 unique cache lines accessed
reuse distance threshold = 256 cache lines
top 10 frequently referenced cache lines
        cache line:     #references   #distant refs
    0x7f1833fd5400:        11934,            1
    0x7f1833fe2c00:        10549,            3
    0x7f1833fd3880:         6640,            0
    0x7f1833fd3840:         4722,            0
    0x7f1833fd53c0:         3614,            1
    0x7f1833fd2fc0:         2744,            1
    0x7f1833fd2f80:         2418,            0
    0x7f1833fe3940:         2205,            3
    0x7fff8b07da80:         2031,            2
    0x7f1833fd3780:         1814,            1
top 10 distant repeatedly referenced cache lines
        cache line:     #references   #distant refs
    0x7f1833fc9780:          257,            6
    0x7f1833fda1c0:          379,            5
    0x7f1833fda180:          338,            5
    0x7f18331a1480:           28,            5
    0x7f18341eca40:           48,            4
    0x7f18331a1940:           48,            4
    0x7f18341eda40:           47,            4
    0x7f1833fc97c0:           45,            4
    0x7f18341ebe80:           42,            4
    0x7f18341ed580:           32,            4

Review-URL: https://codereview.appspot.com/312880043
---------------
Sign in to reply to this message.

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