sl@0: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32\drivers\trace\btrace.cpp sl@0: // sl@0: // sl@0: sl@0: #include sl@0: #include "platform.h" sl@0: #include "d_btrace.h" sl@0: sl@0: sl@0: class DBTraceTestFactory : public DLogicalDevice sl@0: { sl@0: public: sl@0: virtual TInt Install(); sl@0: virtual void GetCaps(TDes8& aDes) const; sl@0: virtual TInt Create(DLogicalChannelBase*& aChannel); sl@0: }; sl@0: sl@0: sl@0: class DBTraceTestChannel : public DLogicalChannelBase sl@0: { sl@0: public: sl@0: DBTraceTestChannel(); sl@0: virtual ~DBTraceTestChannel(); sl@0: // Inherited from DObject sl@0: virtual TInt RequestUserHandle(DThread* aThread, TOwnerType aType); sl@0: // Inherited from DLogicalChannelBase sl@0: virtual TInt DoCreate(TInt aUnit, const TDesC8* anInfo, const TVersion& aVer); sl@0: virtual TInt Request(TInt aReqNo, TAny* a1, TAny* a2); sl@0: private: sl@0: DThread* iClient; sl@0: public: sl@0: static void TestTrace(DBTraceTestChannel* aSelf); sl@0: static void TestUTrace(DBTraceTestChannel* aSelf); sl@0: private: sl@0: TUint32 iTestType; sl@0: TInt iTestDataSize; sl@0: TUint32 iTestData[KMaxBTraceRecordSize*2/4]; sl@0: volatile TBool iTimerExpired; sl@0: NTimer iTraceTimer; sl@0: TDfc iTraceIDFC; sl@0: }; sl@0: sl@0: sl@0: // sl@0: // DBTraceTestFactory sl@0: // sl@0: sl@0: TInt DBTraceTestFactory::Install() sl@0: { sl@0: return SetName(&RBTraceTest::Name()); sl@0: } sl@0: sl@0: void DBTraceTestFactory::GetCaps(TDes8& aDes) const sl@0: { sl@0: Kern::InfoCopy(aDes,0,0); sl@0: } sl@0: sl@0: TInt DBTraceTestFactory::Create(DLogicalChannelBase*& aChannel) sl@0: { sl@0: aChannel=new DBTraceTestChannel(); sl@0: if(!aChannel) sl@0: return KErrNoMemory; sl@0: return KErrNone; sl@0: } sl@0: sl@0: sl@0: // sl@0: // DBTraceTestChannel sl@0: // sl@0: sl@0: DBTraceTestChannel::DBTraceTestChannel() sl@0: : iTraceTimer((NTimerFn)TestTrace,this), sl@0: iTraceIDFC((NTimerFn)TestTrace,this) sl@0: { sl@0: } sl@0: sl@0: DBTraceTestChannel::~DBTraceTestChannel() sl@0: { sl@0: iTraceTimer.Cancel(); sl@0: } sl@0: sl@0: TInt DBTraceTestChannel::DoCreate(TInt /*aUnit*/, const TDesC8* /*aInfo*/, const TVersion& /*aVer*/) sl@0: { sl@0: iClient = &Kern::CurrentThread(); sl@0: return KErrNone; sl@0: } sl@0: sl@0: sl@0: TInt DBTraceTestChannel::RequestUserHandle(DThread* aThread, TOwnerType aType) sl@0: { sl@0: if (aType!=EOwnerThread || aThread!=iClient) sl@0: return KErrAccessDenied; sl@0: return KErrNone; sl@0: } sl@0: sl@0: TInt DBTraceTestChannel::Request(TInt aReqNo, TAny* a1, TAny* a2) sl@0: { sl@0: switch(aReqNo) sl@0: { sl@0: // test functions sl@0: case RBTraceTest::ETestSpecialTrace: sl@0: case RBTraceTest::ETestTrace: sl@0: { sl@0: TPtr8 data((TUint8*)&iTestData,sizeof(iTestData)); sl@0: Kern::KUDesGet(data,*(TDesC8*)a2); sl@0: iTestDataSize = data.Size()-4; sl@0: if(aReqNo==RBTraceTest::ETestSpecialTrace) sl@0: { sl@0: iTestType = (TUint)a1; sl@0: iTimerExpired = EFalse; sl@0: if(iTestType&RBTraceTest::EContextIsr) sl@0: iTraceTimer.OneShot(1); sl@0: else if(iTestType&RBTraceTest::EContextIDFC) sl@0: { sl@0: NKern::Lock(); sl@0: iTraceIDFC.Add(); sl@0: NKern::Unlock(); sl@0: } sl@0: else if(iTestType&RBTraceTest::EContextIntsOff) sl@0: { sl@0: TInt irq = NKern::DisableAllInterrupts(); sl@0: TestTrace(this); sl@0: NKern::RestoreInterrupts(irq); sl@0: } sl@0: else sl@0: TestTrace(this); sl@0: while(!__e32_atomic_load_acq32(&iTimerExpired)) {}; sl@0: return (TInt)NKern::CurrentThread(); sl@0: } sl@0: else sl@0: { sl@0: TInt delay = (TInt)a1/NKern::TickPeriod(); sl@0: iTestType = 0; sl@0: if(!delay) sl@0: TestTrace(this); sl@0: else sl@0: { sl@0: iTraceTimer.Cancel(); sl@0: iTraceTimer.OneShot(delay+1); sl@0: } sl@0: } sl@0: } sl@0: return KErrNone; sl@0: sl@0: case RBTraceTest::ETestBenchmark: sl@0: { sl@0: TInt delay = (TInt)a2/NKern::TickPeriod(); sl@0: TInt size = (TInt)a1; sl@0: iTestDataSize = -1; sl@0: sl@0: // wait for next tick... sl@0: iTraceTimer.Cancel(); sl@0: iTimerExpired = EFalse; sl@0: iTraceTimer.OneShot(1); sl@0: while(!__e32_atomic_load_acq32(&iTimerExpired)) {}; sl@0: sl@0: // do benchmark... sl@0: iTimerExpired = EFalse; sl@0: iTraceTimer.OneShot(delay+1); sl@0: TInt count = 0; sl@0: if(size) sl@0: for(;;) sl@0: { sl@0: TBool finished = __e32_atomic_load_acq32(&iTimerExpired); sl@0: BTraceContextN(BTrace::ETest1,0,0,0,&iTestData,size); sl@0: ++count; sl@0: if(!finished) sl@0: continue; sl@0: break; sl@0: } sl@0: else sl@0: for(;;) sl@0: { sl@0: TBool finished = __e32_atomic_load_acq32(&iTimerExpired); sl@0: BTrace0(BTrace::ETest1,0); sl@0: ++count; sl@0: if(!finished) sl@0: continue; sl@0: break; sl@0: } sl@0: return count; sl@0: } sl@0: sl@0: case RBTraceTest::ETestBenchmark2: sl@0: { sl@0: TInt delay = (TInt)a2/NKern::TickPeriod(); sl@0: TInt size = (TInt)a1; sl@0: iTestDataSize = -1; sl@0: sl@0: // wait for next tick... sl@0: iTraceTimer.Cancel(); sl@0: iTimerExpired = EFalse; sl@0: iTraceTimer.OneShot(1); sl@0: while(!__e32_atomic_load_acq32(&iTimerExpired)) {}; sl@0: sl@0: // do benchmark... sl@0: iTimerExpired = EFalse; sl@0: iTraceTimer.OneShot(delay+1); sl@0: TInt count = 0; sl@0: if(size) sl@0: for(;;) sl@0: { sl@0: TBool finished = __e32_atomic_load_acq32(&iTimerExpired); sl@0: BTraceFilteredContextN(BTrace::ETest1,0,KBTraceFilterTestUid1,0,&iTestData,size); sl@0: ++count; sl@0: if(!finished) sl@0: continue; sl@0: break; sl@0: } sl@0: else sl@0: for(;;) sl@0: { sl@0: TBool finished = __e32_atomic_load_acq32(&iTimerExpired); sl@0: BTraceFiltered4(BTrace::ETest1,0,KBTraceFilterTestUid1); sl@0: ++count; sl@0: if(!finished) sl@0: continue; sl@0: break; sl@0: } sl@0: return count; sl@0: } sl@0: sl@0: case RBTraceTest::ETestBenchmarkCheckFilter: sl@0: { sl@0: TInt delay = (TInt)a2/NKern::TickPeriod(); sl@0: sl@0: // wait for next tick... sl@0: iTraceTimer.Cancel(); sl@0: iTimerExpired = EFalse; sl@0: iTraceTimer.OneShot(1); sl@0: while(!__e32_atomic_load_acq32(&iTimerExpired)) {}; sl@0: sl@0: // do benchmark... sl@0: iTimerExpired = EFalse; sl@0: iTraceTimer.OneShot(delay+1); sl@0: TInt count = 0; sl@0: if(a1) sl@0: for(;;) sl@0: { sl@0: TBool finished = __e32_atomic_load_acq32(&iTimerExpired); sl@0: BTrace::CheckFilter2(BTrace::ETest1,KBTraceFilterTestUid1); sl@0: ++count; sl@0: if(!finished) sl@0: continue; sl@0: break; sl@0: } sl@0: else sl@0: for(;;) sl@0: { sl@0: TBool finished = __e32_atomic_load_acq32(&iTimerExpired); sl@0: BTrace::CheckFilter(BTrace::ETest1); sl@0: ++count; sl@0: if(!finished) sl@0: continue; sl@0: break; sl@0: } sl@0: return count; sl@0: } sl@0: case RBTraceTest::ETestUTrace: sl@0: { sl@0: TPtr8 data((TUint8*)&iTestData,sizeof(iTestData)); sl@0: Kern::KUDesGet(data,*(TDesC8*)a2); sl@0: iTestDataSize = data.Size()-4; sl@0: TInt delay = (TInt)a1/NKern::TickPeriod(); sl@0: iTestType = 0; sl@0: if(!delay) sl@0: TestUTrace(this); sl@0: else sl@0: { sl@0: iTraceTimer.Cancel(); sl@0: iTraceTimer.OneShot(delay+1); sl@0: } sl@0: return KErrNone; sl@0: } sl@0: sl@0: default: sl@0: break; sl@0: } sl@0: return KErrNotSupported; sl@0: } sl@0: sl@0: sl@0: void DBTraceTestChannel::TestTrace(DBTraceTestChannel* aSelf) sl@0: { sl@0: TInt size = aSelf->iTestDataSize; sl@0: if(size<0) sl@0: { sl@0: __e32_atomic_store_rel32(&aSelf->iTimerExpired, 1); sl@0: return; sl@0: } sl@0: TUint32* data = aSelf->iTestData; sl@0: BTrace::TCategory category = (BTrace::TCategory)((TUint8*)data)[0]; sl@0: TUint subCategory = (BTrace::TCategory)((TUint8*)data)[1]; sl@0: TUint type = aSelf->iTestType&0xff; sl@0: TBool bigTrace = aSelf->iTestType&RBTraceTest::EBigTrace; sl@0: TBool filter2Trace = aSelf->iTestType&RBTraceTest::EFilter2Trace; sl@0: sl@0: if(!filter2Trace) sl@0: { sl@0: if(type==BTrace::EPcPresent) sl@0: { sl@0: if(bigTrace) sl@0: { sl@0: BTracePcBig(category,subCategory,data[1],data+2,size-4); sl@0: BTracePcBig(category,subCategory,data[1],data+2,size-4); sl@0: } sl@0: else if(size==0) sl@0: { sl@0: BTracePc0(category,subCategory); sl@0: BTracePc0(category,subCategory); sl@0: } sl@0: else if(size<=4) sl@0: { sl@0: BTracePc4(category,subCategory,data[1]); sl@0: BTracePc4(category,subCategory,data[1]); sl@0: } sl@0: else if(size<=8) sl@0: { sl@0: BTracePc8(category,subCategory,data[1],data[2]); sl@0: BTracePc8(category,subCategory,data[1],data[2]); sl@0: } sl@0: else sl@0: { sl@0: BTracePcN(category,subCategory,data[1],data[2],data+3,size-8); sl@0: BTracePcN(category,subCategory,data[1],data[2],data+3,size-8); sl@0: } sl@0: } sl@0: else if(type==BTrace::EContextIdPresent) sl@0: { sl@0: if(bigTrace) sl@0: { sl@0: BTraceContextBig(category,subCategory,data[1],data+2,size-4); sl@0: BTraceContextBig(category,subCategory,data[1],data+2,size-4); sl@0: } sl@0: else if(size==0) sl@0: { sl@0: BTraceContext0(category,subCategory); sl@0: BTraceContext0(category,subCategory); sl@0: } sl@0: else if(size<=4) sl@0: { sl@0: BTraceContext4(category,subCategory,data[1]); sl@0: BTraceContext4(category,subCategory,data[1]); sl@0: } sl@0: else if(size<=8) sl@0: { sl@0: BTraceContext8(category,subCategory,data[1],data[2]); sl@0: BTraceContext8(category,subCategory,data[1],data[2]); sl@0: } sl@0: else sl@0: { sl@0: BTraceContextN(category,subCategory,data[1],data[2],data+3,size-8); sl@0: BTraceContextN(category,subCategory,data[1],data[2],data+3,size-8); sl@0: } sl@0: } sl@0: else if(type==BTrace::EContextIdPresent+BTrace::EPcPresent) sl@0: { sl@0: if(bigTrace) sl@0: { sl@0: BTraceContextPcBig(category,subCategory,data[1],data+2,size-4); sl@0: BTraceContextPcBig(category,subCategory,data[1],data+2,size-4); sl@0: } sl@0: else if(size==0) sl@0: { sl@0: BTraceContextPc0(category,subCategory); sl@0: BTraceContextPc0(category,subCategory); sl@0: } sl@0: else if(size<=4) sl@0: { sl@0: BTraceContextPc4(category,subCategory,data[1]); sl@0: BTraceContextPc4(category,subCategory,data[1]); sl@0: } sl@0: else if(size<=8) sl@0: { sl@0: BTraceContextPc8(category,subCategory,data[1],data[2]); sl@0: BTraceContextPc8(category,subCategory,data[1],data[2]); sl@0: } sl@0: else sl@0: { sl@0: BTraceContextPcN(category,subCategory,data[1],data[2],data+3,size-8); sl@0: BTraceContextPcN(category,subCategory,data[1],data[2],data+3,size-8); sl@0: } sl@0: } sl@0: else sl@0: { sl@0: if(bigTrace) sl@0: BTraceBig(category,subCategory,data[1],data+2,size-4); sl@0: else if(size==0) sl@0: BTrace0(category,subCategory); sl@0: else if(size<=4) sl@0: BTrace4(category,subCategory,data[1]); sl@0: else if(size<8) sl@0: BTrace8(category,subCategory,data[1],data[2]); sl@0: else sl@0: BTraceN(category,subCategory,data[1],data[2],data+3,size-8); sl@0: } sl@0: } sl@0: else sl@0: { sl@0: if(type==BTrace::EPcPresent) sl@0: { sl@0: if(bigTrace) sl@0: { sl@0: BTraceFilteredPcBig(category,subCategory,data[1],data+2,size-4); sl@0: BTraceFilteredPcBig(category,subCategory,data[1],data+2,size-4); sl@0: } sl@0: else if(size<4) sl@0: { sl@0: // invalid sl@0: } sl@0: else if(size==4) sl@0: { sl@0: BTraceFilteredPc4(category,subCategory,data[1]); sl@0: BTraceFilteredPc4(category,subCategory,data[1]); sl@0: } sl@0: else if(size<=8) sl@0: { sl@0: BTraceFilteredPc8(category,subCategory,data[1],data[2]); sl@0: BTraceFilteredPc8(category,subCategory,data[1],data[2]); sl@0: } sl@0: else sl@0: { sl@0: BTraceFilteredPcN(category,subCategory,data[1],data[2],data+3,size-8); sl@0: BTraceFilteredPcN(category,subCategory,data[1],data[2],data+3,size-8); sl@0: } sl@0: } sl@0: else if(type==BTrace::EContextIdPresent) sl@0: { sl@0: if(bigTrace) sl@0: { sl@0: BTraceFilteredContextBig(category,subCategory,data[1],data+2,size-4); sl@0: BTraceFilteredContextBig(category,subCategory,data[1],data+2,size-4); sl@0: } sl@0: else if(size<4) sl@0: { sl@0: // invalid sl@0: } sl@0: else if(size==4) sl@0: { sl@0: BTraceFilteredContext4(category,subCategory,data[1]); sl@0: BTraceFilteredContext4(category,subCategory,data[1]); sl@0: } sl@0: else if(size<=8) sl@0: { sl@0: BTraceFilteredContext8(category,subCategory,data[1],data[2]); sl@0: BTraceFilteredContext8(category,subCategory,data[1],data[2]); sl@0: } sl@0: else sl@0: { sl@0: BTraceFilteredContextN(category,subCategory,data[1],data[2],data+3,size-8); sl@0: BTraceFilteredContextN(category,subCategory,data[1],data[2],data+3,size-8); sl@0: } sl@0: } sl@0: else if(type==BTrace::EContextIdPresent+BTrace::EPcPresent) sl@0: { sl@0: if(bigTrace) sl@0: { sl@0: BTraceFilteredContextPcBig(category,subCategory,data[1],data+2,size-4); sl@0: BTraceFilteredContextPcBig(category,subCategory,data[1],data+2,size-4); sl@0: } sl@0: else if(size<4) sl@0: { sl@0: // invalid sl@0: } sl@0: else if(size==4) sl@0: { sl@0: BTraceFilteredContextPc4(category,subCategory,data[1]); sl@0: BTraceFilteredContextPc4(category,subCategory,data[1]); sl@0: } sl@0: else if(size<=8) sl@0: { sl@0: BTraceFilteredContextPc8(category,subCategory,data[1],data[2]); sl@0: BTraceFilteredContextPc8(category,subCategory,data[1],data[2]); sl@0: } sl@0: else sl@0: { sl@0: BTraceFilteredContextPcN(category,subCategory,data[1],data[2],data+3,size-8); sl@0: BTraceFilteredContextPcN(category,subCategory,data[1],data[2],data+3,size-8); sl@0: } sl@0: } sl@0: else sl@0: { sl@0: if(bigTrace) sl@0: BTraceFilteredBig(category,subCategory,data[1],data+2,size-4); sl@0: else if(size<4) sl@0: { sl@0: // invalid sl@0: } sl@0: else if(size==4) sl@0: BTraceFiltered4(category,subCategory,data[1]); sl@0: else if(size<8) sl@0: BTraceFiltered8(category,subCategory,data[1],data[2]); sl@0: else sl@0: BTraceFilteredN(category,subCategory,data[1],data[2],data+3,size-8); sl@0: } sl@0: } sl@0: __e32_atomic_store_rel32(&aSelf->iTimerExpired, 1); sl@0: } sl@0: sl@0: void DBTraceTestChannel::TestUTrace(DBTraceTestChannel* aSelf) sl@0: { sl@0: aSelf->iTimerExpired = ETrue; sl@0: TInt size = aSelf->iTestDataSize; sl@0: if(size<0) sl@0: return; sl@0: TUint32* data = aSelf->iTestData; sl@0: BTrace::TCategory category = (BTrace::TCategory)((TUint8*)data)[0]; sl@0: TUint subCategory = (BTrace::TCategory)((TUint8*)data)[1]; sl@0: sl@0: #define T_UTRACE_HEADER(aSize,aClassification,aContext,aPc) \ sl@0: ((((aSize) + (aContext?4:0) + (aPc?4:0)) << BTrace::ESizeIndex*8) \ sl@0: +(((aContext?BTrace::EContextIdPresent:0) | (aPc?BTrace::EPcPresent:0)) << BTrace::EFlagsIndex*8) \ sl@0: +((aClassification) << BTrace::ECategoryIndex*8) \ sl@0: +((subCategory) << BTrace::ESubCategoryIndex*8)) sl@0: sl@0: #define UTRACE_SECONDARY(aClassification,aModuleUid,aThreadIdPresent,aPcPresent,aPc,aFormatId) \ sl@0: BTrace::OutFilteredPcFormatBig(T_UTRACE_HEADER(8,aClassification,aThreadIdPresent,aPcPresent),(TUint32)(aModuleUid),aPc,aFormatId,0,0) sl@0: sl@0: #define UTRACE_SECONDARY_4(aClassification,aModuleUid,aThreadIdPresent,aPcPresent,aPc,aFormatId, aData1) \ sl@0: BTrace::OutFilteredPcFormatBig(T_UTRACE_HEADER(8,aClassification,aThreadIdPresent,aPcPresent),(TUint32)(aModuleUid),aPc,aFormatId,&aData1,4) sl@0: sl@0: #define UTRACE_SECONDARY_ANY(aClassification, aModuleUid, aThreadIdPresent, aPcPresent, aPc, aFormatId, aData, aDataSize) \ sl@0: BTrace::OutFilteredPcFormatBig(T_UTRACE_HEADER(8,aClassification,aThreadIdPresent,aPcPresent),(TUint32)(aModuleUid),aPc,aFormatId,aData,(TInt)(aDataSize)) sl@0: sl@0: sl@0: TUint32 KUtracePcValues[3]={0, 0x123456, 0x987654}; sl@0: TUint16 formatId = (TUint16)data[2]; sl@0: TUint type = aSelf->iTestType&0xff; sl@0: if(type == BTrace::EPcPresent) sl@0: { sl@0: if(size <= 0) sl@0: { sl@0: UTRACE_SECONDARY(category, data[1], EFalse, ETrue, KUtracePcValues[1], formatId); sl@0: UTRACE_SECONDARY(category, data[1], EFalse, ETrue, KUtracePcValues[2], formatId); sl@0: } sl@0: else if(size <= 4) sl@0: { sl@0: UTRACE_SECONDARY_4(category, data[1], EFalse, ETrue, KUtracePcValues[1], formatId, data[3]); sl@0: UTRACE_SECONDARY_4(category, data[1], EFalse, ETrue, KUtracePcValues[2], formatId, data[3]); sl@0: } sl@0: else //size > 8 sl@0: { sl@0: UTRACE_SECONDARY_ANY(category, data[1], EFalse, ETrue, KUtracePcValues[1], formatId, data+3, size); sl@0: UTRACE_SECONDARY_ANY(category, data[1], EFalse, ETrue, KUtracePcValues[2], formatId, data+3, size); sl@0: } sl@0: } sl@0: else if(type==BTrace::EContextIdPresent) sl@0: { sl@0: if(size <= 0) sl@0: { sl@0: UTRACE_SECONDARY(category, data[1], ETrue, EFalse, KUtracePcValues[1], formatId); sl@0: UTRACE_SECONDARY(category, data[1], ETrue, EFalse, KUtracePcValues[2], formatId); sl@0: } sl@0: else if(size <= 4) sl@0: { sl@0: UTRACE_SECONDARY_4(category, data[1], ETrue, EFalse, KUtracePcValues[1], formatId, data[3]); sl@0: UTRACE_SECONDARY_4(category, data[1], ETrue, EFalse, KUtracePcValues[2], formatId, data[3]); sl@0: } sl@0: else //size > 8 sl@0: { sl@0: UTRACE_SECONDARY_ANY(category, data[1], ETrue, EFalse, KUtracePcValues[1], formatId, data+3, size); sl@0: UTRACE_SECONDARY_ANY(category, data[1], ETrue, EFalse, KUtracePcValues[2], formatId, data+3, size); sl@0: } sl@0: } sl@0: else if(type==BTrace::EContextIdPresent+BTrace::EPcPresent) sl@0: { sl@0: if(size <= 0) sl@0: { sl@0: UTRACE_SECONDARY(category, data[1], ETrue, ETrue, KUtracePcValues[1], formatId); sl@0: UTRACE_SECONDARY(category, data[1], ETrue, ETrue, KUtracePcValues[2], formatId); sl@0: } sl@0: else if(size <= 4) sl@0: { sl@0: UTRACE_SECONDARY_4(category, data[1], ETrue, ETrue, KUtracePcValues[1], formatId, data[3]); sl@0: UTRACE_SECONDARY_4(category, data[1], ETrue, ETrue, KUtracePcValues[2], formatId, data[3]); sl@0: } sl@0: else //size > 8 sl@0: { sl@0: UTRACE_SECONDARY_ANY(category, data[1], ETrue, ETrue, KUtracePcValues[1], formatId, data+3, size); sl@0: UTRACE_SECONDARY_ANY(category, data[1], ETrue, ETrue, KUtracePcValues[2], formatId, data+3, size); sl@0: } sl@0: } sl@0: else sl@0: { sl@0: if(size <= 0) sl@0: { sl@0: UTRACE_SECONDARY(category, data[1], EFalse, EFalse, KUtracePcValues[1], formatId); sl@0: UTRACE_SECONDARY(category, data[1], EFalse, EFalse, KUtracePcValues[2], formatId); sl@0: } sl@0: else if(size <= 4) sl@0: { sl@0: UTRACE_SECONDARY_4(category, data[1], EFalse, EFalse, KUtracePcValues[1], formatId, data[3]); sl@0: UTRACE_SECONDARY_4(category, data[1], EFalse, EFalse, KUtracePcValues[2], formatId, data[3]); sl@0: } sl@0: else //size > 8 sl@0: { sl@0: UTRACE_SECONDARY_ANY(category, data[1], EFalse, EFalse, KUtracePcValues[1], formatId, data+3, size); sl@0: UTRACE_SECONDARY_ANY(category, data[1], EFalse, EFalse, KUtracePcValues[2], formatId, data+3, size); sl@0: } sl@0: } sl@0: sl@0: } sl@0: sl@0: DECLARE_STANDARD_LDD() sl@0: { sl@0: return new DBTraceTestFactory; sl@0: } sl@0: sl@0: