MMS.cfgcsgo cfg文件在哪里里能找到

博客分类:
(鉴于有些国外网站有时候突然就不能访问了,为了保险起见,还是复制过来了)
I knew for a long time now that flash had undocumented features, little part of flash that could help speed up process (like the memory opcodes) or make interaction easy with right click and that kind of things. But I never thought that FlashPlayer would hide data that could help find bugs, or give better knowledge of how flash is interpreted.
As you may know, The mm.cfg files is located in:
W C:\Documents and Settings\username\mm.cfg
OSX; /Library/Application Support/Macromedia/mm.cfg
L home/username/mm.cfg
This file is interpreted when a Flash Player instance launches a SWF and gives indication of what should or shouldn’t be done.For example, most people use this file to set tracing parameters:ErrorReportingEnable=1TraceOutputFileEnable=1TraceOutputFileName=c:\logs\flashlogs.txtMaxWarnings=50
Many other options are specified in the Adobe FlashPlayer Admin Guide… but most of is NOT DOCUMENTED!
There is a LOT of thing to talk about and many cutting edge tools to improve your understanding of flash.
So let’s get into it
The Treasure
The complete list of features of mm.cfg is at the end of the post, but first lets talk about what’s most interesting.I took my favorite 7 features and made detailed explanation with example for each one so here they are:
TraceOutputBuffered = 1|0
This feature is essential to the rest of all the cool features because they output A LOT of lines in the flashlog
This is a very simple features but it change everything. Did you ever had problem tracing to many information and losing half of it in the flashlog?Well this is a known bug. If you make a loop of 1 000 000 and you trace the iterator, the flashlog will skip thousand of entries and will take 100% of your CPU while writing to disk.If you set this variable to true, the traces will be buffered and the write to disk will output multiple lines in one access.Performance? By default (without this feature), I’m able to trace 3600 line in 6 seconds and my CPU is at 100%.If I turn the features on, I can trace 1 000 000 lines in the same time! And my CPU is not even near 100%.
AS3Verbose = 1|0
This one is totally crazy.It traces detailed information about SWF ByteCode structure and Runtime parsing of the bytecode!You don’t need any software… no special framework to bind in your own SWF… just this one flag!
verify Main/CallFoo()
define incoming args
alloc local traits
alloc CallStackNode
debug_enter
save state
0(@6) &- @17
0(@7) &- @19
4(@7) &- @11
MethodEnv::debugEnter (@3, @4, @5, @15, @12, @14, @13, @11)
scope: [global Object$ flash.events::EventDispatcher$ flash.display::DisplayObject$ flash.display::InteractiveObject$ flash.display::DisplayObjectContainer$ flash.display::Sprite$ Main$]
locals: Main@16
0:debugfile "C:\Dev\;Main.as"
save state
Debugger::debugFile (@31, @32)
scope: [global Object$ flash.events::EventDispatcher$ flash.display::DisplayObject$ flash.display::InteractiveObject$ flash.display::DisplayObjectContainer$ flash.display::Sprite$ Main$]
locals: Main@16
2:debugline 29
save state
Debugger::debugLine (@31, @35)
scope: [global Object$ flash.events::EventDispatcher$ flash.display::DisplayObject$ flash.display::InteractiveObject$ flash.display::DisplayObjectContainer$ flash.display::Sprite$ Main$]
locals: Main@16
4:getlocal0
stack: Main@38
scope: [global Object$ flash.events::EventDispatcher$ flash.display::DisplayObject$ flash.display::InteractiveObject$ flash.display::DisplayObjectContainer$ flash.display::Sprite$ Main$]
locals: Main@38
5:pushscope
scope: [global Object$ flash.events::EventDispatcher$ flash.display::DisplayObject$ flash.display::InteractiveObject$ flash.display::DisplayObjectContainer$ flash.display::Sprite$ Main$] Main@38
locals: Main@38
6:debugline 31
save state
4(@7) &- @41
Debugger::debugLine (@31, @39)
scope: [global Object$ flash.events::EventDispatcher$ flash.display::DisplayObject$ flash.display::InteractiveObject$ flash.display::DisplayObjectContainer$ flash.display::Sprite$ Main$] Main@40
locals: Main@16
8:pushbyte 3
stack: int@45
scope: [global Object$ flash.events::EventDispatcher$ flash.display::DisplayObject$ flash.display::InteractiveObject$ flash.display::DisplayObjectContainer$ flash.display::Sprite$ Main$] Main@40
locals: Main@16
10:returnvalue
save state
MethodEnv::debugExit (@3, @14)
AS3Trace = 1|0
This one is also very useful for debuggingIt trace every single call to any function that is being called in the SWF at runtime!It’s like expending the StackTrace to the full software run time.
If you got a crash hard to find, you can turn this on and you will see ALL the last function executed that leaded to the crash.
You can even see Timer Call and Events callbacks!
1255552 ***MINF: MTHD ProfilerAgent/stopProfiling () @ 0x05DA35A0
1255552 ***MINF: MTHD global/flash.sampler::stopSampling () @ 0x0A8C2B20
1255553 ***MINF: MTHD flash.display::DisplayObject/get root () @ 0x0A8C06B0
1255553 ***MINF: MTHD flash.events::EventDispatcher/removeEventListener () @ 0x0A8C2110
1255553 ***MINF: MTHD flash.events::EventDispatcher/removeEventListener () @ 0x0A8C2110
1255553 ***MINF: MTHD flash.events::EventDispatcher/removeEventListener () @ 0x0A8C2110
1255553 ***MINF: MTHD flash.events::EventDispatcher/removeEventListener () @ 0x0A8C2110
1255553 ***MINF: MTHD flash.events::EventDispatcher/removeEventListener () @ 0x0A8C2110
1255553 ***MINF: MTHD flash.events::EventDispatcher/removeEventListener () @ 0x0A8C2110
1255553 ***MINF: MTHD flash.net::Socket/flush () @ 0x0A8C2AD0
1255553 ***MINF: MTHD flash.net::Socket/close () @ 0x0A8C2B70
1255553 ***MINF: MTHD flash.net::Socket/_init () @ 0x0A8C0DF0
1255553 ***MINF: MTHD flash.utils::Timer/stop () @ 0x0A8C2CB0
1255554 ***MINF: MTHD flash.utils::Timer/reset () @ 0x0A8C1B20
1255554 ***MINF: MTHD flash.utils::Timer/get running () @ 0x0A8C1C30
1255554 ***MINF: MTHD flash.net::Socket/internalClose () @ 0x0A8C2D00
1255554 ***MINF: MTHD flash.events::EventDispatcher/removeEventListener () @ 0x0A8C2110
1255554 ***MINF: MTHD flash.utils::Timer/stop () @ 0x0A8C2CB0
1255554 ***MINF: MTHD flash.system::System$/resume () @ 0x0A8C2D50
1256675 ***MINF: MTHD flash.utils::Timer/tick () @ 0x0A8C2DA0
1256675 ***MINF: MTHD flash.utils::Timer/_timerDispatch () @ 0x0A8C2FF0
1256675 ***MINF: MTHD flash.events::TimerEvent () @ 0x0A8C3040
1256675 ***MINF: MTHD flash.events::Event () @ 0x0A8C1AC0
1256675 ***MINF: MTHD Main/OnTimer () @ 0x00B70910
1256675 ***MINF: MTHD global/trace () @ 0x0A8C2170
1258705 ***MINF: MTHD flash.utils::Timer/tick () @ 0x0A8C2DA0
1258705 ***MINF: MTHD flash.utils::Timer/_timerDispatch () @ 0x0A8C2FF0
1258705 ***MINF: MTHD flash.events::TimerEvent () @ 0x0A8C3040
1258705 ***MINF: MTHD flash.events::Event () @ 0x0A8C1AC0
1258705 ***MINF: MTHD Main/OnTimer () @ 0x00B70910
1258705 ***MINF: MTHD global/trace () @ 0x0A8C2170
AS3StaticProfile = 1|0
This flag enable Just in Time Compiler () logs.
It gives detailed information on function conversion, bytecode conversion, MIR (machine-dependent intermediate representation) created, memory used and many others.At the end of execution, it also output a summary of all bytecode processed (For each opcode you have the number of occurrence, relatives importance, etc)
size profile Main/CallFoo
abc 12 mir 880 md 204
1773K mir/s
96% in compile during 854 micros
204 bytes from 55 MIR instructions 61 MD. max span 0 cse 7 dead 0
76 bytes of stack with 5 spills 5 steals 5 remats using 0 times
size profile Main/CallFooBar
abc 23 mir 1088 md 262
2386K mir/s
96% in compile during 921 micros
262 bytes from 68 MIR instructions 76 MD. max span 0 cse 10 dead 0
88 bytes of stack with 8 spills 7 steals 5 remats using 0 times
verified instructions 3395
verified code size 7441
cpool size 0
cpool int size 1
cpool uint size 0
cpool double size 0
cpool string size 568
cpool namespacesize 12
cpool namespace set size 0
cpool multiname size 75
methods size 20100
instances size 39
classes size 2
scripts size 8
bodies size 82873
0 % 5 B 0 %
0 % 4 B 0 %
0 % 8 B 0 %
0 % 2 B 0 %
0 % 2 B 0 %
0 % 2 B 0 %
pushundefined
0 % 9 B 0 %
0 % 6 B 0 %
0 % 1 B 0 %
0 % 2 B 0 %
113 3 % 331 B
pushstring
pushdouble
202 5 % 202 B
0 % 2 B 0 %
pushnamespace
0 % 6 B 0 %
143 4 % 382 B
newfunction
callproperty
102 3 % 102 B
returnvoid
0 % 9 B 0 %
returnvalue
constructsuper
constructprop
callpropvoid
0 % 8 B 0 %
0 % 2 B 0 %
newactivation
findpropstrict
119 3 % 290 B
findproperty
158 4 % 432 B
setproperty
0 % 2 B 0 %
getglobalscope
getscopeobject
getproperty
174 5 % 443 B
initproperty
0 % 4 B 0 %
102 3 % 204 B
0 % 6 B 0 %
0 % 3 B 0 %
0 % 7 B 0 %
0 % 1 B 0 %
0 % 2 B 0 %
0 % 6 B 0 %
0 % 6 B 0 %
0 % 4 B 0 %
0 % 1 B 0 %
0 % 5 B 0 %
0 % 1 B 0 %
0 % 3 B 0 %
0 % 2 B 0 %
0 % 2 B 0 %
0 % 6 B 0 %
0 % 2 B 0 %
0 % 2 B 0 %
greaterequals
0 % 1 B 0 %
increment_i
275 8 % 275 B
168 4 % 456 B
AS3DynamicProfile = 1|0
This one give dynamic information about the opcodes being called and gives statistic for each.The statistics include count, cycles, %count, %times and CPI
My question is: Having access to the CPI (Cycle per instruction) will we be able to conclude allfights between what operation is faster that the others? Cycle counts does not lies (on the same platform…)* Request for Jackson Dunstan: Wanna work on that?
*But there is a problem with this one, it crash all the time.My guess is it can’t process “Flash Object” like Movieclip, Event, and all the other and only support operation valid in tamarin.
total count=278 cycles= avg CPI=127727
findpropstrict
initproperty
getproperty
verifypass
returnvoid
pushnamespace
findproperty
pushundefined
pushdouble
LogGPU = 1|0
This enable logging GPU information about current SWF while it runs.Use GPULogOutputFileName = [path] to specify where to output that log.Use DisplayGPUBlend = 1 to display the little green square while GPU runsuse ForceGPUBlend = 1 (At your own risk) to force GPU event if your videocard is not officially listed as valid for Flash GPU.
[GPU-BLEND] SUCEEDED to create D3D device
[GPU-BLEND]0x1161000 MONITOR/DEVICE SWITCH, old=0x0, new=0x18fd00
[GPU-BLEND]0x1161000 Started (wMode=GPU) on device 10de 402 (6.14.11.9062) NVIDIA GeForce 8600 GT
mem:free=718, used=0
[GPU-BLEND]Begin render aa=4.
Free TextureMem=712 Mb, Used = 5
[GPU-BLEND]Using 0x13b7080 as RT vp= 0 0 800 600, aa = 4
[GPU-BLEND]Clearing buffer 0x13b7080 { 0 0 800 600 } with color ffffffff
[GPU-BLEND]Filling border & background on 0x13b 11 11 with bo:ffffffff, ba:ff00ff00
[GPU-BLEND]Using 0x13b7080 as RT vp= 0 0 800 600, aa = 4
[GPU-BLEND]End render
[GPU-BLEND]0x1161000 Started (wMode=GPU) on device 10de 402 (6.14.11.9062) NVIDIA GeForce 8600 GT
mem:free=716, used=0
[GPU-BLEND]Begin render aa=4.
Free TextureMem=712 Mb, Used = 5
[GPU-BLEND]Using 0x11b7080 as RT vp= 0 0 800 600, aa = 4
[GPU-BLEND]Clearing buffer 0x11b7080 { 0 0 800 600 } with color ffffffff
[GPU-BLEND]Filling border & background on 0x11b 11 11 with bo:ffffffff, ba:ff00ff00
[GPU-BLEND]Using 0x11b7080 as RT vp= 0 0 800 600, aa = 4
[GPU-BLEND]End render
PreloadSwf?flashvar1=value&…
This is mainly used by the FlashBuilder Profiler. When you launch a SWF profiling, FlashBuilder add this line to mm.cfg to make it run another SWF before the one you profile.The default file is: C:/Documents and Settings/{USER}/My Documents/Flex Builder 3/.metadata/.plugins/com.adobe.flash.profiler/ProfilerAgent.swf?host=localhost&port=9999The profiler agent is a SWF that use the as3 sampling classes to collect information and send them all over a socket connection to FlashBuilder.FlashBuilder is only interpreting that data received from the SWFBy changing localhost by any other machine name you can connect to a remote FlashBuilder Profiler. On the Remote profiler you need to check the “wait for application” box and then start the local SWF on the other machine.
This one is just crazy powerful: See:
The Full List
undocumented features will be written in bold
AllowUserLocalTrust = 1|0
Lets you prevent users from designating any files on local file systems as trusted.
AS3AllocationTracking = 1|0
Enable/Disable Profiling information (if turned off, we can’t profile Allocation in FlexBuilder anymore)
AS3AutoStartSampling = 1|0
Specify if we need a feedback before starting the profiler or we start right away.
AS3CSE = 1|0
is an acronym for “Common Subexpression Elimination”. It seems plausible that these may be employed by the Flash virtual machine to optimize the byte-code before executing
AS3DCE = 1|0
is an acronym for “Dead Code Elimination”. It seems plausible that these may be employed by the Flash virtual machine to optimize the byte-code before executing
AS3DynamicProfile = 1|0
When enabling this (you might crash half the time) the flash player is going to collect precious profiling information on opcodes used in the Swf (count/Time/%/Cycles)
AS3MIR = 1|0
Enable/Disable Profiling information (if turned off, FlashPlayer won’t keep information on Machine-dependant intermediate representation - NanoJIT)
AS3Sampling = 1|0
Enable/Disable Profiling information (if turned off, we can’t profile in FlexBuilder anymore)
AS3SSE = 1|0
*My guess is it turns on and off
optimization
AS3StaticProfile = 1|0
Information Generated by NanoJit (just in time compiler used in Tamarin), including a lot of statistic on code conversion, time to process and memory use
AS3Trace = 1|0
If turned on, ALL function called (at runtime) will be outputed in the flashlogs!You should always use in conjonction with TraceOutputBuffered=1
AS3Turbo = 1|0
AS3Verbose = 1|0
Trace detailed information about SWF ByteCode structure and Runtime parsing of the bytecode!
AssetCacheSize=X
Lets you specify a hard limit, in MB, on the amount of local storage that Flash Player uses for the storage of common Flash components.
AutoUpdateDisable = 1|0
Lets you prevent Flash Player from automatically checking for and installing updated versions.
AutoUpdateInterval = X
Lets you specify how often to check for an updated version of Flash Player.
AutoUpdateVersionUrl = [URL]
Lets you specify a precise server to look up for new flash version
***HardwareDisable = 1|0
Lets you prevent SWF files from accessing webcams or microphones.
CodeSignLogFile
CodeSignRootCert = 1|0
Convert8kAnd16kAudio = 1|0
CrashLogEnable = 1|0
Disable***M1Loading = 1|0
If turned on, no SWF of version 8 and earlier can be loaded.
DisableDeviceFontEnumeration = 1|0
Lets you prevent information on installed fonts from being displayed.
DisableIncrementalGC = 1|0
Lets you enable/disable Garbage Collector Incremental policies ()
DisableMulticoreRenderer = 1|0
Lets you turn off multiple core rendering
DisableNetworkAndFilesystemInHostApp = 1|0
Lets you prevent networking or file system access of any kind.
DisableProductDownload = 1|0
Lets you prevent native code applications that are digitally signed and delivered by Adobe from being downloaded.
DisableSockets = 1|0
Lets you enable or disable the use of the Socket.connect() and XMLSocket.connect() methods.
DisplayGPUBlend = 1|0
If set to 1, it will prevent GPU use even if the SWF context is setted to use GPU and your card support it.
EnableIncrementalValidation = 1|0
EnableLeakFile = 1|0
EnableSocketsTo = [address]
Lets you create a whitelist of servers to which socket connections are allowed.EnableSocketsTo = localhost.localdomainEnableSocketsTo = 127.0.0.1
EnforceLocalSecurityInActiveXHostApp = 1|0
Lets you enforce local security rules for a specified application.
ErrorReportingEnable = 1|0
Set the ErrorReportingEnable property to 1 to enable the debugger version of Flash Player to write error messages to the log file.
FileDownloadDisable = 1|0
Lets you prevent the ActionScript FileReference API from performing file downloads.
FileUploadDisable = 1|0
Lets you prevent the ActionScript FileReference API from performing file uploads.
ForceGPUBlend = 1|0
Force GPU blending even if you video card is not officialy supported (At your own risk!)
FrameProfilingEnable = 1|0
Enable/Disable Profiling information (if turned off, we can’t profile Frames in FlexBuilder anymore)
FullScreenDisable = 1|0
Lets you disable SWF files playing via a browser plug-in from being displayed in full-screen mode.
GCStats = 1|0
Enable/Disable Profiling information (if turned off, we can’t profile GC in FlexBuilder anymore)
GPULogOutputFileName
Lets you specify the output file for the GPU informations
HeapProfilingAS3Enable = 1|0
Enable/Disable Profiling information (if turned off, we can’t profile Heap in FlexBuilder anymore)
LegacyDomainMatching = 1|0
Lets you specify whether SWF files produced for Flash Player 6 and earlier can execute an operation that has been restricted in a newer version of Flash Player.
LocalFileLegacyAction = 1|0
Lets you specify how Flash Player determines whether to execute certain local SWF files that were originally produced for Flash Player 7 and earlier.
LocalFileReadDisable = 1|0
Lets you prevent local SWF files from having read access to files on local hard drives.
LocalStorageLimit = X
Lets you specify a hard limit on the amount of local storage that Flash Player uses (per domain) for persistent shared objects.
LogGPU = 1|0
Lets you specify if you want to output debug GPU log
MaxWarnings = X
The default value of the MaxWarnings property is 100. After 100 messages, the debugger version of Flash Player writes a message to the file stating that further error messages will be suppressed.
OverrideGPUValidation = 1|0
Overrides validation of the requirements needed to implement GPU compositing.
OverrideUserInvokedActions = 1|0
PolicyFileLog = 1|0
Enables the logging of policy file messages.
PolicyFileLogAppend = 1|0
Set the PolicyFileLogAppend property to 1 to save previous policy file log entries
PreloadSwf?flashvar1=value&…
Lets you specify a SWF to be loaded before the main swf.This is the profiler agent, a little flash app (ProfilerAgent.swf) that connect to the FlexBuilder Profiler via socket (localhost:9999).FlexBuilder is only interpreting that data.PreloadSwf=C:/Documents and Settings/{USER}/My Documents/Flex Builder 3/.metadata/.plugins/com.adobe.flash.profiler/ProfilerAgent.swf?host=localhost&port=9999By changing localhost by any other machine name you can connect to a remote FlashBuilder Profiler. On the Remote profiler you need to check the “wait for application” box and then start the local SWF on the other machine.
ProductDisabled = 1|0
Creates a list of ProductManager applications that users are not permitted to install or launch.
ProductDownloadBaseUrl
ProfileFunctionEnable = 1|0
Enable/Disable Profiling information (if turned off, we can’t profile function in FlexBuilder anymore)
ProfilingOutputDirectory = [path]
Specify where to save the ProfilerData file
ProfilingOutputFileEnable = 1|0
Specify if we want to create a file containing all the profiler data (flashprof_8.dat)
RendererProfilingEnable = 1|0
Enable/Disable Profiling information (if turned off, we can’t profile in FlexBuilder anymore)
RTMFPP2PDisable = 1|0
Specifies how the NetStream constructor connects to a server when a value is specified for peerID, the second parameter passed to the constructor.
RTMFPTURNProxy = 1|0
Lets Flash Player make RTMFP connections through the specified TURN server in addition to normal UDP sockets.
ScriptStuckTimeout = X
Lets you specify the time after what the timeout (too much time running a script) exception will popup
SecurityDialogReportingEnable = 1|0
Lets you specify whether the Security dialog should be visible or not.
SuppressDebuggerExceptionDialogs = 1|0
Lets you specify whether the Error dialog should be visible or not.
ThirdPartyStorage
Lets you specify whether third-party SWF files can read and write locally persistent shared objects.
TraceOutputBuffered = 1|0
Specify the flash player to use a buffer before writing to disk. If you had problem when tracing tousands of lines and line were skipped, this solve the thing. It’s also a lot faster (1000000 trace in 7 seconds instead of 3200 trace in 7 sec!)
TraceOutputFileEnable = 1|0
Set TraceOutputFileEnable to 1 to enable the debugger version of Flash Player to write trace messages to the log file.
TraceOutputFileName= [path]
(Before Flash 9) Sets the location of the log file. By default, the debugger version of Flash Player writes error messages to a file named flashlog.txt, located in the same directory in which the mm.cfg file is located.
UseBrokerProcess = 1|0
Lets you specify if you want to use elevated privileges or not ()
WindowlessDisable = 1|0
Lets you disable Floating Flash (ex: Ads)
Conclusion
This whole thing opens a new playground for hardcore programmer like me.A lot can be done with this new information:
Custom Profiling tool using AS3Verbose and AS3Trace modes
Custom Profiling tool using .dat generated by FlashProfiler
Automatic Code performance warning using NanoJIT structure analysis
Guide to performance using CPI (cycle per instruction)
Mapping of profiler using the PreloadSwf features (instead of localhost put any other host that have a valid profiler)
I didn’t have time to work extensively on each features and I may have interpreted incorrectly certain things.If it’s the case please tell me and I’ll modify this post. If you do test or benchmark using this post information please post them as comment here and I’ll add the benchmark later in the post.
浏览: 82939 次
来自: 北京
转载了,总结的很好。谢谢
(window.slotbydup=window.slotbydup || []).push({
id: '4773203',
container: s,
size: '200,200',
display: 'inlay-fix'

参考资料

 

随机推荐