<div dir="ltr"><div class="gmail_default" style="font-size:small;font-family:georgia,serif">Thanks Eric.</div><div class="gmail_default" style="font-size:small;font-family:georgia,serif"><br></div>
<div class="gmail_default" style="font-size:small;font-family:georgia,serif">So, I need to look at QEMU. Do you know which files/functions should I look at? </div><div class="gmail_default" style="font-size:small;font-family:georgia,serif">

<br></div><div class="gmail_extra">
<div class="gmail_default" style="font-family:georgia,serif;font-size:small;color:rgb(0,0,0);display:inline">​--</div></div><div class="gmail_extra"><div class="gmail_default" style="font-family:georgia,serif;font-size:small;color:rgb(0,0,0);display:inline">

Faiz​</div><br><br><div class="gmail_quote">On Thu, Mar 20, 2014 at 12:41 PM, Eric Blake <span dir="ltr"><<a href="mailto:eblake@redhat.com" target="_blank">eblake@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div>On 03/20/2014 10:05 AM, Faizul Bari wrote:<br>
> ​Hello,<br>
><br>
> I have been trying to track different phases of a live migration process. I<br>
> am using libvirt ​with qemu-kvm. I am issuing migration commands using<br>
> virsh.<br>
><br>
> Now, I want to measure the time spent in each phase of live migration,<br>
> e.g., pre-copy and stop-copy. I stumbled upon the file qemu_driver.c. It<br>
> has functions like<br>
><br>
> qemudDomainMigratePrepare2<br>
> qemudDomainMigratePerform<br>
> qemudDomainMigrateFinish2<br>
<br>
</div>These functions perform different handshakes between the two libvirt<br>
ends of the migration.  However, the entire migration is done by a<br>
single qemu monitor command, and it is that monitor command that further<br>
divides the work into phases such as pre-copy and stop-copy.<br>
<div><br>
><br>
> I want to know whether qemudDomainMigratePerform and<br>
> qemudDomainMigrateFinish2 directly map to the pre-copy and stop-copy phase?<br>
> or the qemudDomainMigratePerform function performs both of them?<br>
<br>
</div>The MigratePerform function is the one place that calls the qemu monitor<br>
command.  I know there have been proposals upstream in qemu to add<br>
additional statistics in 'query-migrate' monitor command; perhaps there<br>
is still more work needed in libvirt to grab those additional statistics<br>
in a manner that can be exposed to the user.<br>
<span><font color="#888888"><br>
--<br>
Eric Blake   eblake redhat com    <a href="tel:%2B1-919-301-3266" value="+19193013266" target="_blank">+1-919-301-3266</a><br>
Libvirt virtualization library <a href="http://libvirt.org" target="_blank">http://libvirt.org</a><br>
<br>
</font></span></blockquote></div><br></div></div>