[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] function snprintf() in xen_save_domain.c for debugged


  • To: Olaf Hering <olaf@xxxxxxxxx>
  • From: Adel Amani <adel.amani66@xxxxxxxxx>
  • Date: Thu, 20 Feb 2014 23:18:39 -0800 (PST)
  • Cc: Xen <xen-devel@xxxxxxxxxxxxx>
  • Delivery-date: Fri, 21 Feb 2014 08:00:22 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=N1v5k7DsCIKr1XR0M+sqKh+nc9zNo9A0dYDUcbh9m0cKxPmypDKZM27rBraQTuWrVp6FUr8oNrh6P6oShZ93Spqb+t3ax3WFzBR7NOI97OjLADwEXQmHYRt254ud/xsNH220KYE0MiMbCmY4KmT/KJB7VBthy7nr6zizTCQtC1o=;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

i change code xc_save.c as follows:

 int 
 main(int argc, char **argv) 
 { 
-    unsigned int maxit, max_f; 
+    unsigned int maxit, max_f, lflags; 
     int io_fd, ret, port; 
     struct save_callbacks callbacks; 
+    xentoollog_level lvl; 
+    xentoollog_logger *l; 
  
     if (argc != 6) 
         errx(1, "usage: %s iofd domid maxit maxf flags", argv[0]); 
  
-    si.xch = xc_interface_open(0,0,0); 
-    if (!si.xch) 
-        errx(1, "failed to open control interface"); 

     io_fd = atoi(argv[1]); 
     si.domid = atoi(argv[2]); 
     maxit = atoi(argv[3]); 
@@ -185,6 +183,13 @@ main(int argc, char **argv) 
  
     si.suspend_evtchn = -1; 
  
+    lvl = si.flags & XCFLAGS_DEBUG ? XTL_DEBUG: XTL_DETAIL; 
+    lflags = XTL_STDIOSTREAM_HIDE_PROGRESS; 
+    l = (xentoollog_logger *)xtl_createlogger_stdiostream(stderr, lvl, lflags); 
+    si.xch = xc_interface_open(l, 0, 0); 
+    if (!si.xch) 
+        errx(1, "failed to open control interface"); 

     si.xce = xc_evtchn_open(NULL, 0); 
     if (si.xce == NULL) 
         warnx("failed to open event channel handle"); 

==============================================================
in this code change lflags to  lflags = XTL_STDIOSTREAM_HIDE_PROGRESS; and i don't know what mean's @@ -185,6 +183,13 @@ main(int argc, char **argv)    ?!!

 so i delete @@ -185,6 +183,13 @@ main(int argc, char **argv) from code and test logger (to live migration of  VM) But again result output in xend.log don't change.
 
 
Adel Amani
M.Sc. Candidate@Computer Engineering Department, University of Isfahan
Email: A.Amani@xxxxxxxxxxxx


On Wednesday, February 19, 2014 5:42 PM, Olaf Hering <olaf@xxxxxxxxx> wrote:
On Tue, Feb 18, Adel Amani wrote:

> Hi
> i know because a lot of product output in xen-4.1, no logger in xc_save.c
> i change code again according to "http://xen.1045712.n5.nabble.com/
> xen-unstable-tools-xc-restore-logging-in-xc-save-td5714324.html"
> But i don't know purpose Mr "patchbot" of
> @@ -185,6 +183,13 @@ main(int argc, char **argv)
> i test again to code Mr "patchbot" without Consideration
> @@ -185,6 +183,13 @@ main(int argc, char **argv)
> and result again no message :-( ....


All that is very imprecise, so we can not help.
Also read what I wrote: dont drop xen-devel@xxxxxxxxxxxxx

Olaf




> On Saturday, February 8, 2014 1:52 AM, Olaf Hering <olaf@xxxxxxxxx> wrote:
> Please keep xen-devel@xxxxxxxxxxxxx in CC list.
>
> On Fri, Feb 07, Adel Amani wrote:
>
> > yes, for print data, function print_stats() in xc_domain_save.c should run
> and
> > work. I read in function and check.... But i don't know really why this don't
> > work!!! :-|... I test 'fprintf(stderr,"STDERR\n"); fprintf(stdout,"STDOUT\
> n");'
> > But again not answer :'(.....
>
> Please make sure the self-compiled binary is actually used. Try this to
> verify: grep STDERR /usr/lib/xen/bin/xc_save (assuming the fprintf above
> is actually in the compiled code.)
>
> > how boot the domU with 'initcall_debug'?! Are affect on total time?!
>
> This is a kernel cmdline option. Please check the documentation about
> how to pass additional kernel parameters to a domU.
>
>
> Olaf
>
>


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.