Quote:
Originally Posted by illiad_fan
Hi Antartica,
I'm also interested in it, I'm writing a small program like scribble. Although I call dmDisplay(dmCmdPriorUrgent, dmQTyping); each stylus touch the screen, but the display update too slow(about 0.5s later). Could you show me how to strace the scribble?
Thank you very much
|
For these instructions I assume that you have ssh access to the iliad (it can be done in mrxvt, but it can be somewhat frustrating to type the commands there).
I attach a version of strace compiled for the iliad.
First of all, to strace scribble you have to install strace in the iliad (i.e in /usr/bin/).
Then, substitute scribble with a script that calls strace and logs the results to a file
Code:
ereader# cd /usr/bin
ereader# mv scribble scribble.real
ereader# echo "#!/bin/sh" > scribble
ereader# echo "exec /usr/bin/strace /usr/bin/scribble 2> /mnt/free/scribble.strace.`date +%Y%m%d%H%M%S`" >> scribble
ereader# chmod 755 scribble
NOTE: Beware of the backticks (`) in the exec line; if unsure how to enter them, left the line as shown below instead and copy the resulting /mnt/free/scribble.strace file to a new name between tests;
Code:
reader# echo "exec /usr/bin/strace /usr/bin/scribble 2> /mnt/free/scribble.strace" >> scribble
Then comes the boring part, that is to generate the logs and analyze the output.
Fist generate a baseline compare file; just open scribble and exit it.
Copy the resulting /mnt/free/scrible.strace.<numbers> to your PC as scribble.strace.base
Then start doing more interesting things (like jotting a dot, then a line, then a lot of lines, etc).
Compare the resulting files with a source compare tool. If you're using Linux, meld is a good one (
http://meld.sourceforge.net/ ).
With that you'll get what does the app for the updates. What is missing is the initialization part. You could look in the scribble.strace.base for a line that mentions /dev/fb and if it's opened, look for lines that contain the file descriptor number that the open returned. if it access the screen by other means, you will have to investigate.
If you post here as an attachment some of the scribble.strace files, I can help analyzing them as time permits...
Good luck!