-- G3/G4 Cache Profiler Script -- Copyright©1999 by PowerLogix R&D, Inc. -- -- Demonstrates the preliminary AppleScript support in G3/G4 Cache Profiler. -- tell application "G3/G4 Cache Profiler 1.1b10" -- Sample script showing some of the functionality of G3/G4 Cache Profiler's -- preliminary AppleScript support. These functions could be used, for example -- to create a text file description of the user's profile, or to stress test -- the AutoCache code by running it repeatedly. To see what's really going on, -- run this in Script Editor with the "Event Log" window open. -- start us up activate -- ****************************** AutoCache ********************************* -- Test the AutoCache code. Repeating this 100 times will be an adequate stress -- test to see if it works on a given machine. Note that Auto Detect Speed runs -- the sometimes unstable AutoCache ratio test. Repeatedly doing the ratio test -- will be a good determinant of whether or not it works on a given machine. Those bogus -- numbers you are seeing in the Event Log window while this part runs are -- actually L2CR values being returned from G3/G4 Cache Profiler. repeat 10 times -- First we auto-detect the type set type to Auto Detect Type -- Given the type we can auto-detect the size set typeSize to Auto Detect Size type -- Given type and size we can auto-detect the speed (not stable on all machines) set typeSizeSpeed to Auto Detect Speed typeSize end repeat -- Now that we have Auto Detected the appropriate L2CR, we disable the L2 cache -- and re-enable it with our newly detect value. This demonstrates a way -- of accessing the L2CR register directly to enable/disable the cache. set l2cr of Backside Cache 1 to 0 set l2cr of Backside Cache 1 to typeSizeSpeed -- ******************************** Core Suite junk **************************** -- This gets the name of the application. get name -- This gets the name of the first window. get name of first window -- ******************************** Processor Suite **************************** -- Stuff to do with the Processor itself. get name of middle Processor get speed of Processor 1 get bus speed of Processor 1 get temperature of Processor 1 get pvr of Processor 1 get dpm of Processor 1 get dpm enable at restart of Processor 1 get spec access of Processor 1 get spec access off at restart of Processor 1 -- Stuff to do with the Backside Cache on a G3 processor get size of Backside Cache 1 get speed of Backside Cache 1 get enabled of Backside Cache 1 get enable on restart of Backside Cache 1 get l2cr of Backside Cache 1 -- Stuff to do with the Motherboard Cache (maybe shouldn't be in Processor Suite?) get size of Motherboard Cache 1 get speed of Motherboard Cache 1 get enabled of Motherboard Cache 1 get disable on restart of Motherboard Cache 1 -- And now we're done. Comment the following line and G3/G4 Cache Profiler won't quit -- automatically after running the script. quit end tell