programs mmaps very slowly when run under dbx

I have an application that mmaps lots of pages. Around 10000 pages a second (whith 10000 calls to mmap). If I run it under dbx it runs very slowly. So slow that dbx becomes useless.

If I attach dbx after it has finished mmaping it attaches fast.

So it seems to me that dbx could take a more lazy approch to new pages and run faster.

Or ?

(I might of course be the only person in the world that have this kind of problem )

[452 byte] By [willoch] at [2007-11-26 10:24:57]
# 1
There *might* be some room for enhancement. If you file an RFE (request for enhancement) through bugs.sun.com, I (or another engineer) will look at it and see if dbx performance can be improved on such an app.
MaximKartashev at 2007-7-7 2:27:20 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 2

This might be pretty easy to fix if it is due to mmap tracking done

by the runtime checking feature. This tracking causes a context switch for each

mmap call because dbx is intercepting them (as if you used "trace syscall mmap").

The tracking for mmap might be turned on even when RTC is not in use. But I

don't think it has to be.

--chris

ChrisQuenelle at 2007-7-7 2:27:20 > top of Java-index,Development Tools,Solaris and Linux Development Tools...
# 3

It appeared that it's indeed a bug, you can check the bug report at

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6484788

With the fix applied, dbx performance increased by 10 times on a program that makes a lot of mmap calls. You should be able to get dbx with this bug fixed in the next Sun Studio Express release (http://developers.sun.com/sunstudio/downloads/express.jsp).

Thanks for reporting the problem!

MaximKartashev at 2007-7-7 2:27:20 > top of Java-index,Development Tools,Solaris and Linux Development Tools...