UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor jonny
Visitor
9,640 Views
Registered: ‎05-14-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

Hello everybody,

 

I've read this thread with interest and hope to find a solution for the very,very slow GDB GUI.

In order to understand, that we talk about the same: I mean the debugger running under eclipse from the 'Xilinx ISE Design Suite 10.1->EDK->Xilinx Platform Studio SDK

under Windows XP.

 

I've debugged a project with the Microblaze and also the PowerPC of an Virtex4.

The debugging of the PowerPC is extremely slow (micoblaze a bit better - but also unsatisfactoy). And the most annoying thing is not the download time, this is also awful, but stepping or running to breakpoints is the most terrible thing. It takes tens of seconds, which is not acceptable in my opinion. Try Visual Studio from MS, and you have fun :-)).

 

All given hints with entries in command windows or home-directories or similar don't help if either the hints are for other operating systems or not clear, how to use.

And as far as I see they all refer to download issues. 

And to close variable-windows isn't really a good choice. Why should I step through a program, when i don't see a result in a variable-, memory - or expression window?

That makes no sense. 

I hope, that someone from Xilinx willl answer and give 'real' hints, workarounds, or at least tells us, that they've  skrewed up the debugger.

 

Jonny

0 Kudos
Visitor rehnmaak
Visitor
9,520 Views
Registered: ‎04-25-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

I've made some optimizations to the edk 11.1 mb-gdb. Especially the locals and disassembly views are updated much faster. 

 

http://rapidshare.com/files/241802067/mb-gdb-6.5.0-lightning-speed-090607.zip

 

Also remember to update your .gdbinit filtes (in c:\Documents and Settings\yourname):

 

set download-write-size 4096
set remote memory-write-packet-size 16384
set remote memory-write-packet-size fixed
set remote memory-read-packet-size 4096
set remote memory-read-packet-size fixed

 

There is a tactical patch for the XMD see http://www.xilinx.com/support/answers/32621.htm

 

 

0 Kudos
Visitor jonny
Visitor
9,418 Views
Registered: ‎05-14-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

Hello rehnmaak,

 

I'm a seldom viewer to this forum, and when I did so, rapidShare had removed your zip-file. Could you be so kind, to copy it again. I will

look more often then.

Regards

0 Kudos
Visitor rehnmaak
Visitor
9,415 Views
Registered: ‎04-25-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution
0 Kudos
Xilinx Employee
Xilinx Employee
9,403 Views
Registered: ‎01-18-2008

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

@rehnmaak - Could you provide details on exactly what was changed? I haven't tried it as yet. If the optimizations are general enough, then we can try to get that into the shipped versions of gdb.

 

The download-write-size, etc options are all on by default in the 11.x toolchain, so the .gdbinit is not required anymore. 

0 Kudos
Visitor rehnmaak
Visitor
9,400 Views
Registered: ‎04-25-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

For downloading the maximum block size was limited to around 400bytes per chunk. This was changed to 16kbytes, it actually does not improve download speed very much but it's an unnecessary limitation.

 

The other annoying thing is that the disassembly view took for ever because only 4bytes per chunk was transferred. I implemented a read-ahead buffer that reads 1024bytes per chunk. This made disassembly of large objects around 100 times faster.

 

Viewing locals has always been very slow with microblaze and gdb. It's so slow especially when large structures are on the stack it's almost impossible to use the locals view. Many people are instead adding variables of interest to the watch window. Because reading of locals is not always sequential I've implemented a cache (256 entries by 256 bytes). Every time gdb gets signal (like stop or breakpoint) the cache is invalidated. This improvement makes single line stepping much faster.

0 Kudos
Xilinx Employee
Xilinx Employee
9,397 Views
Registered: ‎01-18-2008

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution
Great work, thank you. We will get these modifications incorporated into the next release.
0 Kudos
Visitor chetferry
Visitor
9,389 Views
Registered: ‎06-23-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

Any possibility you would be willing to upload the mb-gdb-6.5.0-lightning-speed-090607.zip file again?  The link to download it is not working now.  Thanks very much.

0 Kudos
Visitor chetferry
Visitor
9,387 Views
Registered: ‎06-23-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution
I have also been frustrated with the VERY slow performance of debugging a PPC440 design using SDK in the 10.1.03 tools.  I have tried it with Windows XP and also on Suse Enterprise Desktop Linux.  The performance problem was the same on both platforms.  Has any one tried the 11.2 tools to see if it is any better?
0 Kudos
Visitor rehnmaak
Visitor
9,373 Views
Registered: ‎04-25-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

Didn't the last link work?

 

Rapidshare isn't exactly user friendly... Anyone got some serverspace to spare?

 

 

http://rapidshare.com/files/241824170/mb-gdb-6.5.0-lightning-speed-090607.zip

0 Kudos
Visitor chetferry
Visitor
10,390 Views
Registered: ‎06-23-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

I have the file now.  Thanks very much.

 

I tried debugging this evening with the 11.2 tools and it has the same speed problems.  Any one from Xilinx wan't to comment on plans to fix this speed problem for the masses?

 

