# HG changeset patch # User Tom Sutcliffe # Date 1280507921 -3600 # Node ID 30834c0f31791402912456cf199620b911622745 # Parent 7b569e2061c7c8cd89d0efdeca2562d44b47a110 Fixes for SMP platforms diff -r 7b569e2061c7 -r 30834c0f3179 commands/play/play.cif --- a/commands/play/play.cif Fri Jul 30 14:53:31 2010 +0100 +++ b/commands/play/play.cif Fri Jul 30 17:38:41 2010 +0100 @@ -26,7 +26,7 @@ ==option int f preference -Sepcifies the audio priority preferense for playback. +Sepcifies the audio priority preference for playback. ==option int V volume diff -r 7b569e2061c7 -r 30834c0f3179 libraries/extrabtrace/group/extrabtracek.mmp --- a/libraries/extrabtrace/group/extrabtracek.mmp Fri Jul 30 14:53:31 2010 +0100 +++ b/libraries/extrabtrace/group/extrabtracek.mmp Fri Jul 30 17:38:41 2010 +0100 @@ -25,17 +25,20 @@ sourcepath ..\src -#if defined(MARM) - #ifdef GCCE - // Workaround for the gcce makmake module doing weird things with -S when compiling .cia files - // And for GCCE.h's definition of __NAKED__ being wrong - source usampler_cia.cpp - #else - source usampler.cia +#ifndef SMP // Sampler not supported on smp + #if defined(MARM) + #ifdef GCCE + // Workaround for the gcce makmake module doing weird things with -S when compiling .cia files + // And for GCCE.h's definition of __NAKED__ being wrong + source usampler_cia.cpp + #else + source usampler.cia + #endif #endif +source sampler.cpp #endif -source extrabtracek.cpp sampler.cpp +source extrabtracek.cpp source eventhandler.cpp start wins diff -r 7b569e2061c7 -r 30834c0f3179 libraries/extrabtrace/inc/extrabtracek.h --- a/libraries/extrabtrace/inc/extrabtracek.h Fri Jul 30 14:53:31 2010 +0100 +++ b/libraries/extrabtrace/inc/extrabtracek.h Fri Jul 30 17:38:41 2010 +0100 @@ -46,7 +46,9 @@ void MExtraBtrace_Close(); public: +#ifndef __SMP__ DCpuSampler* iSampler; +#endif DExtraBtraceEventHandler* iEventHandler; }; 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;