My code looks like this
PerfCreateInstance(); // Create the Object instance
PerfSetULongLongCounterValue(NewData); // Set a value say 100
OldData = NewData;
while(1) {
if (NewData > OldData) {
PerfIncrementULongLongCounterValue(NewData - OldData);
OldData = NewData;
}
if (NewData < OldData) {
PerfDecrementULongLongCounterValue(OldData - NewData);
OldData = NewData;
}
if (NewData == OldData) {
PerfSetULongLongCounterValue(NewData);
OldData = NewData;
}
} // end of while loop
My values are all ULONGLONG. I get a perfect smooth trace. However
Whenever NewData == OldData and I do PerfSetULongLongCounterValue(NewData); I get all broken traces.
I did try by doing simply calling PerfSetULongLongCounterValue() for all values without bothering to check for the old value or doing INC or DEC operation and that resulted in even bad broken trace form. Could some kind soul point me out what part of the logic is wrong in my code?
thanks
ananda