My high priority task is being preempted

Post it here I will have a look at it for you if you don’t have the full development system .

If you do have a professional edition, then assuming you have a tcp/ip connection to your target system you can initiate the trace from the IDE and then look at the capture data from there. All you need is to run qconn on the target ( and pdebug if you plan on doing remote debugging )

Man, I am really trying to teach myself how to fish but this stuff is just not intuitive. I now downloaded the momentics development for windows and installed it. The help file is riddled with open the System Profile Editor but I have no idea where to start it from. They make sound like it in the main menu bar but I don’t have that tab. What is going on here?

Thanks

The IDE is very different from anything you’ve seen, concept of perspective can be unsettling.

You should REALLY start by the beginning and read the doc.

You need to import the trace data into a project ( Target project for example ) and then you’ll be able to view it.

Note that in theory if this is for commercial use you must pay for the dev kit.

HOLY COW, that is SLICK. Thanks Mario for the little helper.

It appears I have a task that is going back and forth with the procnto and I can’t find out why. I looked in the code of the process which is doing it but don’t see where it is sending the message. From the system profiler I got a:

MsgSendv
msg0 = 0x20100
msg1 = 0x0
msg2 = 0x200818
function = _IO_CONNECT_OPEN

I search my code base for a message or pulse defined as 0x20100 but I don’t see it being defined. Is this a qnx pre-defined msg?
Should I see an actual MsgSend fuction call for this to happen or are there other calls that produce this same event to be logged?

Thanks

Do you know the name of the process?

My process? The process is a one of my companies processes. It is sending it to procnto and I see thread 6 and then 8 handling the requests.

Eric

Eric,

The IO_CONNECT_OPEN comes from trying to connect to a resource manager.

It’s a predefined QNX message and you won’t find it in your code.

Code wise, I’d say one of your processes (the high priority one) is calling to a resource manager over and over again every so often (maybe the serial driver).

Any chance the code might be closing and opening the serial driver someplace every so often? The other possibility is that the occasional writes to the flash disk are causing this. When those are made, do they just leave the file open continually and write occasionally or do they open/write/close again.

You can look for io_open in the help docs or IO_CONNECT_OPEN which will lead you to io_open.

Tim

It is always leaving it open. That is probably bad.

I did at one time wrap the actual file writes with a permissive and I would still see the problem even though I wasn’t writting out to this debug file.

Let me change that always open thing and get back with you.
Thanks

Oops, I was wrong. It is closing the file at the end of the function.

In the system profiler I can hover over an event and get a decription. Is there a way to see that description and the ones around it in some text view instead of a hover pop-up? I guess more like what traceprinter does.

open the tracelogger view.

Eric,

The always open case is actually the one you want.

The IO_CONNECT call would come from repeatedly ‘opening’ the file each time you write data because the file system manager is a resource manager and you would have to connect to it in order to send data to it that would be written to the disk.

You might want to change to the always open case.

Tim

Tim
I will try that then

Mario
How do I open the tracelogger view? I don’t see anything when I right click nor do I see anything in any of the main toolbar.

Tim

I am not sure if my debug file would be a resource manager though. I read some stuff on what a resource manger is and I don’t think a file on the hard disk would be a resource manager. Am I wrong?

Eric - are you in the SystemProfiler perspective? You should see a Tracelog view at the bottom, under the Timeline editor.

If not, goto Window->Open Perspective and select QNX System Profiler

BTW if you want to post the kev file (they gzip very well, btw) or send them directly Mario has offered to look over it, and I would extend the same offer.

epatters,

You are correct.   A file on the hard disk is not by itself a resource manager.  A file on the hard disk could be a program that happens to be a resource manager.   Also, a resource manager can attach to any name space and make it look like a file on the hard disk.    That is, you could (but usually wouldn't) attach to the name space, /usr/logos/mylog.jpg.  Then whenever a program opened that file you could return a different set of data to every open.   I think R Krten describes doing something like this in his book to show how you could make a web counter image.

thanks for the help on getting the tracelog. I guess I wasn’t in the System Profiler ‘Perspective’. Going to open perspective->others->qnx system profiler fixed it. Thanks again guys.

Go with bzip2 even better then gzip :wink:

Or for even better compression get 7za from the package community.qnx.com/sf/frs/do/down … s1153?dl=1

Final resolution:

I found my high priority task was forking and it was taking up to 5 ms to fork the process which is running at the parent’s priority cause lots of havoc on my system. I switched to a thread for the work that the fork was doing.

Thanks to everyone who helped me learn a lot from the past few days.