Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OMPD] The LLVM OMPD library passes the memory read/write callback address argument by value #53

Open
jdelsign opened this issue Feb 27, 2019 · 0 comments

Comments

@jdelsign
Copy link

The LLVM OMPD library pass the memory read/write callback address argument by value, but it should be passing the argument as a pointer to the address.

The OMP v5.0 spec (and omp-tools.h header) define the read and write memory callbacks as:

    typedef ompd_rc_t (*ompd_callback_memory_read_fn_t)(
	ompd_address_space_context_t *address_space_context,
	ompd_thread_context_t *thread_context, const ompd_address_t *addr,
	ompd_size_t nbytes, void *buffer);

    typedef ompd_rc_t (*ompd_callback_memory_write_fn_t)(
        ompd_address_space_context_t *address_space_context,
        ompd_thread_context_t *thread_context, const ompd_address_t *addr,
        ompd_size_t nbytes, const void *buffer);

However, the LLVM OMPD library passes the "addr" argument by-value. For example, see:
https://github.com/OpenMPToolsInterface/LLVM-openmp/blob/ompd-devices/libompd/src/ompd.h#L200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants