Skip to content

Commit

Permalink
i#2006 generalize drcachesim: declare drmemtrace_client_main (#2546)
Browse files Browse the repository at this point in the history
Adds drmemtrace_client_main() to the drmemtrace.h header for use by
applications statically linking in the drmemtrace client.

The existing burst_static test for this linking feature did not need a
declaration as it tests a duplicate weak symbol, so there are no test
changes here.
  • Loading branch information
derekbruening authored Jul 18, 2017
1 parent 0d60e62 commit 8bd6c39
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions clients/drcachesim/tracer/drmemtrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ typedef enum {
DRMEMTRACE_ERROR_INVALID_PARAMETER, /**< Operation failed: invalid parameter */
} drmemtrace_status_t;

DR_EXPORT
/**
* To support statically linking multiple clients on UNIX, dr_client_main() inside
* drmemtrace is a weak symbol which just calls the real initializer
* drmemtrace_client_main(). An enclosing application can override dr_client_main()
* and invoke drmemtrace_client_main() explicitly at a time of its choosing.
*/
void
drmemtrace_client_main(client_id_t id, int argc, const char *argv[]);

/**
* Function for file open.
* The file access mode is set by the \p mode_flags argument which is drawn from
Expand Down

0 comments on commit 8bd6c39

Please sign in to comment.