<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><font face="Courier New, Courier, monospace">Hi David,</font></p>
<p><font face="Courier New, Courier, monospace">Thanks for your
reply. I find that I need to add some new types of profile data
that are specific to JIT environment like Function Ordering.
Function Ordering is similar to dynamic call graph which records
the execution of functions at runtime along with the order in
which they are called.<br>
</font></p>
<p><font face="Courier New, Courier, monospace">Eg: Suppose they are
5 functions (F1..F5). F1 calls other functions in the order
described below, count tells how many times that function is
called from F1.<br>
</font></p>
<p><font face="Courier New, Courier, monospace"> Start[1] --> F1
--> F2 [1] <br>
</font></p>
<p><font face="Courier New, Courier, monospace">
--> F4 [1] <br>
</font></p>
<p><font face="Courier New, Courier, monospace">
--> F2 [2] <br>
</font></p>
<p><font face="Courier New, Courier, monospace">
--> F1 [0] (recursions) <br>
</font></p>
<p><font face="Courier New, Courier, monospace">
--> F5 [1].<br>
</font></p>
<p><font face="Courier New, Courier, monospace">This shows us which
function is likely going to execute next. So with the help of
multiple JIT background threads, those functions get compiled
before they are referenced. This will help in reducing JIT
compilation latencies in multi-core machines. This order must be
collected during profiling so that we can use in JIT.<br>
</font></p>
<p><font face="Courier New, Courier, monospace">I'm new to PGO, I
don't know how the internals details much. As I'm proposing this
project for GSoC'19, i would like to learn how PGO is
structured, it will help to design similar for JIT & write a
proposal. I googled but is less information available about the
internals. Is any references to internals/working of PGO are
welcome!</font></p>
<p><font face="Courier New, Courier, monospace"><br>
</font></p>
<div class="moz-cite-prefix">On 30/03/19 3:13 AM, Xinliang David Li
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CALRgJCPzDG0=K08YrH1hS6FPqoZJ7iyf=6xXs06xcCG2r2PKcg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Currently PGO is based on branch weight metadata,
indirect call target meta data, function entry counts, and
profile summary. It is independent of source of profile data, so
most of the support is already there if the dynamic profiling
provides the same/subset of information. However If you have new
types of profile data that no existing PGO passes take advantage
of, you can certainly need to write your own support for that.
<div><br>
</div>
<div>David</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, Mar 29, 2019 at 2:31
PM preejackie via llvm-dev <<a
href="mailto:llvm-dev@lists.llvm.org" moz-do-not-send="true">llvm-dev@lists.llvm.org</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p><font face="Courier New, Courier, monospace">Hi all, <br>
</font></p>
<p><font face="Courier New, Courier, monospace">I need to do
dynamic profiling in ORC JIT between the runs. Is it
possible to re-use parts of the static pgo code in llvm
for the purpose given that JIT uses llvm codegen. Or I
need to write my own implementation to support profile
guide optimization in JIT ?</font></p>
<p><font face="Courier New, Courier, monospace">Please tell
me if you want information.<br>
</font></p>
<pre class="gmail-m_95890128902136684moz-signature" cols="72">--
Have a great day!
PreeJackie</pre>
</div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank"
moz-do-not-send="true">llvm-dev@lists.llvm.org</a><br>
<a
href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev"
rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote>
</div>
</blockquote>
<pre class="moz-signature" cols="72">--
Have a great day!
PreeJackie</pre>
</body>
</html>