<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/openmp/libompd/src/TargetValue.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[OpenMP][OMPD] Implementation of OMPD debugging library - libompd.</title>
<updated>2021-09-01T09:20:16+00:00</updated>
<author>
<name>Vignesh Balasubramanian</name>
<email>Vignesh.Balasubrmanian@amd.com</email>
</author>
<published>2021-09-01T08:13:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=b9a27908f9b3d90ef306dfb9296316943c203726'/>
<id>b9a27908f9b3d90ef306dfb9296316943c203726</id>
<content type='text'>
This is a continuation of the review: https://reviews.llvm.org/D100181
Creates a new directory "libompd" under openmp.

"TargetValue" provides operational access to the OpenMP runtime memory
 for OMPD APIs.
With TargetValue, using "pointer" a user can do multiple operations
from casting, dereferencing to accessing an element for structure.
The member functions are designed to concatenate the operations that
are needed to access values from structures.

e.g., _a[6]-&gt;_b._c would read like :
TValue(ctx, "_a").cast("A",2)
	.getArrayElement(6).access("_b").cast("B").access("_c")
For example:
If you have a pointer "ThreadHandle" of a running program then you can
access/retrieve "threadID" from the memory using TargetValue as below.

  TValue(context, thread_handle-&gt;th) /*__kmp_threads[t]-&gt;th*/
    .cast("kmp_base_info_t")
    .access("th_info") /*__kmp_threads[t]-&gt;th.th_info*/
    .cast("kmp_desc_t")
    .access("ds") /*__kmp_threads[t]-&gt;th.th_info.ds*/
    .cast("kmp_desc_base_t")
    .access("ds_thread") /*__kmp_threads[t]-&gt;th.th_info.ds.ds_thread*/
                .cast("kmp_thread_t")
.getRawValue(thread_id, 1);

Reviewed By: @hbae
Differential Revision: https://reviews.llvm.org/D100182
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a continuation of the review: https://reviews.llvm.org/D100181
Creates a new directory "libompd" under openmp.

"TargetValue" provides operational access to the OpenMP runtime memory
 for OMPD APIs.
With TargetValue, using "pointer" a user can do multiple operations
from casting, dereferencing to accessing an element for structure.
The member functions are designed to concatenate the operations that
are needed to access values from structures.

e.g., _a[6]-&gt;_b._c would read like :
TValue(ctx, "_a").cast("A",2)
	.getArrayElement(6).access("_b").cast("B").access("_c")
For example:
If you have a pointer "ThreadHandle" of a running program then you can
access/retrieve "threadID" from the memory using TargetValue as below.

  TValue(context, thread_handle-&gt;th) /*__kmp_threads[t]-&gt;th*/
    .cast("kmp_base_info_t")
    .access("th_info") /*__kmp_threads[t]-&gt;th.th_info*/
    .cast("kmp_desc_t")
    .access("ds") /*__kmp_threads[t]-&gt;th.th_info.ds*/
    .cast("kmp_desc_base_t")
    .access("ds_thread") /*__kmp_threads[t]-&gt;th.th_info.ds.ds_thread*/
                .cast("kmp_thread_t")
.getRawValue(thread_id, 1);

Reviewed By: @hbae
Differential Revision: https://reviews.llvm.org/D100182
</pre>
</div>
</content>
</entry>
</feed>