I will try rehnmaak's stuff soon and let you know how it goes.  By the way I am running the tools on a 4.3 GHz system with 64 bit Suse Enterprise Desktop and 8G of RAM.  So it can't have any thing to do with my PC.

 

On the bright side of things there are several problems that we were having with our PPC440 design in 10.1.03 that have gone away when we upgraded to new IP in version 11.2.  So there are definately some improvements to the IP that have helped us. :smileyhappy:

 

 

0 Kudos
Visitor rehnmaak
Visitor
10,388 Views
Registered: ‎04-25-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution
Glad you got the file. Note that the patch I've made is *only* for microblaze.
0 Kudos
Visitor chetferry
Visitor
10,377 Views
Registered: ‎06-23-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

Thanks for pointing out that it is only for microblaze.  Unfortunately I am doing a dual PPC440 design in a V5 FXT200 part.  So I guess I can't use your patch.  Any suggestions on what I can do for a PPC440 design in the 11.2 tools?  Thanks.

 

0 Kudos
Visitor chetferry
Visitor
10,375 Views
Registered: ‎06-23-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

Any possiblity that Xilinx will follow rehnmaak's example for microblaze and come out with a similar patch for PPC440 in the 11.2 tools?  This speed thing is a real bummer for your customers.  It also slows down how long it takes us to get our products to market, and hence order lots of big expensive chips from you guys :-)

 

 

0 Kudos
Visitor rehnmaak
Visitor
10,373 Views
Registered: ‎04-25-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution
I guess I could patch the ppc gdb too, but I would like some feedback on the microblaze patch first.
0 Kudos
Xilinx Employee
Xilinx Employee
10,356 Views
Registered: ‎01-18-2008

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

The only change in the 11.1 toolchain is that the download speed issue is resolved. The speed while stepping through programs is still slow, and I think it is quite noticeable for PPC.

 

I do apologize for the delay in the fix. We will try to get this fixed asap - either in 11.3, or 12.1 in the worst case. Ideally we should be able to get it fixed in an AR or something before 11.3. I will update this thread when we have a resolution. 

0 Kudos
Visitor chetferry
Visitor
10,350 Views
Registered: ‎06-23-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

That is great news that it is being worked on.  I will look forward to a fix.  Hopefully it will be fixed for 64 bit Linux as well as Windows. 

 

I was thinking about throwing together a quick mb design using base sytem builder to try rehnmaak's patch in 11.2 to give some feedback.  But I then realized the patch is for Windows so I don't think I am in a position to give feedback.  Sorry about that.  I was using Windows in the past but have moved to using Linux because the Xilinx tool support for 64 bits seems to be much better on the Linux OS.  When we place and route our FX200T design a 32 bit OS won't cut it because of the memory requirements.

 

vsiva, hopefully any AR fixes would include support for 64 bit Linux?  Thanks.   

0 Kudos
Highlighted
Visitor rehnmaak
Visitor
13,784 Views
Registered: ‎04-25-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

I have now applied the patches to the powerpc as well as the linux versions of gdb. I've not done much testing of the linux versions more than it do communicate with the target. The powerpc gdb is also slower than the microblaze when it comes to single line stepping, becase of the powerpc has to examine the stack frame before being able to set breakpoints when "stepping over calls".

 

I did some investigation how gdb is doing the single line stepping. It seem like it steps one machine instruction at a time until it reaches a call instruction where it puts a breakpoint just after the call instruction. I don't know why it just don't put a breakpoint at the next line. I'll have a look at the 6.8 version and see if it is any different.

 

I also had trouble with tk/tcl when running under linux. I had to comment a few lines in:

 

listbox.tcl lines 182-184

text.tcl lines 461-463

 

There are no instructions how to change and backup the files on linux so you are on your own. But as far as I understand just put the files in the /bin folder....

 

 ...and don't forget to leave feedback when you try them out.

 

 

http://rapidshare.com/files/250110867/mb-nt-gdb-6.5.0-lightning-speed-090630.zip

 

http://rapidshare.com/files/250111415/mb-linux-gdb-6.5.0-lightning-speed-090630.zip

 

http://rapidshare.com/files/250113194/ppc-nt-gdb-6.5.0-lightning-speed-090630.zip

 

http://rapidshare.com/files/250113764/ppc-linux-gdb-6.5.0-lightning-speed-090630.zip

 

 

Visitor cigyc
Visitor
10,284 Views
Registered: ‎03-10-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

rehnmaak,

 

I tried out your PPC linux patch for gdb and there is a definite improvement. Still not fast enough sometimes, but it is much more useable than before. The delay is on the order of 5-7 seconds rather than the 10-15 seconds it used to be. It also seems to depend on the complexity of the statement being executed. Thanks very much for making the effort!

 

I hope Xilinx looks at this patch and integrates it into their next release....anyone from Xilinx care to respond?

 

