# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1286974858 -10800 # Node ID 5c40347c6f16a7aad241f953f6d2515d2a4d829f # Parent 1bc91eb0b8ae9e6690b2d9ffe589455f34af6d71 Revision: 201029 Kit: 201041 diff -r 1bc91eb0b8ae -r 5c40347c6f16 fbs/fontandbitmapserver/group/FBSCLI.MMP --- a/fbs/fontandbitmapserver/group/FBSCLI.MMP Wed Sep 15 13:39:03 2010 +0300 +++ b/fbs/fontandbitmapserver/group/FBSCLI.MMP Wed Oct 13 16:00:58 2010 +0300 @@ -28,7 +28,6 @@ SOURCEPATH ../sfbs userinclude ../inc -userinclude ../traces_FBSCLI OS_LAYER_SYSTEMINCLUDE_SYMBIAN diff -r 1bc91eb0b8ae -r 5c40347c6f16 fbs/fontandbitmapserver/group/FBSERV.MMP --- a/fbs/fontandbitmapserver/group/FBSERV.MMP Wed Sep 15 13:39:03 2010 +0300 +++ b/fbs/fontandbitmapserver/group/FBSERV.MMP Wed Oct 13 16:00:58 2010 +0300 @@ -35,7 +35,6 @@ userinclude ../inc userinclude ../sfbs -userinclude ../traces_FBSERV OS_LAYER_SYSTEMINCLUDE_SYMBIAN OS_LAYER_ESTLIB_SYSTEMINCLUDE diff -r 1bc91eb0b8ae -r 5c40347c6f16 fbs/fontandbitmapserver/inc/FBS.H --- a/fbs/fontandbitmapserver/inc/FBS.H Wed Sep 15 13:39:03 2010 +0300 +++ b/fbs/fontandbitmapserver/inc/FBS.H Wed Oct 13 16:00:58 2010 +0300 @@ -338,8 +338,6 @@ TInt DoLoadFromRom(TUint32* aRomPointer, TInt32 aId, TUint aFileOffset, TBool& aRomPointerValid); TBool LoadShiftedRomBmpL(const TDesC& aFileName,TInt32 aId,TUint aFileOffset); static void DoStoreL(CDirectFileStore* aFileStore,CFbsBitmap* aBitmap,TInt aNumSources,const TDesC* aSources[],TInt32 aSourceIds[]); - TInt DuplicateInRom(TInt aBitmapHandle); - TInt DuplicateInRam(TInt aBitmapHandle); protected: /** WARNING: For internal use ONLY. Compatibility is not guaranteed in future releases. */ diff -r 1bc91eb0b8ae -r 5c40347c6f16 fbs/fontandbitmapserver/sfbs/FBSBMP.CPP --- a/fbs/fontandbitmapserver/sfbs/FBSBMP.CPP Wed Sep 15 13:39:03 2010 +0300 +++ b/fbs/fontandbitmapserver/sfbs/FBSBMP.CPP Wed Oct 13 16:00:58 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 1995-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -25,11 +25,6 @@ #include "BitwiseBitmap.inl" #include "fbsmessage.h" #include "bitmapconst.h" -#include "OstTraceDefinitions.h" -#include "fbstrace.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "FBSBMPTraces.h" -#endif const TInt KMaxPixelSize = KMaxTInt / 4; // Maximum pixel size to avoid some overflow problems const TInt KMaxBitmapHandleBufferSize = KNumBytesPerBitmapHandle * 2000; // Maximum size of buffer to store all bitmap handles. @@ -100,8 +95,6 @@ */ EXPORT_C void CFbsBitmap::Reset() { - FBS_OST(TInt ssh = (iFbs ? iFbs->ServerSessionHandle() : 0);) - FBS_OST(OstTraceExt4( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_RESET_ENTRY, "> this=0x%08x; iH=0x%08x; iSH=0x%08x; iSSH=0x%08x", (TUint)this, iHandle, iServerHandle, ssh );) if (iHandle && !(iFlags & EIsRomBitmap)) { iFbs->SendCommand(EFbsMessClose, iHandle, Handle()); @@ -121,7 +114,6 @@ iUseCount = 0; iHandle = 0; iServerHandle = 0; - FBS_OST(OstTrace1( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_RESET_EXIT, "< this=0x%08x", (TUint)this );) } /** Tests whether or not the bitmap is read-only. @@ -262,11 +254,7 @@ */ EXPORT_C TInt CFbsBitmap::Create(const TSize& aSizeInPixels,TDisplayMode aDispMode) { - FBS_OST(OstTraceExt4(GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_CREATE_ENTRY, "> this=0x%08x; w=%d; h=%d; dm=%d", (TUint)this, aSizeInPixels.iWidth, aSizeInPixels.iHeight, aDispMode); ) - TInt err = DoCreate(aSizeInPixels,aDispMode,KUidCFbsBitmapCreation); - FBS_OST(TInt ssh = (iFbs ? iFbs->ServerSessionHandle() : 0);) - FBS_OST(OstTraceExt5(GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_CREATE_EXIT, "< this=0x%08x; err=%d; iH=0x%08x; iSH=0x%08x; iSSH=0x%08x", (TUint)this, err, iHandle, iServerHandle, ssh); ) - return err; + return DoCreate(aSizeInPixels,aDispMode,KUidCFbsBitmapCreation); } TInt CFbsBitmap::DoCreate(const TSize& aSizeInPixels, TDisplayMode aDispMode, TUid aUid, TInt aDataSize) @@ -317,11 +305,7 @@ */ EXPORT_C TInt CFbsBitmap::CreateHardwareBitmap(const TSize& aSizeInPixels,TDisplayMode aDispMode,TUid aCreatorUid) { - FBS_OST(OstTraceExt5( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_CREATEHARDWAREBITMAP_ENTRY, "> this=0x%08x; w=%d; h=%d; dm=%d; uid=0x%08x", (TUint)this, aSizeInPixels.iWidth, aSizeInPixels.iHeight, aDispMode, aCreatorUid.iUid);) - TInt err = DoCreate(aSizeInPixels,aDispMode,aCreatorUid); - FBS_OST(TInt ssh = (iFbs ? iFbs->ServerSessionHandle() : 0);) - FBS_OST(OstTraceExt5( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_CREATEHARDWAREBITMAP_EXIT, "< this=0x%08x; err=%d; iH=0x%08x; iSH=0x%08x; iSSH=0x%08x", (TUint)this, err, iHandle, iServerHandle, ssh);) - return err; + return DoCreate(aSizeInPixels,aDispMode,aCreatorUid); } /** Resets the pixel-size of the bitmap. @@ -422,105 +406,53 @@ @released @see CFbsBitmap::Handle() */ -EXPORT_C TInt CFbsBitmap::Duplicate(TInt aBitmapHandle) - { - TInt ret = KErrNone; - FBS_OST(OstTraceExt2( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_DUPLICATE_ENTRY, "> this=0x%08x; iH=0x%08x;", (TUint)this, aBitmapHandle);) +EXPORT_C TInt CFbsBitmap::Duplicate(TInt aBitmapHandle) + { if(!iFbs) { - ret = KErrCouldNotConnect; - FBS_OST(OstTrace1( TRACE_ERROR, CFBSBITMAP_DUPLICATE_ERROR, "! this=0x%08x; !iFbs", (TUint)this);) + return(KErrCouldNotConnect); + } + if(!aBitmapHandle) + { + return(KErrUnknown); } - else if(!aBitmapHandle) + Reset(); + TBool isinrom=EFalse; + TInt ret=User::IsRomAddress(isinrom,(TAny*)aBitmapHandle); + if(ret!=KErrNone) { - ret = KErrUnknown; - FBS_OST(OstTrace1( TRACE_ERROR, CFBSBITMAP_DUPLICATE_ERROR2, "! this=0x%08x; !aBitmapHandle", (TUint)this);) + return(KErrUnknown); + } + if(isinrom) + { + if (((CBitwiseBitmap*)aBitmapHandle)->Uid() != KCBitwiseBitmapUid) + return(KErrUnknown); + iAddressPointer = (CBitwiseBitmap*)aBitmapHandle; + iFlags = EIsRomBitmap; + iHandle=1; + return iFbs->AllocScanLineBuffer(iAddressPointer->iByteWidth + 4); } - else - { - TBool isinrom = EFalse; - ret = User::IsRomAddress(isinrom, (TAny*)aBitmapHandle); - if (ret == KErrNone) - { - if (isinrom) - { - ret = DuplicateInRom(aBitmapHandle); - FBS_OST_IF(ret != KErrNone, OstTraceExt2( TRACE_ERROR, CFBSBITMAP_DUPLICATE_ERROR4, "! this=0x%08x; DuplicateInRom() returned %d;", (TUint)this, ret);) - } - else - { - ret = DuplicateInRam(aBitmapHandle); - FBS_OST_IF(ret != KErrNone, OstTraceExt2( TRACE_ERROR, CFBSBITMAP_DUPLICATE_ERROR5, "! this=0x%08x; DuplicateInRam() returned %d;", (TUint)this, ret);) - } - } - else - { - FBS_OST(OstTraceExt2( TRACE_ERROR, CFBSBITMAP_DUPLICATE_ERROR3, "! this=0x%08x; IsRomAddress() returned %d", (TUint)this, ret);) - ret = KErrUnknown; - } - } - FBS_OST(TInt ssh = (iFbs ? iFbs->ServerSessionHandle() : 0);) - FBS_OST(OstTraceExt5( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_DUPLICATE_EXIT, "< this=0x%08x; iH=0x%08x; iSH=0x%08x; ret=%d; iSSH=0x%08x", (TUint)this, iHandle, iServerHandle, ret, ssh);) - return ret; - } - -/** Duplicates a bitmap where the bitmap handle refers to a rom bitmap. -@param aBitmapHandle A valid Rom bitmap handle. -@return KErrNone on success. - */ -TInt CFbsBitmap::DuplicateInRom(TInt aBitmapHandle) - { - TInt ret = KErrNone; - Reset(); - TUid uid = ((CBitwiseBitmap*)aBitmapHandle)->Uid(); - if (uid != KCBitwiseBitmapUid) - { - FBS_OST(OstTraceExt2( TRACE_ERROR, CFBSBITMAP_DUPLICATEINROM_ERROR, "! this=0x%08x; 0x%08x != KCBitwiseBitmapUid", (TUint)this, (TUint)uid.iUid);) - ret = KErrUnknown; - } - else - { - iAddressPointer = (CBitwiseBitmap*)aBitmapHandle; - iFlags = EIsRomBitmap; - iHandle=1; - ret = iFbs->AllocScanLineBuffer(iAddressPointer->iByteWidth + 4); - FBS_OST_IF(ret!=KErrNone, OstTraceExt2( TRACE_ERROR, CFBSBITMAP_DUPLICATEINROM_ERROR2, "! this=0x%08x; AllocScanLineBuffer() returned %d", (TUint)this, ret);) - } - return ret; - } - -/** Duplicates a bitmap where the bitmap handle refers to a ram bitmap -@param aBitmapHandle A valid Ram bitmap handle. -@return KErrNone on success. - */ -TInt CFbsBitmap::DuplicateInRam(TInt aBitmapHandle) - { - TInt ret = KErrNone; - Reset(); - - TPckgBuf b; - TIpcArgs args(aBitmapHandle,&b); - ret=iFbs->SendCommand(EFbsMessBitmapDuplicate,args); - FBS_OST_IF(ret!=KErrNone, OstTraceExt2( TRACE_ERROR, CFBSBITMAP_DUPLICATEINRAM_ERROR, "! this=0x%08x; SendCommand(EFbsMessBitmapDuplicate) returned %d", (TUint)this, ret);) - if(ret==KErrNone) - { - iHandle=b().iHandle; - iServerHandle=b().iServerHandle; - iAddressPointer=(CBitwiseBitmap*)(iFbs->HeapBase()+b().iAddressOffset); - if (iAddressPointer->iUid.iUid != KCBitwiseBitmapUid.iUid && iAddressPointer->iUid.iUid != KCBitwiseBitmapHardwareUid.iUid) - { - iFlags = EIsExtendedBitmap; - } - ret = iFbs->iHelper->AddBitmap(*this); - FBS_OST_IF(ret!=KErrNone, OstTraceExt2( TRACE_ERROR, CFBSBITMAP_DUPLICATEINRAM_ERROR2, "! this=0x%08x; AddBitmap() returned %d", (TUint)this, ret);) - if (ret == KErrNone) - { - ret = iFbs->AllocScanLineBuffer(iAddressPointer->iByteWidth+4); - FBS_OST_IF(ret!=KErrNone, OstTraceExt2( TRACE_ERROR, CFBSBITMAP_DUPLICATEINRAM_ERROR3, "! this=0x%08x; AllocScanLineBuffer() returned %d", (TUint)this, ret);) - } - } - return ret; - } + TPckgBuf b; + TIpcArgs args(aBitmapHandle,&b); + ret=iFbs->SendCommand(EFbsMessBitmapDuplicate,args); + if(ret!=KErrNone) + { + return(ret); + } + iHandle=b().iHandle; + iServerHandle=b().iServerHandle; + iAddressPointer=(CBitwiseBitmap*)(iFbs->HeapBase()+b().iAddressOffset); + if (iAddressPointer->iUid.iUid != KCBitwiseBitmapUid.iUid && iAddressPointer->iUid.iUid != KCBitwiseBitmapHardwareUid.iUid) + { + iFlags = EIsExtendedBitmap; + } + ret = iFbs->iHelper->AddBitmap(*this); + if (ret != KErrNone) + { + return ret; + } + return iFbs->AllocScanLineBuffer(iAddressPointer->iByteWidth+4); + } /** Loads a specific bitmap from a multi-bitmap file. The bitmap may be shared by other font and bitmap server clients. @@ -535,10 +467,7 @@ */ EXPORT_C TInt CFbsBitmap::Load(const TDesC& aFileName,TInt32 aId,TBool aShareIfLoaded) { - FBS_OST(OstTraceExt4( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_LOAD_ENTRY, "> this=0x%08x; file=%S, id=0x%08x; share=%d", (TUint)this, aFileName, aId, aShareIfLoaded);) - TInt err = Load(aFileName,aId,aShareIfLoaded,0); - FBS_OST(OstTraceExt4( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_LOAD_EXIT, "< this=0x%08x; err=%d; iH=0x%08x; iSH=0x%08x", (TUint)this, err, iHandle, iServerHandle);) - return err; + return Load(aFileName,aId,aShareIfLoaded,0); } /** Loads a specific bitmap from a multi-bitmap file. @@ -554,45 +483,38 @@ */ EXPORT_C TInt CFbsBitmap::Load(const TDesC& aFileName,TInt32 aId,TBool aShareIfLoaded,TUint aFileOffset) { - TInt err = KErrNone; - FBS_OST(OstTraceExt5( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_LOAD2_ENTRY, "> this=0x%08x; file=%S, id=0x%08x; share=%d; off=%d", (TUint)this, aFileName, aId, aShareIfLoaded, aFileOffset);) if(!iFbs) { - FBS_OST(OstTrace1( TRACE_ERROR, CFBSBITMAP_LOAD2_ERROR, "! this=0x%08x; !iFbs", (TUint)this);) - err = KErrCouldNotConnect; + return(KErrCouldNotConnect); + } + Reset(); + TUint32* rompointer = NULL; + //access using filename has the advantage of using rom address lookup cache + IsFileInRom(aFileName, rompointer); + TBool romPointerValid; + TInt err = DoLoadFromRom(rompointer, aId, aFileOffset, romPointerValid); + if(romPointerValid) + { + return err; + } + _LIT(KResourcePath, "?:\\Resource\\*"); + TInt match = aFileName.MatchF(KResourcePath); + //if the file is in the resource directory we don't need to check capabilities and the file can just be opened on the server side. + if (match == 0) + { + err = DoLoad(aFileName,aId,aShareIfLoaded,aFileOffset); } else - { - Reset(); - TUint32* rompointer = NULL; - //access using filename has the advantage of using rom address lookup cache - IsFileInRom(aFileName, rompointer); - TBool romPointerValid; - err = DoLoadFromRom(rompointer, aId, aFileOffset, romPointerValid); - if(!romPointerValid) - { - _LIT(KResourcePath, "?:\\Resource\\*"); - TInt match = aFileName.MatchF(KResourcePath); - //if the file is in the resource directory we don't need to check capabilities and the file can just be opened on the server side. - if (match == 0) - { - err = DoLoad(aFileName,aId,aShareIfLoaded,aFileOffset); - FBS_OST_IF(err!=KErrNone, OstTraceExt2( TRACE_ERROR, CFBSBITMAP_LOAD2_ERROR3, "! this=0x%08x; DoLoad returned %d", (TUint)this, err);) - } - else - { - RFile file; - err = file.Open(iFbs->FileServer(),aFileName,EFileShareReadersOnly); - if (err==KErrNone) - { - err = DoLoad(file,aId,aShareIfLoaded,aFileOffset); - FBS_OST_IF(err!=KErrNone, OstTraceExt2( TRACE_ERROR, CFBSBITMAP_LOAD2_ERROR4, "! this=0x%08x; DoLoad returned %d", (TUint)this, err);) - } - file.Close(); - } - } - } - FBS_OST(OstTraceExt4( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_LOAD2_EXIT, "< this=0x%08x; err=%d; iH=0x%08x; iSH=0x%08x", (TUint)this, err, iHandle, iServerHandle);) + { + RFile file; + err = file.Open(iFbs->FileServer(),aFileName,EFileShareReadersOnly); + if (err!=KErrNone) + { + return err; + } + err = DoLoad(file,aId,aShareIfLoaded,aFileOffset); + file.Close(); + } return err; } @@ -610,10 +532,7 @@ */ EXPORT_C TInt CFbsBitmap::LoadAndCompress(const TDesC& aFileName,TInt32 aId,TBool aShareIfLoaded) { - FBS_OST(OstTraceExt4( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_LOADANDCOMPRESS_ENTRY, "> this=0x%08x; file=%S; id=0x%08x; share=%d", (TUint)this, aFileName, aId, aShareIfLoaded);) - TInt ret = LoadAndCompress(aFileName, aId, aShareIfLoaded, 0); - FBS_OST(OstTraceExt4( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_LOADANDCOMPRESS_EXIT, "< this=0x%08x; err=%d; iH=0x%08x; iSH=0x%08x", (TUint)this, ret, iHandle, iServerHandle);) - return ret; + return LoadAndCompress(aFileName, aId, aShareIfLoaded, 0); } /** Loads and compresses a specific bitmap from a multi-bitmap file. @@ -630,15 +549,12 @@ @released */ EXPORT_C TInt CFbsBitmap::LoadAndCompress(const TDesC& aFileName,TInt32 aId,TBool aShareIfLoaded,TUint aFileOffset) - { - FBS_OST(OstTraceExt5( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_LOADANDCOMPRESS2_ENTRY, "> this=0x%08x; file=%S, id=0x%08x; share=%d; off=%d", (TUint)this, aFileName, aId, aShareIfLoaded, aFileOffset);) + { TInt err = Load(aFileName,aId,aShareIfLoaded,aFileOffset); if (err == KErrNone) { err = !(iFlags & EIsRomBitmap) ? Compress() : KErrAccessDenied; - FBS_OST_IF(err!=KErrNone, OstTraceExt3( TRACE_ERROR, CFBSBITMAP_LOADANDCOMPRESS2_ERROR, "! this=0x%08x; iFlags=0x%08x; err=%d", (TUint)this, (TUint)iFlags, err);) } - FBS_OST(OstTraceExt4( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_LOADANDCOMPRESS2_EXIT, "< this=0x%08x; err=%d; iH=0x%08x; iSH=0x%08x", (TUint)this, err, iHandle, iServerHandle);) return err; } @@ -1235,7 +1151,7 @@ CBitwiseBitmap* bitmap = CleanAddress(); if (bitmap==NULL) { - return EFalse; + return EFalse; } return bitmap->IsCompressedInRAM(); } @@ -1334,16 +1250,10 @@ */ EXPORT_C void CFbsBitmap::BeginDataAccess() const { - FBS_OST_VERBOSE(OstTrace1(GRAPHICS_CONTROL_FUNCTIONS, CFBSBITMAP_BEGINDATAACCESS_ENTRY, "> this=0x%08x;", (TUint)this);); - FBS_OST_IF(!iHandle, OstTrace1(TRACE_ERROR, CFBSBITMAP_BEGINDATAACCESS_ERROR, "! this=0x%08x; !iHandle", (TUint)this);); - - if (iHandle) - { - (void)CleanAddress(); //called for side-effect to make sure bitmap reference is current. Should be low overhead. - const_cast(this)->iUseCount++; - } - - FBS_OST_VERBOSE(OstTraceExt2(GRAPHICS_CONTROL_FUNCTIONS, CFBSBITMAP_BEGINDATAACCESS_EXIT, "< this=0x%08x; iUseCount=%d;", (TUint)this, const_cast(this)->iUseCount);) + if (!iHandle) + return; + (void)CleanAddress(); //called for side-effect to make sure bitmap reference is current. Should be low overhead. + const_cast(this)->iUseCount++; } /** Marks the end of direct access to the bitmap data. @@ -1361,17 +1271,11 @@ */ EXPORT_C void CFbsBitmap::EndDataAccess(TBool aReadOnly) const { - FBS_OST_VERBOSE(OstTraceExt2(GRAPHICS_CONTROL_FUNCTIONS, CFBSBITMAP_ENDDATAACCESS_ENTRY, "> this=0x%08x; aReadOnly=%d;", (TUint)this, (TUint)aReadOnly);) - FBS_OST_IF(!iHandle, OstTrace1(TRACE_ERROR, CFBSBITMAP_ENDDATAACCESS_ERROR, "! this=0x%08x; !iHandle", (TUint)this);); - if (iHandle) - { - const_cast(this)->iUseCount--; - if (!aReadOnly && !(iFlags & EIsReadOnlyBitmapMask)) - { - User::LockedInc(iAddressPointer->Extra()->iTouchCount); - } - } - FBS_OST_VERBOSE(OstTraceExt2(GRAPHICS_CONTROL_FUNCTIONS, CFBSBITMAP_ENDDATAACCESS_EXIT, "< this=0x%08x; iUseCount=%d;", (TUint)this, const_cast(this)->iUseCount);) + if (!iHandle) + return; + const_cast(this)->iUseCount--; + if (!aReadOnly && !(iFlags & EIsReadOnlyBitmapMask)) + User::LockedInc(iAddressPointer->Extra()->iTouchCount); } /** Locks the global bitmap heap. @@ -1395,12 +1299,12 @@ */ EXPORT_C void CFbsBitmap::LockHeap(TBool /*aAlways*/) const { - FBS_OST(OstTrace1(GRAPHICS_CONTROL_FUNCTIONS, CFBSBITMAP_LOCKHEAP_ENTRY, "> this=0x%08x;", (TUint)this);) BeginDataAccess(); #ifdef SYMBIAN_DEBUG_FBS_LOCKHEAP //These debug checks now refer to the cleaned data address - FBS_OST_IF(!iHandle, OstTrace1(TRACE_ERROR, CFBSBITMAP_LOCKHEAP_ERROR, "! this=0x%08x; !iHandle", (TUint)this);); - if (iHandle && !(iFlags & EIsRomBitmap)) // can't do anything with ROM bitmaps + if (!iHandle) + return; + if (!(iFlags & EIsRomBitmap)) // can't do anything with ROM bitmaps { TThreadId threadId = RThread().Id(); iFbs->iHelper->iDebugMutex.Wait(); @@ -1414,7 +1318,6 @@ iFbs->iHelper->iDebugMutex.Signal(); } #endif - FBS_OST(OstTrace1(GRAPHICS_CONTROL_FUNCTIONS, CFBSBITMAP_LOCKHEAP_EXIT, "< this=0x%08x;", (TUint)this);) } /** Unlocks the global heap. @@ -1429,25 +1332,21 @@ */ EXPORT_C void CFbsBitmap::UnlockHeap(TBool /*aAlways*/) const { - FBS_OST(OstTrace1(GRAPHICS_CONTROL_FUNCTIONS, CFBSBITMAP_UNLOCKHEAP_ENTRY, "> this=0x%08x;", (TUint)this);) - FBS_OST_IF(!iHandle, OstTrace1(TRACE_ERROR, CFBSBITMAP_UNLOCKHEAP_ERROR, "! this=0x%08x; !iHandle", (TUint)this);); - if (iHandle) - { #ifdef SYMBIAN_DEBUG_FBS_LOCKHEAP - if (!(iFlags & EIsRomBitmap)) // can't do anything with ROM bitmaps - { - TThreadId threadId = RThread().Id(); - iFbs->iHelper->iDebugMutex.Wait(); - __ASSERT_ALWAYS(iAddressPointer->Extra()->iLockCount > 0, Panic(EFbsPanicBadHeapLock)); - __ASSERT_ALWAYS(iAddressPointer->Extra()->iThreadId == threadId, Panic(EFbsPanicBadHeapLock)); - if (--iAddressPointer->Extra()->iLockCount == 0) - iAddressPointer->Extra()->iThreadId = TThreadId(KNullThreadId); - iFbs->iHelper->iDebugMutex.Signal(); - } + if (!iHandle) + return; + if (!(iFlags & EIsRomBitmap)) // can't do anything with ROM bitmaps + { + TThreadId threadId = RThread().Id(); + iFbs->iHelper->iDebugMutex.Wait(); + __ASSERT_ALWAYS(iAddressPointer->Extra()->iLockCount > 0, Panic(EFbsPanicBadHeapLock)); + __ASSERT_ALWAYS(iAddressPointer->Extra()->iThreadId == threadId, Panic(EFbsPanicBadHeapLock)); + if (--iAddressPointer->Extra()->iLockCount == 0) + iAddressPointer->Extra()->iThreadId = TThreadId(KNullThreadId); + iFbs->iHelper->iDebugMutex.Signal(); + } #endif - EndDataAccess(); - } - FBS_OST(OstTrace1(GRAPHICS_CONTROL_FUNCTIONS, CFBSBITMAP_UNLOCKHEAP_EXIT, "< this=0x%08x;", (TUint)this);) + EndDataAccess(); } /** Locks the global bitmap heap, leaving on the clean-up stack a pointer @@ -1463,18 +1362,14 @@ */ EXPORT_C void CFbsBitmap::LockHeapLC(TBool /*aAlways*/) const { - FBS_OST(OstTrace1(GRAPHICS_CONTROL_FUNCTIONS, CFBSBITMAP_LOCKHEAPLC_ENTRY, "> this=0x%08x;", (TUint)this);) - LockHeap(); + LockHeap(); TCleanupItem cleanitem(CFbsBitmap::UnlockHeap, (TAny*)this); CleanupStack::PushL(cleanitem); - FBS_OST(OstTrace1(GRAPHICS_CONTROL_FUNCTIONS, CFBSBITMAP_LOCKHEAPLC_EXIT, "< this=0x%08x;", (TUint)this);) } EXPORT_C void CFbsBitmap::UnlockHeap(TAny* aFbsBitmap) { - FBS_OST(OstTrace1(GRAPHICS_CONTROL_FUNCTIONS, CFBSBITMAP_UNLOCKHEAP2_ENTRY, "> bitmap=0x%08x;", (TUint)aFbsBitmap);) - ((CFbsBitmap*)aFbsBitmap)->UnlockHeap(); - FBS_OST(OstTrace0(GRAPHICS_CONTROL_FUNCTIONS, CFBSBITMAP_UNLOCKHEAP2_EXIT, "<");) + ((CFbsBitmap*)aFbsBitmap)->UnlockHeap(); } /** Tests whether the bitmap is volatile. @@ -1503,7 +1398,7 @@ EXPORT_C TInt CFbsBitmap::TouchCount() const { if (!iHandle || (iFlags & EIsReadOnlyBitmapMask)) - return 0; // A read-only bitmap can never be touched. + return 0; // A read-only bitmap can never be touched. return CleanAddress()->Extra()->iTouchCount; } @@ -1828,12 +1723,7 @@ */ EXPORT_C TInt CFbsBitmap::Load(RFile& aFile,TInt32 aId/*=0*/,TBool aShareIfLoaded/*=ETrue*/) { - FBS_OST(TFullName fileName;) - FBS_OST(aFile.FullName(fileName);) - FBS_OST(OstTraceExt4( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_LOAD3_ENTRY, "> this=0x%08x; file=%S; id=0x%08x; share=%d", (TUint)this, fileName, aId, aShareIfLoaded);) - TInt ret = Load(aFile,aId,aShareIfLoaded,0); - FBS_OST(OstTraceExt4( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_LOAD3_EXIT, "< this=0x%08x; err=%d; iH=0x%08x; iSH=0x%08x", (TUint)this, ret, iHandle, iServerHandle);) - return ret; + return Load(aFile,aId,aShareIfLoaded,0); } /** Loads a specific bitmap from an opened multi-bitmap file handle. @@ -1849,29 +1739,19 @@ */ EXPORT_C TInt CFbsBitmap::Load(RFile& aFile,TInt32 aId,TBool aShareIfLoaded,TUint aFileOffset) { - TInt err = KErrNone; - FBS_OST(TFullName fileName;) - FBS_OST(aFile.FullName(fileName);) - FBS_OST(OstTraceExt5( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_LOAD4_ENTRY, "> this=0x%08x; file=%S; id=0x%08x; share=%d; off=%d", (TUint)this, fileName, aId, aShareIfLoaded, aFileOffset);) if (!iFbs) { - FBS_OST(OstTrace1( TRACE_ERROR, CFBSBITMAP_LOAD4_ERROR, "! this=0x%08x; !iFbs", (TUint)this);) - err = KErrCouldNotConnect; + return(KErrCouldNotConnect); } - else - { - Reset(); - TUint32* rompointer; - IsFileInRom(aFile,rompointer); - TBool romPointerValid; - err = DoLoadFromRom(rompointer, aId, aFileOffset, romPointerValid); - if (!romPointerValid) - { - err = DoLoad(aFile,aId,aShareIfLoaded,aFileOffset); - FBS_OST_IF(err!=KErrNone, OstTraceExt2( TRACE_ERROR, CFBSBITMAP_LOAD4_ERROR2, "! this=0x%08x; DoLoad() returned %d", (TUint)this, err);) - } - } - FBS_OST(OstTraceExt4( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_LOAD4_EXIT, "< this=0x%08x; err=%d; iH=0x%08x; iSH=0x%08x", (TUint)this, err, iHandle, iServerHandle);) + Reset(); + TUint32* rompointer; + IsFileInRom(aFile,rompointer); + TBool romPointerValid; + TInt err = DoLoadFromRom(rompointer, aId, aFileOffset, romPointerValid); + if (!romPointerValid) + { + err = DoLoad(aFile,aId,aShareIfLoaded,aFileOffset); + } return err; } @@ -1889,12 +1769,7 @@ */ EXPORT_C TInt CFbsBitmap::LoadAndCompress(RFile& aFile,TInt32 aId/*=0*/,TBool aShareIfLoaded/*=ETrue*/) { - FBS_OST(TFullName fileName;) - FBS_OST(aFile.FullName(fileName);) - FBS_OST(OstTraceExt4( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_LOADANDCOMPRESS3_ENTRY, "> this=0x%08x; file=%S; id=0x%08x; share=%d", (TUint)this, fileName, aId, aShareIfLoaded);) - TInt ret = LoadAndCompress(aFile,aId,aShareIfLoaded,0); - FBS_OST(OstTraceExt4( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_LOADANDCOMPRESS3_EXIT, "< this=0x%08x; err=%d; iH=0x%08x; iSH=0x%08x", (TUint)this, ret, iHandle, iServerHandle);) - return ret; + return LoadAndCompress(aFile,aId,aShareIfLoaded,0); } /** Loads and compresses a specific bitmap from an opened multi-bitmap file handle. @@ -1912,24 +1787,11 @@ */ EXPORT_C TInt CFbsBitmap::LoadAndCompress(RFile& aFile,TInt32 aId,TBool aShareIfLoaded,TUint aFileOffset) { - FBS_OST(TFullName fileName;) - FBS_OST(aFile.FullName(fileName);) - FBS_OST(OstTraceExt4( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_LOADANDCOMPRESS4_ENTRY, "> this=0x%08x; file=%S; id=0x%08x; share=%d", (TUint)this, fileName, aId, aShareIfLoaded);) TInt err = Load(aFile,aId,aShareIfLoaded,aFileOffset); if (err == KErrNone) { - if (!(iFlags & EIsRomBitmap)) - { - err = Compress(); - FBS_OST_IF(err!=KErrNone, OstTraceExt2( TRACE_ERROR, CFBSBITMAP_LOADANDCOMPRESS4_ERROR, "! this=0x%08x; Compress() returned %d", (TUint)this, err);) - } - else - { - err = KErrAccessDenied; - FBS_OST(OstTraceExt2( TRACE_ERROR, CFBSBITMAP_LOADANDCOMPRESS4_ERROR2, "! this=0x%08x; Cannot compress bitmap in ROM; iFlags=0x%08x", (TUint)this, (TUint)iFlags);) - } + err = !(iFlags & EIsRomBitmap) ? Compress() : KErrAccessDenied; } - FBS_OST(OstTraceExt2( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_LOADANDCOMPRESS4_EXIT, "< this=0x%08x; err=%d", (TUint)this, err);) return err; } @@ -2046,22 +1908,15 @@ */ EXPORT_C TInt CFbsBitmap::CreateExtendedBitmap(const TSize& aSizeInPixels, TDisplayMode aDispMode, TUid aType, const TAny* aData, TInt aDataSize) { - TInt err; - FBS_OST(OstTraceExt5( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_CREATEEXTENDEDBITMAP_ENTRY, "> this=0x%08x; w=%d; h=%d; dm=%d; type=0x%08x", (TUint)this, aSizeInPixels.iWidth, aSizeInPixels.iHeight, aDispMode, aType.iUid);) if (!aData || aDataSize == 0) { - FBS_OST(OstTrace1( TRACE_ERROR, CFBSBITMAP_CREATEEXTENDEDBITMAP_ERROR, "! this=0x%08x; (!aData || aDataSize == 0)", (TUint)this);) - err = KErrArgument; + return KErrArgument; } - else - { - err = DoCreate(aSizeInPixels, aDispMode, aType, aDataSize); - if (err == KErrNone) - { - Mem::Copy(iFbs->iLargeBitmapChunk.Base() + iAddressPointer->iDataOffset, aData, aDataSize); - } - } - FBS_OST(OstTraceExt4( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_CREATEEXTENDEDBITMAP_EXIT, "< this=0x%08x; err=%d; iH=0x%08x; iSH=0x%08x", (TUint)this, err, iHandle, iServerHandle);) + TInt err = DoCreate(aSizeInPixels, aDispMode, aType, aDataSize); + if (err == KErrNone) + { + Mem::Copy(iFbs->iLargeBitmapChunk.Base() + iAddressPointer->iDataOffset, aData, aDataSize); + } return err; } @@ -2105,26 +1960,19 @@ */ EXPORT_C TInt CFbsBitmap::CreateExtendedBitmap(const TSize& aSizeInPixels, TDisplayMode aDispMode, TUid aType, TInt aDataSize, MFbsExtendedBitmapInitializer& aInitializer) { - TInt err; - FBS_OST(OstTraceExt5( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_CREATEEXTENDEDBITMAP2_ENTRY, "> this=0x%08x; w=%d; h=%d; dm=%d; type=0x%08x;", (TUint)this, aSizeInPixels.iWidth, aSizeInPixels.iHeight, aDispMode, aType.iUid);) if (aDataSize == 0) { - FBS_OST(OstTrace1( TRACE_ERROR, CFBSBITMAP_CREATEEXTENDEDBITMAP2_ERROR, "! this=0x%08x; aDataSize == 0", (TUint)this);) - err = KErrArgument; + return KErrArgument; } - else - { - err = DoCreate(aSizeInPixels, aDispMode, aType, aDataSize); - if (err == KErrNone) - { - err = aInitializer.InitExtendedBitmap(iFbs->iLargeBitmapChunk.Base() + iAddressPointer->iDataOffset, aDataSize); - if (err != KErrNone) - { - Reset(); - } - } - } - FBS_OST(OstTraceExt4( GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS, CFBSBITMAP_CREATEEXTENDEDBITMAP2_EXIT, "< this=0x%08x; err=%d; iH=0x%08x; iSH=0x%08x", (TUint)this, err, iHandle, iServerHandle);) + TInt err = DoCreate(aSizeInPixels, aDispMode, aType, aDataSize); + if (err == KErrNone) + { + err = aInitializer.InitExtendedBitmap(iFbs->iLargeBitmapChunk.Base() + iAddressPointer->iDataOffset, aDataSize); + if (err != KErrNone) + { + Reset(); + } + } return err; } diff -r 1bc91eb0b8ae -r 5c40347c6f16 fbs/fontandbitmapserver/sfbs/FBSCLI.CPP --- a/fbs/fontandbitmapserver/sfbs/FBSCLI.CPP Wed Sep 15 13:39:03 2010 +0300 +++ b/fbs/fontandbitmapserver/sfbs/FBSCLI.CPP Wed Oct 13 16:00:58 2010 +0300 @@ -21,12 +21,6 @@ #include "BackGroundCompression.h" #include #include -#include "OstTraceDefinitions.h" -#include "fbstrace.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "FBSCLITraces.h" -#endif - /** Helper function for converting a pointer to an offset from the passed heap base. Use OffsetToPointer() to convert the returned offset back to a @@ -89,7 +83,6 @@ CFbClient::~CFbClient() { - FBS_OST( OstTraceExt2( GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS, CFBCLIENT_DESTRUCTOR_INFO, "# Server session destroyed; rc=%d; iSSH=0x%08x;", iResourceCount, iSessionHandle);) /* Don't call any CFontStore functions if CFbClient::NewL has left, or if FBSERV has already deleted the font store, which happens in test programs like TFBS when FBSERV is closed before the client(s). @@ -102,33 +95,16 @@ } if (font_store) - { font_store->DeleteSessionCache(iSessionHandle); - } // If the font store doesn't exist, neither will the shared heap owned by FBSERV. if (font_store) - { iHeap->Free(iOpenFontGlyphData); - } - - // output each bitmap that is about to be destroyed... - FBS_OST - ({ - for (TInt ii = iIx->Count() - 1; ii >= 0; --ii) - { - CObject* object = (*iIx)[ii]; - TInt localHandle = iIx->At(object); - if ((localHandle != KErrNotFound) && (iIx->At(localHandle, fbTop->BitmapConUniqueID()) != NULL)) - { - OstTraceExt3( GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS, CFBCLIENT_DESTRUCTOR_INFO2, "# Server resource destroyed; iSSH=0x%08x; rc=%d; iH=0x%08x;", iSessionHandle, iResourceCount, localHandle); - } - } - }) - // delete fonts and bitmaps held by the client + + // delete fonts hold by the client delete iIx; - // delete font files held by the client + // delete font files hold by the client if (iFontFileIndex) { TInt count = iFontFileIndex->Count(); @@ -234,7 +210,6 @@ iIx->Remove(localhandle); iResourceCount--; aMessage.Complete(KErrNone); - FBS_OST(OstTraceExt3( GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS, CFBCLIENT_SERVICEL_INFO, "# Server resource destroyed; iSSH=0x%08x; rc=%d; iH=0x%08x;", iSessionHandle, iResourceCount, localhandle);) #ifdef _DEBUG iRet=KErrNone; #endif @@ -424,7 +399,6 @@ // success iResourceCount++; - FBS_OST(OstTraceExt3( GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS, CFBCLIENT_HANDLEMESGFONTDUPLICATE_INFO, "# Server font duplicated; iSSH=0x%08x; rc=%d; iH=0x%08x;", iSessionHandle, iResourceCount, localhandle);) return KErrNone; } @@ -514,7 +488,6 @@ } // success iResourceCount++; - FBS_OST(OstTraceExt3( GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS, CFBCLIENT_COPYFONTINFOINTORETURNMESSAGE_INFO, "# Server font duplicated; iSSH=0x%08x; rc=%d; iH=0x%08x;", iSessionHandle, iResourceCount, localhandle);) return KErrNone; } @@ -998,7 +971,6 @@ bmpptr->Close(); break; } - bmpSpec.iHandle=localhandle; bmpSpec.iServerHandle = bmpptr->Handle(); bmpSpec.iAddressOffset=TInt(bmpptr->Address())-TopLevelStore()->HeapBase(); @@ -1010,7 +982,6 @@ return; } iResourceCount++; - FBS_OST(OstTraceExt5( GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS, CFBCLIENT_PROCBITMAPMESSAGE_INFO, "# Server bitmap created; iSSH=0x%08x; rc=%d; iH=0x%08x; iSH=0x%08x; bytes=%d;", iSessionHandle, iResourceCount, bmpSpec.iHandle, bmpSpec.iServerHandle, bmpptr->Address()->DataStride() * bmpSpec.iSizeInPixels.iHeight);) break; } @@ -1118,7 +1089,6 @@ return; } iResourceCount++; - FBS_OST(OstTraceExt5( GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS, CFBCLIENT_PROCBITMAPMESSAGE_INFO2, "# Server bitmap loaded; iSSH=0x%08x; rc=%d; iH=0x%08x; iSH=0x%08x; bytes=%d;", iSessionHandle, iResourceCount, handlebuffer().iHandle, handlebuffer().iServerHandle, bmpptr->Address()->DataStride() * bmpptr->Address()->SizeInPixels().iHeight);) break; } case EFbsMessBitmapResize: @@ -1188,7 +1158,6 @@ aMessage.Panic(KFBSERVPanicCategory, ret); return; } - FBS_OST(OstTraceExt5( GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS, CFBCLIENT_PROCBITMAPMESSAGE_INFO4, "# Server bitmap resized; iSSH=0x%08x; iOldH=0x%08x; iNewH=0x%08x; iNewSH=0x%08x; newbytes=%d;", iSessionHandle, localhandle, newlocalhandle, newbmpptr->Handle(), newbmpptr->Address()->DataStride() * newsize.iHeight);) break; } case EFbsMessBitmapDuplicate: @@ -1223,7 +1192,6 @@ return; } iResourceCount++; - FBS_OST(OstTraceExt5( GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS, CFBCLIENT_PROCBITMAPMESSAGE_INFO3, "# Server bitmap duplicated; iSSH=0x%08x; rc=%d; iH=0x%08x; iSH=0x%08x; bytes=%d;", iSessionHandle, iResourceCount, handlebuffer().iHandle, handlebuffer().iServerHandle, bmpptr->Address()->DataStride() * bmpptr->Address()->SizeInPixels().iHeight);) break; } case EFbsMessBitmapCompress: @@ -1285,7 +1253,6 @@ aMessage.Panic(KFBSERVPanicCategory, ret); return; } - FBS_OST(OstTraceExt4( GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS, CFBCLIENT_PROCBITMAPMESSAGE_INFO5, "# Server bitmap compressed; iSSH=0x%08x; iOldH=0x%08x; iNewH=0x%08x; iNewSH=0x%08x;", (TUint)iSessionHandle, localhandle, newlocalhandle, handlebuffer().iServerHandle);) break; } case EFbsMessBitmapBgCompress: @@ -1353,7 +1320,6 @@ aMessage.Panic(KFBSERVPanicCategory, ret); return; } - FBS_OST(OstTraceExt3( GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS, CFBCLIENT_PROCBITMAPMESSAGE_INFO6, "# Server bitmap cleaned; iSSH=0x%08x; iOldH=0x%08x; iNewH=0x%08x;", iSessionHandle, localhandle, cleanlocalhandle);) break; } case EFbsGetAllBitmapHandles: diff -r 1bc91eb0b8ae -r 5c40347c6f16 fbs/fontandbitmapserver/sfbs/SESSION.CPP --- a/fbs/fontandbitmapserver/sfbs/SESSION.CPP Wed Sep 15 13:39:03 2010 +0300 +++ b/fbs/fontandbitmapserver/sfbs/SESSION.CPP Wed Oct 13 16:00:58 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 1995-2010 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies). // All rights reserved. // This component and the accompanying materials are made available // under the terms of "Eclipse Public License v1.0" @@ -20,12 +20,6 @@ #include "FbsRalc.h" #include "fbshelper.h" #include "fbsmessage.h" -#include "OstTraceDefinitions.h" -#include "fbstrace.h" -#ifdef OST_TRACE_COMPILER_IN_USE -#include "SESSIONTraces.h" -#endif - GLDEF_C void Panic(TFbsPanic aPanic) { @@ -96,33 +90,16 @@ */ EXPORT_C TInt RFbsSession::Connect(RFs& aFileServer) { - TInt ret = KErrNone; RFbsSession* thisptr = (RFbsSession*)Dll::Tls(); - FBS_OST(OstTrace1(GRAPHICS_CONTROL_FUNCTIONS, RFBSSESSION_CONNECT_ENTRY, "> this=0x%08x;", (TUint)thisptr);) if(thisptr) { thisptr->iConnections++; - FBS_OST(OstTraceExt2(GRAPHICS_CONTROL_SEMANTICS, RFBSSESSION_CONNECT_INFO, "# Connected to existing session; this=0x%08x; iConnections=%d;", (TInt)thisptr, thisptr->iConnections);) + return KErrNone; } - else - { - ret = RFbsSession::DoAlloc(thisptr); - if(ret!=KErrNone) - { - FBS_OST(OstTrace1(TRACE_ERROR, RFBSSESSION_CONNECT_ERROR, "! DoAlloc returned %d", ret);) - } - else - { - ret = thisptr->DoConnect(aFileServer); - if(ret!=KErrNone) - { - FBS_OST(OstTraceExt2(TRACE_ERROR, RFBSSESSION_CONNECT_ERROR2, "! this=0x%08x; DoConnect returned %d", (TInt)thisptr, ret);) - } - } - } - - FBS_OST(OstTraceExt2(GRAPHICS_CONTROL_FUNCTIONS, RFBSSESSION_CONNECT_EXIT, "< this=0x%08x; ret=%d", (TUint)thisptr, ret);) - return ret; + TInt ret = RFbsSession::DoAlloc(thisptr); + if(ret!=KErrNone) + return ret; + return thisptr->DoConnect(aFileServer); } /** Creates a session with the Font and Bitmap server. @@ -133,40 +110,22 @@ */ EXPORT_C TInt RFbsSession::Connect() { - TInt ret = KErrNone; RFbsSession* thisptr = (RFbsSession*)Dll::Tls(); - FBS_OST(OstTrace1(GRAPHICS_CONTROL_FUNCTIONS, RFBSSESSION_CONNECT2_ENTRY, "> this=0x%08x;", (TUint)thisptr);) if(thisptr) { thisptr->iConnections++; - FBS_OST(OstTraceExt2(GRAPHICS_CONTROL_SEMANTICS, RFBSSESSION_CONNECT2_INFO, "# Connected to existing session; this=0x%08x; iConnections=%d;", (TInt)thisptr, thisptr->iConnections);) + return KErrNone; } - else - { - TInt ret = RFbsSession::DoAlloc(thisptr); - if (ret!=KErrNone) - { - FBS_OST(OstTrace1(TRACE_ERROR, RFBSSESSION_CONNECT2_ERROR, "! DoAlloc returned %d", ret);) - goto end; - } - - ret = thisptr->iFileServer.Connect(); - if(ret!=KErrNone) - { - thisptr->Disconnect(); - FBS_OST(OstTraceExt2(TRACE_ERROR, RFBSSESSION_CONNECT2_ERROR2, "! this=0x%08x; RFs::Connect() returned %d", (TInt)thisptr, ret);) - goto end; - } - - ret = thisptr->DoConnect(thisptr->iFileServer); - if(ret!=KErrNone) - { - FBS_OST(OstTraceExt2(TRACE_ERROR, RFBSSESSION_CONNECT2_ERROR3, "! this=0x%08x; DoConnect returned %d", (TInt)thisptr, ret);) - } - } -end: - FBS_OST(OstTraceExt2(GRAPHICS_CONTROL_FUNCTIONS, RFBSSESSION_CONNECT2_EXIT, "< this=0x%08x; ret=%d", (TUint)thisptr, ret);) - return ret; + TInt ret = RFbsSession::DoAlloc(thisptr); + if (ret!=KErrNone) + return ret; + ret = thisptr->iFileServer.Connect(); + if(ret!=KErrNone) + { + thisptr->Disconnect(); + return ret; + } + return thisptr->DoConnect(thisptr->iFileServer); } /** Closes the session with the Font and Bitmap server. @@ -176,42 +135,35 @@ EXPORT_C void RFbsSession::Disconnect() { RFbsSession* thisptr=(RFbsSession*)Dll::Tls(); - FBS_OST(OstTrace1(GRAPHICS_CONTROL_FUNCTIONS, RFBSSESSION_DISCONNECT_ENTRY, "> this=0x%08x;", (TUint)thisptr);) - if(thisptr) - { - FBS_OST(TInt tempServerSessionHandle = (thisptr->iHelper) ? thisptr->iHelper->iServerSessionHandle : 0;) - if(thisptr->iConnections>0) - { - thisptr->iCallBack.iPtr=NULL; - thisptr->iCallBack.CallBack(); - // Destructor of CFbsSessionHelper may call SendCommand to cancel an - // outstanding request, therefore destruction must be done before - // iConnections is 0 to avoid an assertion going off. - if(thisptr->iConnections==1) - { - delete thisptr->iHelper; - } - thisptr->iConnections--; - } - FBS_OST(TInt tempConnectionCount = thisptr->iConnections;) - if(thisptr->iConnections==0) - { - thisptr->iSharedChunk.Close(); - thisptr->iLargeBitmapChunk.Close(); - // Call close on the iFileServer regardless of whether this session owns it: - // if we don't own it, close will do nothing if there are still open files, - // so always calling close introduces extra safety - thisptr->iFileServer.Close(); - delete thisptr->iRomFileAddrCache; - delete thisptr->iScanLineBuffer; - delete thisptr->iDecompressionBuffer; - thisptr->Close(); - delete thisptr; - Dll::FreeTls(); - } - FBS_OST(OstTraceExt3(GRAPHICS_CONTROL_SEMANTICS, RFBSSESSION_DISCONNECT_INFO, "# Disconnected from session; this=0x%08x; iConnections=%d; iSSH=0x%08x", (TInt)thisptr, tempConnectionCount, tempServerSessionHandle);) - } - FBS_OST(OstTrace1(GRAPHICS_CONTROL_FUNCTIONS, RFBSSESSION_DISCONNECT_EXIT2, "< this=0x%08x;", (TUint)thisptr);) + if(thisptr==NULL) return; + if(thisptr->iConnections>0) + { + thisptr->iCallBack.iPtr=NULL; + thisptr->iCallBack.CallBack(); + // Destructor of CFbsSessionHelper may call SendCommand to cancel an + // outstanding request, therefore destruction must be done before + // iConnections is 0 to avoid an assertion going off. + if(thisptr->iConnections==1) + { + delete thisptr->iHelper; + } + thisptr->iConnections--; + } + if(thisptr->iConnections==0) + { + thisptr->iSharedChunk.Close(); + thisptr->iLargeBitmapChunk.Close(); + // Call close on the iFileServer regardless of whether this session owns it: + // if we don't own it, close will do nothing if there are still open files, + // so always calling close introduces extra safety + thisptr->iFileServer.Close(); + delete thisptr->iRomFileAddrCache; + delete thisptr->iScanLineBuffer; + delete thisptr->iDecompressionBuffer; + thisptr->Close(); + delete thisptr; + Dll::FreeTls(); + } } /** Gets the current Font and Bitmap server session. @@ -403,14 +355,11 @@ return KErrNoMemory; } iHelper->iServerSessionHandle = serverAssignedHandle; - ret = iLargeBitmapChunk.OpenGlobal(KFBSERVLargeChunkName,EFalse); if(ret!=KErrNone) Panic(EFbsPanicChunkError); iSpare = (TUint32*)&aFileServer; - - FBS_OST(OstTraceExt2(GRAPHICS_CONTROL_SEMANTICS, RFBSSESSION_DOCONNECT_INFO, "# New FBS Session created; this=0x%08x; iSSH=0x%08x;", (TInt)this, serverAssignedHandle);) return KErrNone; } diff -r 1bc91eb0b8ae -r 5c40347c6f16 fbs/fontandbitmapserver/sfbs/fbstrace.h --- a/fbs/fontandbitmapserver/sfbs/fbstrace.h Wed Sep 15 13:39:03 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,39 +0,0 @@ -// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -// All rights reserved. -// This component and the accompanying materials are made available -// under the terms of "Eclipse Public License v1.0" -// which accompanies this distribution, and is available -// at the URL "http://www.eclipse.org/legal/epl-v10.html". -// -// Initial Contributors: -// Nokia Corporation - initial contribution. -// -// Contributors: -// -// Description: -// -#ifndef FBSTRACE_H_ -#define FBSTRACE_H_ - -#ifdef GRAPHICS_TRACE -# define FBS_OST(x) GRAPHICS_TRACE(x) -# define FBS_OST_IF(arg, x) if(arg){GRAPHICS_TRACE(x)} -#else -# ifdef _DEBUG -# define FBS_OST(x) x -# define FBS_OST_IF(arg, x) if(arg){FBS_OST(x)} -# else -# define FBS_OST(x) -# define FBS_OST_IF(arg, x) -# endif -#endif - -#ifdef FBS_VERBOSE -# define FBS_OST_VERBOSE(x) FBS_OST(x) -# define FBS_OST_VERBOSE_IF(arg, x) FBS_OST_IF(arg, x) -#else -# define FBS_OST_VERBOSE(x) -# define FBS_OST_VERBOSE_IF(arg, x) -#endif - -#endif /* FBSTRACE_H_ */ diff -r 1bc91eb0b8ae -r 5c40347c6f16 fbs/fontandbitmapserver/traces_FBSCLI/OstTraceDefinitions.h --- a/fbs/fontandbitmapserver/traces_FBSCLI/OstTraceDefinitions.h Wed Sep 15 13:39:03 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -#ifndef __OSTTRACEDEFINITIONS_H__ -#define __OSTTRACEDEFINITIONS_H__ -// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler -// REMOVE BEFORE CHECK-IN TO VERSION CONTROL -//#define OST_TRACE_COMPILER_IN_USE -#include -#endif diff -r 1bc91eb0b8ae -r 5c40347c6f16 fbs/fontandbitmapserver/traces_FBSCLI/fixed_id.definitions --- a/fbs/fontandbitmapserver/traces_FBSCLI/fixed_id.definitions Wed Sep 15 13:39:03 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,85 +0,0 @@ -#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt. -[GROUP]GRAPHICS_CONTROL_FUNCTIONS=0x42 -[GROUP]GRAPHICS_CONTROL_SEMANTICS=0x44 -[GROUP]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS=0x40 -[GROUP]TRACE_ERROR=0x41 -[TRACE]GRAPHICS_CONTROL_FUNCTIONS[0x42]_CFBSBITMAP_BEGINDATAACCESS_ENTRY=0x1 -[TRACE]GRAPHICS_CONTROL_FUNCTIONS[0x42]_CFBSBITMAP_BEGINDATAACCESS_EXIT=0x2 -[TRACE]GRAPHICS_CONTROL_FUNCTIONS[0x42]_CFBSBITMAP_ENDDATAACCESS_ENTRY=0x3 -[TRACE]GRAPHICS_CONTROL_FUNCTIONS[0x42]_CFBSBITMAP_ENDDATAACCESS_EXIT=0x4 -[TRACE]GRAPHICS_CONTROL_FUNCTIONS[0x42]_CFBSBITMAP_LOCKHEAPLC_ENTRY=0xb -[TRACE]GRAPHICS_CONTROL_FUNCTIONS[0x42]_CFBSBITMAP_LOCKHEAPLC_EXIT=0xc -[TRACE]GRAPHICS_CONTROL_FUNCTIONS[0x42]_CFBSBITMAP_LOCKHEAP_ENTRY=0x5 -[TRACE]GRAPHICS_CONTROL_FUNCTIONS[0x42]_CFBSBITMAP_LOCKHEAP_EXIT=0x7 -[TRACE]GRAPHICS_CONTROL_FUNCTIONS[0x42]_CFBSBITMAP_UNLOCKHEAP2_ENTRY=0xd -[TRACE]GRAPHICS_CONTROL_FUNCTIONS[0x42]_CFBSBITMAP_UNLOCKHEAP2_EXIT=0xe -[TRACE]GRAPHICS_CONTROL_FUNCTIONS[0x42]_CFBSBITMAP_UNLOCKHEAP_ENTRY=0x8 -[TRACE]GRAPHICS_CONTROL_FUNCTIONS[0x42]_CFBSBITMAP_UNLOCKHEAP_EXIT=0xa -[TRACE]GRAPHICS_CONTROL_FUNCTIONS[0x42]_RFBSSESSION_CONNECT2_ENTRY=0x11 -[TRACE]GRAPHICS_CONTROL_FUNCTIONS[0x42]_RFBSSESSION_CONNECT2_EXIT=0x12 -[TRACE]GRAPHICS_CONTROL_FUNCTIONS[0x42]_RFBSSESSION_CONNECT_ENTRY=0xf -[TRACE]GRAPHICS_CONTROL_FUNCTIONS[0x42]_RFBSSESSION_CONNECT_EXIT=0x10 -[TRACE]GRAPHICS_CONTROL_FUNCTIONS[0x42]_RFBSSESSION_DISCONNECT_ENTRY=0x13 -[TRACE]GRAPHICS_CONTROL_FUNCTIONS[0x42]_RFBSSESSION_DISCONNECT_EXIT2=0x15 -[TRACE]GRAPHICS_CONTROL_SEMANTICS[0x44]_RFBSSESSION_CONNECT2_INFO=0x2 -[TRACE]GRAPHICS_CONTROL_SEMANTICS[0x44]_RFBSSESSION_CONNECT_INFO=0x1 -[TRACE]GRAPHICS_CONTROL_SEMANTICS[0x44]_RFBSSESSION_DISCONNECT_INFO=0x3 -[TRACE]GRAPHICS_CONTROL_SEMANTICS[0x44]_RFBSSESSION_DOCONNECT_INFO=0x4 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_CREATEEXTENDEDBITMAP2_ENTRY=0x1a -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_CREATEEXTENDEDBITMAP2_EXIT=0x1b -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_CREATEEXTENDEDBITMAP_ENTRY=0x18 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_CREATEEXTENDEDBITMAP_EXIT=0x19 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_CREATEHARDWAREBITMAP_ENTRY=0x5 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_CREATEHARDWAREBITMAP_EXIT=0x6 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_CREATE_ENTRY=0x3 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_CREATE_EXIT=0x4 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_DUPLICATE_ENTRY=0x7 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_DUPLICATE_EXIT=0x1c -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_LOAD2_ENTRY=0xa -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_LOAD2_EXIT=0xb -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_LOAD3_ENTRY=0x10 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_LOAD3_EXIT=0x11 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_LOAD4_ENTRY=0x12 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_LOAD4_EXIT=0x13 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_LOADANDCOMPRESS2_ENTRY=0xe -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_LOADANDCOMPRESS2_EXIT=0xf -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_LOADANDCOMPRESS3_ENTRY=0x14 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_LOADANDCOMPRESS3_EXIT=0x15 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_LOADANDCOMPRESS4_ENTRY=0x16 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_LOADANDCOMPRESS4_EXIT=0x17 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_LOADANDCOMPRESS_ENTRY=0xc -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_LOADANDCOMPRESS_EXIT=0xd -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_LOAD_ENTRY=0x8 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_LOAD_EXIT=0x9 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_RESET_ENTRY=0x1 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS[0x40]_CFBSBITMAP_RESET_EXIT=0x2 -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_BEGINDATAACCESS_ERROR=0x10 -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_CREATEEXTENDEDBITMAP2_ERROR=0x18 -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_CREATEEXTENDEDBITMAP_ERROR=0x17 -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_DUPLICATEINRAM_ERROR=0x8 -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_DUPLICATEINRAM_ERROR2=0x9 -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_DUPLICATEINRAM_ERROR3=0xa -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_DUPLICATEINROM_ERROR=0x6 -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_DUPLICATEINROM_ERROR2=0x7 -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_DUPLICATE_ERROR=0x1 -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_DUPLICATE_ERROR2=0x2 -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_DUPLICATE_ERROR3=0x5 -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_DUPLICATE_ERROR4=0x3 -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_DUPLICATE_ERROR5=0x4 -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_ENDDATAACCESS_ERROR=0x11 -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_LOAD2_ERROR=0xb -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_LOAD2_ERROR2=0xc -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_LOAD2_ERROR3=0xd -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_LOAD2_ERROR4=0xe -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_LOAD4_ERROR=0x14 -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_LOAD4_ERROR2=0x15 -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_LOADANDCOMPRESS2_ERROR=0xf -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_LOADANDCOMPRESS4_ERROR=0x16 -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_LOADANDCOMPRESS4_ERROR2=0x1e -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_LOCKHEAP_ERROR=0x12 -[TRACE]TRACE_ERROR[0x41]_CFBSBITMAP_UNLOCKHEAP_ERROR=0x13 -[TRACE]TRACE_ERROR[0x41]_RFBSSESSION_CONNECT2_ERROR=0x1b -[TRACE]TRACE_ERROR[0x41]_RFBSSESSION_CONNECT2_ERROR2=0x1c -[TRACE]TRACE_ERROR[0x41]_RFBSSESSION_CONNECT2_ERROR3=0x1d -[TRACE]TRACE_ERROR[0x41]_RFBSSESSION_CONNECT_ERROR=0x19 -[TRACE]TRACE_ERROR[0x41]_RFBSSESSION_CONNECT_ERROR2=0x1a diff -r 1bc91eb0b8ae -r 5c40347c6f16 fbs/fontandbitmapserver/traces_FBSERV/OstTraceDefinitions.h --- a/fbs/fontandbitmapserver/traces_FBSERV/OstTraceDefinitions.h Wed Sep 15 13:39:03 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -#ifndef __OSTTRACEDEFINITIONS_H__ -#define __OSTTRACEDEFINITIONS_H__ -// OST_TRACE_COMPILER_IN_USE flag has been added by Trace Compiler -// REMOVE BEFORE CHECK-IN TO VERSION CONTROL -//#define OST_TRACE_COMPILER_IN_USE -#include -#endif diff -r 1bc91eb0b8ae -r 5c40347c6f16 fbs/fontandbitmapserver/traces_FBSERV/fixed_id.definitions --- a/fbs/fontandbitmapserver/traces_FBSERV/fixed_id.definitions Wed Sep 15 13:39:03 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ -#Fixed group and trace id definitions. If this file is removed, the identifiers are rebuilt. -[GROUP]GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS=0x40 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS[0x40]_CFBCLIENT_COPYFONTINFOINTORETURNMESSAGE_INFO=0x3 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS[0x40]_CFBCLIENT_DESTRUCTOR_INFO=0xd -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS[0x40]_CFBCLIENT_DESTRUCTOR_INFO2=0xc -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS[0x40]_CFBCLIENT_HANDLEMESGFONTDUPLICATE_INFO=0x2 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS[0x40]_CFBCLIENT_PROCBITMAPMESSAGE_INFO=0x4 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS[0x40]_CFBCLIENT_PROCBITMAPMESSAGE_INFO2=0x5 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS[0x40]_CFBCLIENT_PROCBITMAPMESSAGE_INFO3=0x7 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS[0x40]_CFBCLIENT_PROCBITMAPMESSAGE_INFO4=0x6 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS[0x40]_CFBCLIENT_PROCBITMAPMESSAGE_INFO5=0x8 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS[0x40]_CFBCLIENT_PROCBITMAPMESSAGE_INFO6=0x9 -[TRACE]GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS[0x40]_CFBCLIENT_SERVICEL_INFO=0x1 diff -r 1bc91eb0b8ae -r 5c40347c6f16 fbs/fontandbitmapserver/utils/fbsbitmap_memory.pl --- a/fbs/fontandbitmapserver/utils/fbsbitmap_memory.pl Wed Sep 15 13:39:03 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,343 +0,0 @@ -#!/usr/local/bin/perl -# -# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# This script parses trace data produced by OST from FBS, using the the FBSCLI, -# FBSERV and Symbian BTrace Hooks OST dictionaries, to produce a CSV output of -# the amount of bitmap memory used per-thread over a user-definable time -# granularity, since the start of the trace. -# -# To use, enable SYMBIAN_KERNEL_THREAD_IDENTIFICATION trace group in Symbian -# BTrace Hooks OST dictionary, GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS in FBSERV -# OST dictionary, and GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS, -# GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS and GRAPHICS_CONTROL_FUNCTIONS in -# FBSCLI OST dictionary. Once tracing is gathered, save trace output as ascii -# and run this script against it. The resulting file can then be imported into -# a spreadsheet application to be visually processed. -# - -use strict; - -# Sanity checking of the command line parameters... -if ($#ARGV == -1 || $ARGV[0] eq "help" || $ARGV[0] eq "/?") -{ - print "\nusage: $0 filename [-h]\n"; - print "where\n"; - print " -h : Specifies the heartbeat in millisecs (default=10000)\n"; - print " -d : Ignore duplicated handles\n"; - exit; -} - - -## Modifiable constants... -my $CSV_DELIMITER = ','; - -# Time after start to take first snapshot, in millisecs -my $firstHeartBeatTimeMS = 1000; - -# Default heartbeat in millisecs if none specified. -my $heartBeatMS = 10000; - - -## -## Internal structures... -## -my $heartBeatCount = 0; -my $nextHeartBeatMS = -1; -my $logLastLineTimeMS = 0; - -# A hash of thread names to the amount of bitmap memory they -# have used since the start of the trace. -my %bmpMemoryPerThread = (); - -# A hash of bitmaps fully qualified by the session they belong to, -# and their local handle (because bitmaps can have the same local -# handle in different threads), mapped to their size in bytes. -my %bmpMemoryByServerHandle = (); - -# Hash of FbsSessions to thread IDs. -my %SessionThreadMap = (); - -# Array of the above hashes, one hash per heartbeat. -my @arrayOfSnapshots; - -# Count duplicated handles as memory used by a thread/process. -my $countDuplicates = 1; - -# Hashes of thread and process names to IDs. -my %ThreadNames; -my %ProcessNames; - - -## -## Command line options parsing... -## First arg is assumed to be the filename. -## -for my $i (1..$#ARGV) -{ - my $cma = $ARGV[$i]; - if ($cma =~ m/-h(\d*)/) - { - $heartBeatMS = $1; - } - elsif ($cma =~ m/-d/) - { - $countDuplicates = 0; - } - else - { - print "Unrecognised parameter: $cma , ignoring...\n"; - } -} - -## Read from the file. -## Read the log into an array line by line. -my $TRACE_FILENAME = $ARGV[0]; -open(INPUT_FILE, '<', $TRACE_FILENAME) or die $!; -binmode(INPUT_FILE); - -## -## Parse each line sequentially... -## -while ( my $line = ) -{ - my $timeFromMidnightMS; - - ## - ## If this line is about a new process, make a note of the name and the - ## associated process id, so that FbsSessions can be mapped to their - ## thread by name. - ## - if ($line =~ /^.*Thread:Process name assigned;NThread:(.*);DProcess:(.*);Name:(.*)$/i) - { - my $threadId = $1; - my $processId = $2; - my $processName = $3; - $ProcessNames{$processId} = $processName ; - } - - ## - ## If this line is about a new process, make a note of the name and the - ## associated process id, so that FbsSessions can be mapped to their - ## thread by name when the csv is generated. - ## - if (($line =~ /^.*Thread:Thread created;NThread:(.*);DProcess:(.*);Name:(.*)$/i) || - ($line =~ /^.*Thread:Thread name assigned;NThread:(.*);DProcess:(.*);Name:(.*)$/i)) - { - my $threadId = $1; - my $processId = $2; - my $threadName = $3; - my $fullThreadName = $ProcessNames{$processId} . ":" . $threadName; - $ThreadNames{$threadId} = $fullThreadName; - } - - ## - ## Determine timestamp. If this time is beyond the heartbeat, - ## take a snapshot and - ## - if ($line =~ /^(\d\d):(\d\d):(\d\d)\.(\d{3})/) - { - $timeFromMidnightMS = ((($1 * 3600) + ($2 * 60) + $3) * 1000) + $4; - if ($nextHeartBeatMS == -1) - { - $nextHeartBeatMS = $firstHeartBeatTimeMS; - $logLastLineTimeMS = $timeFromMidnightMS; - } - ## We have wrapped around midnight! - ## Add a 1000ms cushion to the comparison to avoid wrapping around - ## midnight if a trace is buffered too slowly. - if (($timeFromMidnightMS+1000) < $logLastLineTimeMS) - { - $timeFromMidnightMS += 86400000; - } - $nextHeartBeatMS -= ($timeFromMidnightMS - $logLastLineTimeMS); - $logLastLineTimeMS = $timeFromMidnightMS; - - ## - ## If heartbeat reached, take snapshot of bmp memory per thread - ## and set next heartbeat time. - ## - while ($nextHeartBeatMS <= 0) - { - $nextHeartBeatMS += $heartBeatMS; - # take a snapshot of the current bitmap memory usage per thread - while ((my $thread, my $bmpMemory) = each(%bmpMemoryPerThread)) - { - $arrayOfSnapshots[$heartBeatCount]{$thread} = $bmpMemory; - } - $heartBeatCount++; - } - } - - ## FBS Client-side traces. - if ($line =~ m/\tFBSCLI: /) - { - ## - ## If this line is an FBSCLI trace, and it contains iSSH then - ## it gives a chance to map a client thread ID to a session handle. - ## - if ( $line =~ m/iSSH=(\w*);.*Thread ID:(.*)$/) - { - my $ServerSessionHandle = $1; - my $thread = $2; - if ($thread ne "0x00000000") - { - $SessionThreadMap{$ServerSessionHandle} = $thread; - } - } - } - - ## - ## FBS Server-side traces. - ## - if ($line =~ m/\tFBSERV: /) - { - ## The line must have a s= parameter to be useful - the session server handle. - ## Any FBSERV line without this is not considered for parsing. - if ($line =~ m/; iSSH=(\w*);/) - { - my $FbsSessionHandle = $1; - my $thread = "Unknown Thread [Session=$FbsSessionHandle]"; - if (defined($SessionThreadMap{$FbsSessionHandle})) - { - $thread = $SessionThreadMap{$FbsSessionHandle}; - } - if ($line =~ m/# Server resource destroyed; .*iH=(\w*);/) - { - my $bmpHandle = $1; - my $bmpIdentifier = "$FbsSessionHandle:$bmpHandle"; - if (defined($bmpMemoryByServerHandle{$bmpIdentifier})) - { - $bmpMemoryPerThread{$thread} -= $bmpMemoryByServerHandle{$bmpIdentifier}; - delete $bmpMemoryByServerHandle{$bmpIdentifier}; - } - } - if ($line =~ m/# Server bitmap resized; .*iOldH=(\w*); iNewH=(\w*); newbytes=(\d*);/) - { - # When a bitmap is resized, the amount of memory held by the bitmap may change - # and the bitmap localhandle will change. - my $oldBmpHandle = $1; - my $newBmpHandle = $2; - my $newBmpBytes = $3; - my $oldBmpIdentifier = "$FbsSessionHandle:$oldBmpHandle"; - my $newBmpIdentifier = "$FbsSessionHandle:$newBmpHandle"; - if (defined($bmpMemoryByServerHandle{$oldBmpIdentifier})) - { - $bmpMemoryPerThread{$thread} -= $bmpMemoryByServerHandle{$oldBmpIdentifier}; - delete $bmpMemoryByServerHandle{$oldBmpIdentifier}; - } - $bmpMemoryPerThread{$thread} += $newBmpBytes; - $bmpMemoryByServerHandle{$newBmpIdentifier} = $newBmpBytes; - } - elsif ($line =~ m/#.*iOldH=(\w*); iNewH=(\w*);/) - { - # When a bitmap is compressed, cleaned or resized, the bitmap local handle changes - my $oldBmpHandle = $1; - my $newBmpHandle = $2; - my $oldBmpIdentifier = "$FbsSessionHandle:$oldBmpHandle"; - my $newBmpIdentifier = "$FbsSessionHandle:$newBmpHandle"; - if (defined($bmpMemoryByServerHandle{$oldBmpIdentifier})) - { - my $bytes = $bmpMemoryByServerHandle{$oldBmpIdentifier}; - delete $bmpMemoryByServerHandle{$oldBmpIdentifier}; - $bmpMemoryByServerHandle{$newBmpIdentifier} = $bytes; - } - } - elsif ($line =~ m/# Server bitmap duplicated.*iH=(\w*);.*bytes=(\d+);/) - { - if ($countDuplicates == 1) - { - # When a bitmap is duplicated, the memory is 'owned' by all - # threads that duplicate it. - my $bmpHandle = $1; - my $bmpBytes = $2; - my $bmpIdentifier = "$FbsSessionHandle:$bmpHandle"; - $bmpMemoryPerThread{$thread} += $bmpBytes; - $bmpMemoryByServerHandle{$bmpIdentifier} = $bmpBytes; - } - } - elsif ($line =~ m/#.*iH=(\w*);.*bytes=(\d+);/) - { - my $bmpHandle = $1; - my $bmpBytes = $2; - my $bmpIdentifier = "$FbsSessionHandle:$bmpHandle"; - $bmpMemoryPerThread{$thread} += $bmpBytes; - $bmpMemoryByServerHandle{$bmpIdentifier} = $bmpBytes; - } - } - } -} - -close (INPUT_FILE); - - -## -## Make a map of unique threads across all snapshots -## This is so only one occurrence of each thread will appear -## in the csv file. -## -my %uniqueThreads = (); -for my $i (0..$#arrayOfSnapshots) -{ - for my $thread (keys %{$arrayOfSnapshots[$i]}) - { - $uniqueThreads{$thread} = 1; - } -} - -## -## Start writing to file. -## First row, which contains the heartbeat number column headings... -## -my $OUTPUT_FILENAME = sprintf("%s.csv", $TRACE_FILENAME); -open(OUTPUT_FILE,">$OUTPUT_FILENAME") or die $!; -print OUTPUT_FILE "Session$CSV_DELIMITER"; -for my $i (0..$heartBeatCount) -{ - print OUTPUT_FILE "$i$CSV_DELIMITER"; -} - -## -## For each subsequent row, print the first thread and the -## memory at each snapshot... -## -print OUTPUT_FILE "\n"; -while ((my $thread, my $dummy) = each(%uniqueThreads)) -{ - # Resolve the thread to its full name... - print OUTPUT_FILE "$thread"; - if (defined($ThreadNames{$thread}) ) - { - my $threadName = $ThreadNames{$thread}; - print OUTPUT_FILE ":$threadName"; - } - print OUTPUT_FILE "$CSV_DELIMITER"; - - # print the memory use per thread, for each snapshot... - for my $i (0..$#arrayOfSnapshots) - { - my %snapshot = %{$arrayOfSnapshots[$i]}; - while ((my $snapshotThread, my $bmpMemory) = each(%snapshot)) - { - if ($snapshotThread eq $thread) - { - print OUTPUT_FILE "$bmpMemory"; - } - } - print OUTPUT_FILE "$CSV_DELIMITER"; - } - print OUTPUT_FILE "\n"; -} -close (OUTPUT_FILE); - diff -r 1bc91eb0b8ae -r 5c40347c6f16 fbs/fontandbitmapserver/utils/fbsgroup.py --- a/fbs/fontandbitmapserver/utils/fbsgroup.py Wed Sep 15 13:39:03 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# Groups an ASCII TracViewer trace by the contents of a named parameter. -# - -import fileinput, string, re, sys, threadname - -# Utility function to group a list by a given regular expression. -# returns a dictionary indexed by parameter 1 of the passed in pattern. -def groupby(pattern, data): - r = {} - for entry in data: - matched = re.search(pattern, entry) - if matched: - r.setdefault(matched.group(1), []).append(entry) - return r - -# Show the usage if the parameters are not as expected -if len(sys.argv) != 3: - print "Usage: fbsgroup " - print "Where:" - print " is a parameter to group by. (-t groups by thread id)" - print " is the ASCII TraceViewer file to be parsed" - sys.exit(1) - -if sys.argv[1] == "-t": - pattern = "(Thread ID:0x.*$)" -else: - pattern = "("+sys.argv[1]+"=*\w*);+" - -del sys.argv[1] - -# Add thread names to the raw trace -rawinput = threadname.addnames(fileinput.input()) - -# Group by the parameter supplied on the command line... -results = groupby(pattern, rawinput) - -for group, entries in results.items(): - print '\n'+group - - # Show a count of the number of CFbsBitmap::xxx function calls - functions = groupby("(CFbsBitmap::\S+:)", entries) - for name, function in functions.items(): - print "\t%s %s" % (name, len(function)) - - # Show a count of the number of CFbClient::xxx function calls - functions = groupby("(CFbClient::\S+:)", entries) - for name, function in functions.items(): - print "\t%s %s" % (name, len(function)) - - # Show a count of the number of RFbsSession::xxx function calls - functions = groupby("(RFbsSession::\S+:)", entries) - for name, function in functions.items(): - print "\t%s %s" % (name, len(function)) - - # Show the matching entries for this group - for entry in entries: - print "\t%s" % entry.strip() - - - - - - diff -r 1bc91eb0b8ae -r 5c40347c6f16 fbs/fontandbitmapserver/utils/fbsresource_count.pl --- a/fbs/fontandbitmapserver/utils/fbsresource_count.pl Wed Sep 15 13:39:03 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,276 +0,0 @@ -#!/usr/local/bin/perl -# -# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# This script parses trace data produced by OST from FBS, using the the FBSCLI, -# FBSERV and Symbian BTrace Hooks OST dictionaries, to produce a CSV output of -# the amount of FBS resources used per-thread over a user-definable time -# granularity, since the start of the trace. -# -# To use, enable SYMBIAN_KERNEL_THREAD_IDENTIFICATION trace group in Symbian -# BTrace Hooks OST dictionary, GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS in FBSERV -# OST dictionary, and GRAPHICS_RESOURCE_MANAGEMENT_SEMANTICS, -# GRAPHICS_RESOURCE_MANAGEMENT_FUNCTIONS and GRAPHICS_CONTROL_FUNCTIONS in -# FBSCLI OST dictionary. Once tracing is gathered, save trace output as ascii -# and run this script against it. The resulting file can then be imported into -# a spreadsheet application to be visually processed. -# - -use strict; - -# Sanity checking of the command line parameters... -if ($#ARGV == -1 || $ARGV[0] eq "help" || $ARGV[0] eq "/?") -{ - print "\nusage: $0 filename [-h]\n"; - print "where\n"; - print " -h : Specifies the heartbeat in millisecs (default=10000)\n"; - exit; -} - - -## Modifiable constants... -my $CSV_DELIMITER = ','; - -# Time after start to take first snapshot, in millisecs -my $firstHeartBeatTimeMS = 1000; - -# Default heartbeat in millisecs if none specified. -my $heartBeatMS = 10000; - - -## -## Internal structures... -## -my $heartBeatCount = 0; -my $nextHeartBeatMS = -1; -my $logLastLineTimeMS = 0; - -# Hash of FbsSessions to thread IDs. -my %SessionThreadMap = (); - -# A hash of thread names to the fbs resource count. -my %fbsResourcesPerThread = (); - -# Array of the above hashes, one hash per heartbeat. -my @arrayOfSnapshots; - -# Hashes of thread and process names to IDs. -my %ThreadNames; -my %ProcessNames; - - -## -## Command line options parsing... -## First arg is assumed to be the filename. -## -for my $i (1..$#ARGV) -{ - my $cma = $ARGV[$i]; - if ($cma =~ m/-h(\d*)/) - { - $heartBeatMS = $1; - } - else - { - print "Unrecognised parameter: $cma , ignoring...\n"; - } -} - -## Read from the file. -## Read the log into an array line by line. -my $TRACE_FILENAME = $ARGV[0]; -open(INPUT_FILE, '<', $TRACE_FILENAME) or die $!; -binmode(INPUT_FILE); - -## -## Parse each line sequentially... -## -while ( my $line = ) -{ - my $timeFromMidnightMS; - - ## - ## If this line is about a new process, make a note of the name and the - ## associated process id, so that FbsSessions can be mapped to their - ## thread by name. - ## - if ($line =~ /^.*Thread:Process name assigned;NThread:(.*);DProcess:(.*);Name:(.*)$/i) - { - my $threadId = $1; - my $processId = $2; - my $processName = $3; - $ProcessNames{$processId} = $processName ; - } - - ## - ## If this line is about a new process, make a note of the name and the - ## associated process id, so that FbsSessions can be mapped to their - ## thread by name when the csv is generated. - ## - if (($line =~ /^.*Thread:Thread created;NThread:(.*);DProcess:(.*);Name:(.*)$/i) || - ($line =~ /^.*Thread:Thread name assigned;NThread:(.*);DProcess:(.*);Name:(.*)$/i)) - { - my $threadId = $1; - my $processId = $2; - my $threadName = $3; - my $fullThreadName = $ProcessNames{$processId} . ":" . $threadName; - $ThreadNames{$threadId} = $fullThreadName; - } - - ## - ## Determine timestamp. If this time is beyond the heartbeat, - ## take a snapshot and - ## - if ($line =~ /^(\d\d):(\d\d):(\d\d)\.(\d{3})/) - { - $timeFromMidnightMS = ((($1 * 3600) + ($2 * 60) + $3) * 1000) + $4; - if ($nextHeartBeatMS == -1) - { - $nextHeartBeatMS = $firstHeartBeatTimeMS; - $logLastLineTimeMS = $timeFromMidnightMS; - } - ## We have wrapped around midnight! - ## Add a 1000ms cushion to the comparison to avoid wrapping around - ## midnight if a trace is buffered too slowly. - if (($timeFromMidnightMS+1000) < $logLastLineTimeMS) - { - $timeFromMidnightMS += 86400000; - } - $nextHeartBeatMS -= ($timeFromMidnightMS - $logLastLineTimeMS); - $logLastLineTimeMS = $timeFromMidnightMS; - - ## - ## If heartbeat reached, take snapshot of bmp memory per thread - ## and set next heartbeat time. - ## - while ($nextHeartBeatMS <= 0) - { - $nextHeartBeatMS += $heartBeatMS; - # take a snapshot of the current bitmap memory usage per thread - while ((my $thread, my $fbsResourceCount) = each(%fbsResourcesPerThread)) - { - $arrayOfSnapshots[$heartBeatCount]{$thread} = $fbsResourceCount; - } - $heartBeatCount++; - } - } - - ## FBS Client-side traces. - if ($line =~ m/\tFBSCLI: /) - { - ## - ## If this line is an FBSCLI trace, and it contains iSSH then - ## it gives a chance to map a client thread ID to a session handle. - ## - if ( $line =~ m/iSSH=(\w*);.*Thread ID:(.*)$/) - { - my $ServerSessionHandle = $1; - my $thread = $2; - if ($thread ne "0x00000000") - { - $SessionThreadMap{$ServerSessionHandle} = $thread; - } - } - } - - ## - ## FBS Server-side traces. - ## - if ($line =~ m/\tFBSERV: /) - { - ## The line must have a s= parameter to be useful - the session server handle. - ## Any FBSERV line without this is not considered for parsing. - if ($line =~ m/; iSSH=(\w*);/) - { - my $FbsSessionHandle = $1; - my $thread = "Unknown Thread [Session=$FbsSessionHandle]"; - if (defined($SessionThreadMap{$FbsSessionHandle})) - { - $thread = $SessionThreadMap{$FbsSessionHandle}; - } - if ($line =~ m/; rc=(\d+);/) - { - my $resourceCount = $1; - if ($resourceCount == 0) - { - $resourceCount = ''; - } - $fbsResourcesPerThread{$thread} = $resourceCount; - } - } - } -} - -close (INPUT_FILE); - - -## -## Make a map of unique threads across all snapshots -## This is so only one occurrence of each thread will appear -## in the csv file. -## -my %uniqueThreads = (); -for my $i (0..$#arrayOfSnapshots) -{ - for my $thread (keys %{$arrayOfSnapshots[$i]}) - { - $uniqueThreads{$thread} = 1; - } -} - -## -## Start writing to file. -## First row, which contains the heartbeat number column headings... -## -my $OUTPUT_FILENAME = sprintf("%s.csv", $TRACE_FILENAME); -open(OUTPUT_FILE,">$OUTPUT_FILENAME") or die $!; -print OUTPUT_FILE "Session$CSV_DELIMITER"; -for my $i (0..$heartBeatCount) -{ - print OUTPUT_FILE "$i$CSV_DELIMITER"; -} - -## -## For each subsequent row, print the first thread and the -## memory at each snapshot... -## -print OUTPUT_FILE "\n"; -while ((my $thread, my $dummy) = each(%uniqueThreads)) -{ - # Resolve the thread to its full name... - print OUTPUT_FILE "$thread"; - if (defined($ThreadNames{$thread}) ) - { - my $threadName = $ThreadNames{$thread}; - print OUTPUT_FILE ":$threadName"; - } - print OUTPUT_FILE "$CSV_DELIMITER"; - - # print the memory use per thread, for each snapshot... - for my $i (0..$#arrayOfSnapshots) - { - my %snapshot = %{$arrayOfSnapshots[$i]}; - while ((my $snapshotThread, my $fbsResourceCount) = each(%snapshot)) - { - if ($snapshotThread eq $thread) - { - print OUTPUT_FILE "$fbsResourceCount"; - } - } - print OUTPUT_FILE "$CSV_DELIMITER"; - } - print OUTPUT_FILE "\n"; -} -close (OUTPUT_FILE); - diff -r 1bc91eb0b8ae -r 5c40347c6f16 fbs/fontandbitmapserver/utils/threadname.py --- a/fbs/fontandbitmapserver/utils/threadname.py Wed Sep 15 13:39:03 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -# Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). -# All rights reserved. -# This component and the accompanying materials are made available -# under the terms of "Eclipse Public License v1.0" -# which accompanies this distribution, and is available -# at the URL "http://www.eclipse.org/legal/epl-v10.html". -# -# Initial Contributors: -# Nokia Corporation - initial contribution. -# -# Contributors: -# -# Description: -# Utility function to append thread names where the Thread Id maps to a known thread/process name. - -import re - -# Takes as input list which contains OST traces from the SYMBIAN_KERNEL_THREAD_IDENTIFICATION trace group in Symbian -# BTrace Hooks OST dictionary. Returns a list with the same content as with thread names appended. -def addnames(data): - result = [] - processNames = {} - threadNames = {} - rthreadIds = {} - - for line in data: - pattern = "^.*Thread:Process name assigned;NThread:(.*);DProcess:(.*);Name:(.*)$" - matched = re.search(pattern, line) - if matched: - processNames[matched.group(2)] = matched.group(3) - - pattern = "^.*Thread:Thread created;NThread:(.*);DProcess:(.*);Name:(.*)$" - matched = re.search(pattern, line) - if matched: - threadNames[matched.group(1)] = processNames[matched.group(2)]+":"+matched.group(3) - - pattern = "^.*Thread:Thread name assigned;NThread:(.*);DProcess:(.*);Name:(.*)$" - matched = re.search(pattern, line) - if matched: - threadNames[matched.group(1)] = processNames[matched.group(2)]+":"+matched.group(3) - - pattern = "^.*Thread:Thread ID assigned;NThread:(.*);DProcess:(.*);RThread ID:(\d*)$" - matched = re.search(pattern, line) - if matched: - rthreadIds[matched.group(3)] = matched.group(1) - - pattern = "(^.*Thread ID:)(\w*)(.*)$" - matched = re.search(pattern, line) - if matched: - threadId = matched.group(2) - if threadNames.has_key(threadId): - line = matched.group(1)+threadId+":"+threadNames[threadId]+matched.group(3) - - pattern = "(^.*clientThreadId )(\w*)(.*)$" - matched = re.search(pattern, line) - if matched: - rthreadIdHex = matched.group(2) - rthreadId = hex(rthreadIdHex) - if rthreadIds.has_key(rthreadId): - threadId = rthreadIds[rthreadId] - threadName = threadNames[threadId] - line = matched.group(1)+rthreadId+":"+threadName+matched.group(3) - - pattern = "(^.*threadId )(\w*)(.*)$" - matched = re.search(pattern, line) - if matched: - rthreadIdHex = matched.group(2) - rthreadId = hex(rthreadIdHex) - if rthreadIds.has_key(rthreadId): - threadId = rthreadIds[rthreadId] - threadName = threadNames[threadId] - line = matched.group(1)+rthreadId+":"+threadName+matched.group(3) - - result.append(line) - - return result \ No newline at end of file diff -r 1bc91eb0b8ae -r 5c40347c6f16 graphicstest/graphicstestharness/automation/h4/roms.wdp.tb92.txt --- a/graphicstest/graphicstestharness/automation/h4/roms.wdp.tb92.txt Wed Sep 15 13:39:03 2010 +0300 +++ b/graphicstest/graphicstestharness/automation/h4/roms.wdp.tb92.txt Wed Oct 13 16:00:58 2010 +0300 @@ -7,7 +7,7 @@ RomAndAutoRom('armv5','h4hrp pagedrom techview platsec graphics_testharness.iby openvgtest.iby dptestcons.oby','-DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -D_SSMSTARTUPMODE=5 -DWITH_FLEXIBLE_MM -D_INTERNAL_MMC -DUSE_DATA_PAGING','h4hrp_graphics3_armv5_wdp','Graphics Test ROM (3) - OpenVG WDP','\epoc32\data\z\graphics\wsini_integ.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_03.txt','') RomAndAutoRom('armv5','h4hrp pagedrom techview platsec graphics_testharness.iby supplieropenvgtest.iby dptestcons.oby','-DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -D_SSMSTARTUPMODE=5 -DWITH_FLEXIBLE_MM -D_INTERNAL_MMC -DUSE_DATA_PAGING','h4hrp_graphics3a_armv5_wdp','Graphics Test ROM (3a) - OpenVG tests requiring USB/Memory Card support WDP','\epoc32\data\z\graphics\wsini_integ.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_03a.txt','') RomAndAutoRom('armv5','h4hrp pagedrom techview platsec wserv.oby dptestcons.oby','-DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -D_SSMSTARTUPMODE=5 -DWITH_FLEXIBLE_MM -D_INTERNAL_MMC -DUSE_DATA_PAGING','h4hrp_graphics4_armv5_wdp','Graphics Test ROM (4) - WServ WDP','\epoc32\data\z\system\data\ws_test.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_04.txt','') -RomAndAutoRom('armv5','h4hrp pagedrom techview platsec wserv.oby dptestcons.oby','-DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -D_SSMSTARTUPMODE=5 -DWITH_FLEXIBLE_MM -D_INTERNAL_MMC -DUSE_DATA_PAGING','h4hrp_graphics4yshifting_armv5_wdp','Graphics Test ROM (YShifting) - Linear reduction of YOffset WDP','\epoc32\data\z\system\data\wsini_pointershift.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_04a.txt','') +RomAndAutoRom('armv5','h4hrp pagedrom techview platsec wserv.oby dptestcons.oby','-DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -D_SSMSTARTUPMODE=5 -DWITH_FLEXIBLE_MM -D_INTERNAL_MMC -DUSE_DATA_PAGING','h4hrp_graphics4yshifting_armv5_wdp','Graphics Test ROM (YShifting) - Linear reduction of YOffset WDP','\epoc32\data\z\system\data\ws_test.ini,\epoc32\data\z\system\data\wsini_pointershift.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_04a.txt','') RomAndAutoRom('armv5','h4hrp pagedrom techview platsec wserv.oby dptestcons.oby','-DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -D_SSMSTARTUPMODE=5 -DWITH_FLEXIBLE_MM -D_INTERNAL_MMC -DUSE_DATA_PAGING','h4hrp_graphics4ct_armv5_wdp','Graphics Test ROM (4ct) - WServ Change Tracking WDP','\epoc32\data\z\system\data\ws_test_changetracking.ini,\epoc32\data\z\system\data\wsini.ini','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_04ct.txt','') RomAndAutoRom('armv5','h4hrp pagedrom techview platsec graphics_testharness.iby te_uibench.iby internaltestfonts.iby dptestcons.oby','-DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -DFBSRASTERIZER_DRV="^<"fbsrasterizer_test.iby"^>" -D_SSMSTARTUPMODE=5 -DWITH_FLEXIBLE_MM -D_INTERNAL_MMC -DUSE_DATA_PAGING','h4hrp_graphics5a_armv5_wdp','Graphics Test ROM (5a) - UIBench WDP','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_05a.txt','') RomAndAutoRom('armv5','h4hrp pagedrom techview platsec graphics_testharness.iby internaltestfonts.iby te_outlineshadow.iby dptestcons.oby','-DUSE_SDIO_SD_MMC -DWITH_TVOUT -DUSE_24UBPP_DISPLAY_VARIANT_TV -DSYMBIAN_BASE_USE_GCE -DSYMBIAN_GRAPHICS_USE_GCE -DSYMBIAN_GRAPHICS_ADAPTATION=SGA_SW -DGRAPHICS_EXCLUDE_FREETYPE -D_SSMSTARTUPMODE=5 -DWITH_FLEXIBLE_MM -D_INTERNAL_MMC -DUSE_DATA_PAGING','h4hrp_graphics5b_armv5_wdp','Graphics Test ROM (5b) - UIBench - Outline Shadow WDP','','..\sf\os\graphics\graphicstest\graphicstestharness\automation\h4\tests_05b.txt','') diff -r 1bc91eb0b8ae -r 5c40347c6f16 windowing/windowserver/group/BLD.INF --- a/windowing/windowserver/group/BLD.INF Wed Sep 15 13:39:03 2010 +0300 +++ b/windowing/windowserver/group/BLD.INF Wed Oct 13 16:00:58 2010 +0300 @@ -36,7 +36,7 @@ PRJ_MMPFILES #ifdef SYMBIAN_GRAPHICS_BUILD_OPENWF_WSERV -#include "openwfc/bld.inf" +#include "openwfc/BLD.INF" #else -#include "restricted/bld.inf" +#include "restricted/BLD.INF" #endif diff -r 1bc91eb0b8ae -r 5c40347c6f16 windowing/windowserver/nga/SERVER/openwfc/cliwin.cpp --- a/windowing/windowserver/nga/SERVER/openwfc/cliwin.cpp Wed Sep 15 13:39:03 2010 +0300 +++ b/windowing/windowserver/nga/SERVER/openwfc/cliwin.cpp Wed Oct 13 16:00:58 2010 +0300 @@ -564,7 +564,6 @@ } } - void CWsClientWindow::GetElementFlipAndRotation(TBool& aElemetFlip, MWsElement::TElementRotation& aElemenetRotation) { MWsElement* element = Screen()->WindowElements().GetElementFromWindow(*this); diff -r 1bc91eb0b8ae -r 5c40347c6f16 windowing/windowserverplugins/group/BLD.INF --- a/windowing/windowserverplugins/group/BLD.INF Wed Sep 15 13:39:03 2010 +0300 +++ b/windowing/windowserverplugins/group/BLD.INF Wed Oct 13 16:00:58 2010 +0300 @@ -31,9 +31,9 @@ PRJ_MMPFILES #ifndef SYMBIAN_GRAPHICS_BUILD_OPENWF_WSERV -#include "../restricted/group/bld.inf" +#include "../restricted/group/BLD.INF" #else -#include "../openwfc/group/bld.inf" +#include "../openwfc/group/BLD.INF" #endif