Wednesday, March 21, 2012

How to fix windows XP blue screen crash with error code 0x000000ED

X61 err:
"Umountable volume

0x000000ED (0x8a859030 0xc0000006 ...)"


1. Go to BIOS setup:
SATA: change ATA to generic


2. Use windows XP installltion CD to boot up,  choose fix


And under C:\ prompt
input
chkdsk -r


And then reboot, input F8, get into safe mode
and remove any culprits 
and  install anti-virus software.

Tuesday, March 20, 2012

How to do kernel module profiling

mkdir -p  /lib/modules/2.6.18-194.el5/kernel/fs/$MOD/
cd /mnt/fmt/
cp modules/2.6.18-194.el5.x86_64/*.ko /lib/modules/2.6.18-194.el5/kernel/fs/$MOD/


cd /mnt/fmt/fs
stap_timing.sh $FILENAME #without path
stap -v timing.stp

Press ctrl-c will show the result.




#more stap_timing.sh

<pre>
cat >timing.stp <<EOF
global timing, intervals, avg_intervals
probe begin
{
        printf("Timing functions. Press Ctrl+C to print summary and exit.\n");
}
EOF

while [ $# -gt 0 ]
do
        file=$1; shift;
        cat >>timing.stp <<EOF
                probe module("MOD").function("*@$file").call {
                        timing[tid(), probefunc()] = gettimeofday_us()
                }
                probe module("MOD").function("*@$file").return {
                        t = gettimeofday_us()
                        old_t = timing[tid(), probefunc()]
                        if (old_t) intervals[probefunc()] <<< t - old_t
                        delete timing[tid(), probefunc()]
                }
        EOF
done



cat >>timing.stp <<EOF
probe end
{
        foreach (func in intervals)
                avg_intervals[func] = @avg(intervals[func])
        printf("%30s %10s %10s %10s %10s %15s\n",
                "Func", "Min (us)", "Avg (us)", "Max (us)", "Count", "Total (usec)");

        foreach (func in avg_intervals+)
                printf("%30s %10d %10d %10d %10d %15d\n",
                        func, @min(intervals[func]), @avg(intervals[func]), @max(intervals[func]),
                        @count(intervals[func]), @sum(intervals[func]))
        exit()
}
EOF

</pre>