BTW I am using gnat (http://libre.adacore.com/libre/tools/gps/) on Linux as my debugger frontend. Way better than the Xilinx SDK in my opinion.

 

0 Kudos
Visitor rehnmaak
Visitor
10,282 Views
Registered: ‎04-25-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

Can you provide some kind of test code that I can try because I'm getting responsetimes in the order of 0.5 second, although in NT but it shouldn't be any different in linux.

 

Do you by chance have the abillity to try the nt version?

0 Kudos
Visitor cigyc
Visitor
9,176 Views
Registered: ‎03-10-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

0.5 second responses?! That would be great....

 

I am debugging code in EDK/sw/ThirdParty/sw_services/lwip130_v1_00_b/src/contrib/ports/xilinx/netif/xlltemacif_hw.c

 

Sorry, I don't think I will be able to try the NT version right now.

 

One thing I noted is that in the gdb console I get a message like:

 

 Software Breakpoint 14 Hit, Processor Stopped at 0x20004f1c

 

which I believe indicates that gdb is about to stop and give me a prompt back. But it always takes a few seconds before I do get the prompt. Not sure why it takes that long. I am running on a 3 GHz dual core machine with 6GB RAM, so I don't think it is a resource problem.

 

0 Kudos
Visitor rehnmaak
Visitor
9,171 Views
Registered: ‎04-25-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

What's happening after the program is stopped by a breakpoint is gdb is reading all the locals and updating the watch window. What I did was writing a cache with a 256 byte cache line. Because gdb is very inefficient when it comes to untangling the locals.

 

Any way you could write "ver" (without the quotes) in xmd and it will show you all the communication that goes on between gdb and the target. If you could just copy the output and post it for one "step" (make sure you get rid of all the other) that is especially slow I will have a look at it. Or you could post a personal message so we don't clutter the forum.

 

0 Kudos
Visitor cigyc
Visitor
9,171 Views
Registered: ‎03-10-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

I don't have a watch window open and I am not displaying any variables, so that should not account for the delay.

 

I am attaching the "ver" output from xmd from executing 1 line of code:

 

 options |= XTE_MULTICAST_OPTION;

 

It took 7 seconds to get a prompt back.

 

I have another log that took 17 seconds and will send it if you are interested.

 

I also ran strace on xmd and gdb while they were waiting and found that xmd was simply taking a long time to get any data from the card. Once it got the data it would promptly send it to gdb. The data is sent in chunks of 1500 bytes. So this may be an issue with communication across the USB cable?

 

 

 Thanks!

 

 

0 Kudos
Visitor rehnmaak
Visitor
9,159 Views
Registered: ‎04-25-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

That small amount of data should take a lot less than 7 seconds.

 

I saw that you had a retry when reading registers. Is that were it stalls? Do you get that everytime?

 

 

0 Kudos
Visitor cigyc
Visitor
9,151 Views
Registered: ‎03-10-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

There are occasional retries, but they go by very fast. ie The retry doesn't seem to be related to any timeout, but instead in response to whatever data was received:

 

 Received < '-' Retry Ack, Sending Data Again...

 

The actual delays happen in this state:

 

 XMD(440): Read registers

 

After the delay there is a burst of " Sending > $0001...." (with or without a retry) ending in "Received < m2....".

 

So once a data transfer starts it seems to happen pretty fast, even with a retry. But getting it to start is where the delay seems to come in.

 

 

0 Kudos
Visitor rehnmaak
Visitor
9,147 Views
Registered: ‎04-25-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

Ok, it seem like it is as you said a problem to get the data out of the chip.  I didn't have these problems because I was running the xmd on my NT machine and gdb on linux in a virtual box. I'll try installing edk on my linux box and see what happens.

 

But I think Xilinx got to help with this one....

 

 

0 Kudos
Explorer
Explorer
8,867 Views
Registered: ‎11-13-2007

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution
Add me to the list. Painfully slow stepping and also pretty slow downloads. Where do we find the 3 gdb settings (download-write-size, etc)??
0 Kudos
Explorer
Explorer
8,866 Views
Registered: ‎11-13-2007

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution
rehnmaak , Xilinx should PAY you to fix their code and make it usable.
0 Kudos
Visitor cigyc
Visitor
8,700 Views
Registered: ‎03-10-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

Not sure if anyone is following this thread anymore, but I found a fix for this problem: use the old Jungo windrvr instead of libusb.

 

libusb (which 11.2 uses by default, and was available in 10.1) is much slower than the Jungo windrvr for accessing the USB cable. Some slowdown is to be expected since the code runs in userspace, but it doesn't explain the numbers I saw while programming an 8MB bitstream to flash:

 

Windows: 9 minutes

RHEL (windrvr): 8 minutes

RHEL (libusb): 20 minutes

Ubuntu (libusb): 50 minutes!

 

The bundled version of windrvr does not compile on  Ubuntu so I had to download the latest version from jungo.com and build it. With it the programming time on Ubuntu went down to 8 minutes.

 

Interestingly this also helped in the debugger slowdown issue. With windrvr I now get instant responses from the debugger both on RHEL and Ubuntu.

 

 

 

 

 

 

Visitor cigyc
Visitor
8,088 Views
Registered: ‎03-10-2009

Re: GDB GUI (Insight) *very* slow under Xilinx 10.1 suite

Jump to solution

An update to the above: the Jungo driver does not work on 64-bit Ubuntu 9.04; it crashes the system. But 32-bit is OK so far.

 

0 Kudos