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

Issue 318520043: TBR: i#2157 re-attach: add best-effort re-attach support

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

Description

Commit log for first patchset: --------------- i#2157 re-attach: add best-effort re-attach support While there are many globals that are not reset, we take a best-effort approach here and reset the ones that matter, allowing us to re-attach with a memtrace client and static DR. Portions of this were initially based on https://codereview.appspot.com/13314047/ from Peter Goodman. For DO_ONCE, an incremented counter is used. For numerous other globals, at exit time if doing_detach is set we reset them to NULL. For locks, we simply reset count_times_acquired but leave the deleted field as it does not matter much (part of the whole theme here: this may never be rock-solid for unusual option combinations but our goal is supporting the common case). For drreg, with the new multi-init feature we have to zero the options at exit time. Adds several tests by adding loops around existing start/stop tests, but stops short on burst_threads until i#2175 is fixed. ---------------

Patch Set 1 #

Patch Set 2 : Committed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+265 lines, -103 lines) Patch
M clients/drcachesim/tests/burst_static.cpp View 2 chunks +22 lines, -19 lines 0 comments Download
M clients/drcachesim/tests/burst_threads.cpp View 2 chunks +25 lines, -17 lines 0 comments Download
M clients/drcachesim/tests/offline-burst_static.templatex View 1 chunk +8 lines, -0 lines 0 comments Download
M clients/drcachesim/tracer/tracer.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M core/arch/arch.c View 2 chunks +15 lines, -1 line 0 comments Download
M core/config.c View 2 chunks +6 lines, -2 lines 0 comments Download
M core/dynamo.c View 1 chunk +27 lines, -0 lines 0 comments Download
M core/globals.h View 2 chunks +2 lines, -1 line 0 comments Download
M core/heap.c View 2 chunks +4 lines, -1 line 0 comments Download
M core/lib/dr_app.h View 2 chunks +8 lines, -2 lines 0 comments Download
M core/lib/instrument.c View 1 chunk +1 line, -0 lines 0 comments Download
M core/moduledb.c View 2 chunks +3 lines, -1 line 0 comments Download
M core/synch.c View 2 chunks +4 lines, -1 line 0 comments Download
M core/unix/loader.c View 2 chunks +8 lines, -1 line 0 comments Download
M core/unix/os.c View 5 chunks +17 lines, -5 lines 0 comments Download
M core/utils.h View 2 chunks +4 lines, -3 lines 0 comments Download
M core/utils.c View 3 chunks +12 lines, -0 lines 0 comments Download
M core/vmareas.c View 2 chunks +5 lines, -1 line 0 comments Download
M core/win32/callback.c View 2 chunks +6 lines, -1 line 0 comments Download
M core/win32/module.c View 2 chunks +3 lines, -1 line 0 comments Download
M core/win32/ntdll.c View 4 chunks +11 lines, -2 lines 0 comments Download
M core/win32/os.c View 1 chunk +2 lines, -0 lines 0 comments Download
M ext/drreg/drreg.c View 1 chunk +3 lines, -0 lines 0 comments Download
M suite/tests/CMakeLists.txt View 1 chunk +1 line, -1 line 0 comments Download
M suite/tests/api/static_detach.c View 2 chunks +12 lines, -1 line 0 comments Download
M suite/tests/api/static_detach.expect View 1 chunk +3 lines, -0 lines 0 comments Download
M suite/tests/runmulti.cmake View 2 chunks +52 lines, -42 lines 0 comments Download

Messages

Total messages: 2
bruening
7 years, 2 months ago (2017-02-14 03:23:50 UTC) #1
bruening
7 years, 2 months ago (2017-02-14 03:23:53 UTC) #2
Committed as
https://github.com/DynamoRIO/dynamorio/commit/2dd9659475aef0db32440e1f6adb745...

Final commit log: 
---------------
i#2157 re-attach: add best-effort re-attach support

While there are many globals that are not reset, we take a best-effort
approach here and reset the ones that matter, allowing us to re-attach with
a memtrace client and static DR.

Portions of this were initially based on
https://codereview.appspot.com/13314047/ from Peter Goodman.

For DO_ONCE, an incremented counter is used.

For numerous other globals, at exit time if doing_detach is set we reset
them to NULL.

For locks, we simply reset count_times_acquired but leave the deleted field
as it does not matter much (part of the whole theme here: this may never be
rock-solid for unusual option combinations but our goal is supporting the
common case).

For drreg, with the new multi-init feature we have to zero the options at
exit time.

Adds several tests by adding loops around existing start/stop tests, but
stops short on burst_threads until i#2175 is fixed.

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

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