diff -r 7b569e2061c7 -r 30834c0f3179 libraries/extrabtrace/src/extrabtracek.cpp --- a/libraries/extrabtrace/src/extrabtracek.cpp Fri Jul 30 14:53:31 2010 +0100 +++ b/libraries/extrabtrace/src/extrabtracek.cpp Fri Jul 30 17:38:41 2010 +0100 @@ -14,7 +14,9 @@ #include #include "common.h" +#ifndef __SMP__ #include "sampler.h" +#endif #include "eventhandler.h" class DExtraBTraceChannel : public DLogicalChannelBase @@ -38,8 +40,10 @@ err = Open(); if (err) return err; +#ifndef __SMP__ iSampler = new DCpuSampler(); if (!iSampler) err = KErrNoMemory; +#endif if (!err) iEventHandler = new DExtraBtraceEventHandler(this); if (!iEventHandler) err = KErrNoMemory; @@ -72,18 +76,24 @@ DExtraBTraceFactory::~DExtraBTraceFactory() { +#ifndef __SMP__ delete iSampler; +#endif delete iEventHandler; } void DExtraBTraceFactory::SetCpuUsageSampling(MExtraBtrace::TCpuUsageCallback aCallbackFn) { +#ifndef __SMP__ iSampler->SetCpuUsageSampling(aCallbackFn); +#endif } void DExtraBTraceFactory::SetProfilingSampling(TBool aEnabled) { +#ifndef __SMP__ iSampler->SetProfilingSampling(aEnabled); +#endif } TAny* DExtraBTraceFactory::GetVersion(TInt /*aVersion*/) @@ -111,10 +121,12 @@ return KErrNone; } +#ifndef __SMP__ DCpuSampler* DExtraBTraceChannel::Sampler() { return static_cast(iDevice)->iSampler; } +#endif TInt DExtraBTraceChannel::RequestUserHandle(DThread* /*aThread*/, TOwnerType /*aType*/) { @@ -129,6 +141,9 @@ { case EControlEnableProfiling: { +#ifdef __SMP__ + return KErrNotSupported; +#else TInt enable = (a1 == 0) ? 0 : 1; // We still ignore the rate, currently TInt err = BTrace::SetFilter(BTrace::EProfiling, enable); if (err >= 0) @@ -136,6 +151,7 @@ Sampler()->SetProfilingSampling(enable); } return err; +#endif } default: return KErrNotSupported;