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

Re: [Xen-devel] How to trace when xen boots?



On Wed, May 14, 2014 at 11:29 AM, haofeng hua <huahaofeng@xxxxxxxxx> wrote:
> Hi,all.
> I am new here and with little experience in kernel programming and
> debugging.
> I am recently implementing a simple scheduler for Xen. I have implemented
> the interfaces such as init, init_domain, alloc_pdata, alloc_vdata,
> insert_vcpu and do_schedule. Then I start to try if my functions work well.
> I trace my code with "printk". My printing strings show on screen until it
> goes to console_endboot() in setup.c. I don't know how to trace next because
> the screen turns black and what's worse is the booting stops. I guess there
> could be something wrong with my schedule function. I can't find out the
> bugs because I can't see my print information.
> How could I trace after console_endboot()? Is the printing information
> stored in files? Howerver, my scheduler failed to start dom0.
> Do you use printk to trace when xen boots? Every time I have to add printk()
> and compile and reboot when I want to trace something. Is there any easy
> way?

Two things.  First, if you're going to do Xen hacking, particularly
with the scheduler, you really must have a serial console set up:

http://wiki.xen.org/wiki/Xen_Serial_Console

Secondly, Xen now has a feature called cpupools that allows several
schedulers to run simultaneously on the system.  It might be easier
for development if you boot on the default scheduler, then create a
new cpupool with your new scheduler after boot, while you're still
debugging things.

http://wiki.xen.org/wiki/Cpupools_Howto

Good luck!
 -George

_______________________________________________
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®.