29 { |
29 { |
30 TInt error = KErrNone; |
30 TInt error = KErrNone; |
31 TUint32 callResults[KNumberOfTraceCallIterations]; |
31 TUint32 callResults[KNumberOfTraceCallIterations]; |
32 for(TInt i = 0; i < KNumberOfTraceCallIterations; i++) |
32 for(TInt i = 0; i < KNumberOfTraceCallIterations; i++) |
33 { |
33 { |
34 error = TimeTraceCall(aTraceData, aTime, aCount); |
34 error = TimeTraceCallL(aTraceData, aTime, aCount); |
35 callResults[i] = aTime; |
35 callResults[i] = aTime; |
36 } |
36 } |
37 TUint32 total = 0; |
37 TUint32 total = 0; |
38 for(TInt i = 0; i < KNumberOfTraceCallIterations; i++) |
38 for(TInt i = 0; i < KNumberOfTraceCallIterations; i++) |
39 total += callResults[i]; |
39 total += callResults[i]; |
40 aTime = total / KNumberOfTraceCallIterations; //average |
40 aTime = total / KNumberOfTraceCallIterations; //average |
41 return error; |
41 return error; |
42 } |
42 } |
43 |
43 |
44 |
44 |
45 TInt TTraceTester::TimeTraceCall(TTraceConfigs& aTraceData, TUint32& aTime, TUint32& aCount) |
45 TInt TTraceTester::TimeTraceCallL(TTraceConfigs& aTraceData, TUint32& aTime, TUint32& aCount) |
46 { |
46 { |
47 TInt error = KErrNotSupported; |
47 TInt error = KErrNotSupported; |
48 if(TApiCaller::IsKernelTrace(aTraceData.iApiUsed)) |
48 if(TApiCaller::IsKernelTrace(aTraceData.iApiUsed)) |
49 { |
49 { |
50 // kernel side removed for now |
50 // kernel side removed for now |