aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine (unfollow)
Commit message (Collapse)AuthorFilesLines
2012-03-19Stop console command "xengine status" throwing an exception if there are no ↵Justin Clark-Casey (justincc)1-4/+4
scripts in a region. Addresses http://opensimulator.org/mantis/view.php?id=5940
2012-03-16refactor: separate out console and status report generation parts of XEngineJustin Clark-Casey (justincc)1-1/+6
2012-03-16Aggregate script execution times by linksets rather than individual prims.Justin Clark-Casey (justincc)1-3/+2
This is for the top scripts report.
2012-03-16Replace script-lines-per-second with the script execution time scaled by its ↵Justin Clark-Casey (justincc)1-0/+53
measurement period and an idealised frame time. The previous lines-per-second measurement used for top scripts report was inaccurate, since lines executed does not reflect time taken to execute. Also, every fetch of the report would reset all the numbers limiting its usefulness and we weren't even guaranteed to see the top 100. The actual measurement value should be script execution time per frame but XEngine does not work this way. Therefore, we use actual script execution time scaled by the measurement period and an idealised frame time. This is still not ideal but gives reasonable results and allows scripts to be compared. This commit moves script execution time calculations from SceneGraph into IScriptModule implementations.
2012-03-15Fix a problem where multiple near simultaneous calls to llDie() from ↵Justin Clark-Casey (justincc)1-10/+9
multiple scripts in the same linkset can cause unnecessary thread aborts. The first llDie() could lock Scene.m_deleting_scene_object. The second llDie() would then wait at this lock. The first llDie() would go on to remove the second script but always abort it since the second script's WorkItem would not go away. Easiest solution here is to remove the m_deleting_scene_object since it's no longer justified - we no longer lock m_parts but take a copy instead. This also requires an adjustment in XEngine.OnRemoveScript not to use instance.ObjectID instead when firing the OnObjectRemoved event.
2012-03-15Alleviate an issue where calling Thread.Abort() on script WorkItems can fail ↵Justin Clark-Casey (justincc)1-1/+5
to release locks, resulting in a crippled simulator. This seems to be a particular problem with ReaderWriterLockSlim, though other locks can be affected as well. It has been seen to happen when llDie() is called in a linkset running more than one script. Alleviation here means supplying a ScriptInstance.Stop() timeout of 1000ms rather than 0ms, to give events a chance to complete. Also, we check the IsRunning status at the top of the ScriptInstance.EventProcessor() so that another event doesn't start in the mean time. Ultimately, a better solution may have to be found since a long-running event would still exceed the timeout and be aborted.
2012-03-14refactor: rename ScriptInstance.m_CurrentResult to m_CurrentWorkItem to make ↵Justin Clark-Casey (justincc)1-1/+0
it more understandable as to what it is and what it does (hold a thread pool work item for a waiting of in-progress event) Also add other various illustrative comments
2012-03-12Add max thread and min thread information to "xengine status" region console ↵Justin Clark-Casey (justincc)1-0/+2
command
2012-03-08Change "help" to display categories/module list then "help ↵Justin Clark-Casey (justincc)1-7/+7
<category/module>" to display commands in a category. This is to deal with the hundred lines of command splurge when one previously typed "help" Modelled somewhat on the mysql console One can still type help <command> to get per command help at any point. Categories capitalized to avoid conflict with the all-lowercase commands (except for commander system, as of yet). Does not affect command parsing or any other aspects of the console apart from the help system. Backwards compatible with existing modules.
2012-03-06Add sensor, dataserver requests, timer and listener counts to "xengine ↵Justin Clark-Casey (justincc)1-0/+15
status" command. This is for diagnostic purposes.
2012-02-07Add a regression test to compile and start a script. Remove ↵Justin Clark-Casey (justincc)2-22/+97
Path.GetDirectoryName when getting assembly loading path in Compiler.CompileFromDotNetText(). The Path.GetDirectoryName call in Compiler.CompileFromDotNetText is unnecessary since AppDomain.CurrentDomain.BaseDirectory is always a directory. Later path concatenation is already done by Path.Combine() which handles any trailing slash. Removing Path.GetDirectoryName() will not affect the runtime but allows NUnit to work since it doesn't add a trailing slash to AppDomain.CurrentDomain.BaseDirectory.
2012-02-01Lay out script status in property per row format, since getting too long for ↵Justin Clark-Casey (justincc)1-6/+12
console lines.
2012-02-01Add count of events queued for a particular script in "scripts show" console ↵Justin Clark-Casey (justincc)1-4/+9
command
2012-02-01Make script console commands only show for selected region.Justin Clark-Casey (justincc)1-0/+9
2012-02-01Implement "xengine status" console command to show various xengine statsJustin Clark-Casey (justincc)1-4/+28
2012-01-14Extend scripts show command to accept a single item UUID parameter to ↵Justin Clark-Casey (justincc)1-40/+47
display one script's status Usage is now scripts show [<script-item-uuid>]
2011-11-17If the entire simulator is shutting down then don't bother to unload the ↵Justin Clark-Casey (justincc)1-7/+19
scripts from the appdomain in XEngine. All the other actions (script state save, etc.) still occur. This makes shutdown where there are many scripts vastly quicker.
2011-10-27For now, comment out error message on new script engine console commands.Justin Clark-Casey (justincc)1-1/+4
This causes false positives if a simulator has more than 1 region and the current region is 'root' since this sends the command separately to each region and each region has its own XEngine
2011-10-19Extend scripts stop/start/suspend/resume console commands to allow action on ↵Justin Clark-Casey (justincc)1-67/+91
a single script by giving the script item id (which can be found via scripts show). Not an ideal way to do this on a region with many scripts. Needs refinement later.
2011-10-19Add "scripts stop" and "scripts start" console commands.Justin Clark-Casey (justincc)1-2/+48
These will stop all running scripts and start all stopped scripts respectively. A stopped script does not save any events for later processing.
2011-10-19minor: improve command help on scripts suspend/resumeJustin Clark-Casey (justincc)1-2/+5
2011-10-19Fix resume scripts.Justin Clark-Casey (justincc)1-1/+1
On resume, we need to place requeue the script for event processing if there are any events on the queue. Also need to do this under m_Script lock in order to avoid a race
2011-10-19Add "scripts suspend" and "scripts resume" commands.Justin Clark-Casey (justincc)1-1/+49
These aim currently to suspend and resume all scripts. However, resume isn't currently working due to what looks like a bug in resume functionality itself.
2011-10-19on log and "show scripts" messages, show script item UUID rather than asset UUIDJustin Clark-Casey (justincc)1-4/+4
The item ID is the one required for any script manipulation on the command line, so I think it's somewhat more useful to show this bearing in mind the limited space available
2011-10-19add current script status to "scripts show" command (running, suspended, etc.)Justin Clark-Casey (justincc)1-2/+20
2011-10-19Add "show scripts" command to show all scripts currently known to the script ↵Justin Clark-Casey (justincc)1-0/+28
engine in the current region. Also added synonym of "scripts show"
2011-10-14Don't execute rest of code in XEngine.RemoveRegion() and Close() if the ↵Justin Clark-Casey (justincc)1-0/+6
module is disabled.
2011-10-12When shutting down XEngine, log how many scripts are being shutdown so the ↵Justin Clark-Casey (justincc)1-1/+4
user knows why they are waiting.
2011-09-12minor: if the script engine fails to find a prim for a script, also print ↵Justin Clark-Casey (justincc)1-1/+1
out that prim's local id in the error message.
2011-09-09Delay loading scripts until the scene has finished loadingOren Hurvitz1-0/+3
2011-09-01Eliminate pointless checks of SOG.RootPart != nullJustin Clark-Casey (justincc)1-5/+1
It's never possible for SOG to have no RootPart, except in the first few picosends of the big bang when it's pulled from region persistence or deserialized
2011-09-01Remove pointless cluttering SOP.ParentGroup != null checks.Justin Clark-Casey (justincc)1-2/+2
The only times when ParentGroup might be null is during regression tests (which might not be a valid thing) and when scene objects are being constructed from the database. At all other times it's not possible for a SOP not to have a SOG parent.
2011-08-24Fix llAttachToAvatar()Justin Clark-Casey (justincc)1-0/+9
Apart from one obvious bug, this was failing because attempting to serialize the script from inside the script (as part of saving the attachment as an inventory asset) was triggering an extremely long delay. So we now don't do this. The state will be serialized anyway when the avatar normally logs out. The worst that can happen is that if the client/server crashes, the attachment scripts start without previous state.
2011-05-24Create a method to force the script engine to save state from outsideMelanie1-4/+9
2011-05-24Create a method to force the script engine to save state from outsideMelanie1-4/+9
2011-05-21Get rid of OpenSim.Tests.Common.Setup subpackage in favour of just ↵Justin Clark-Casey (justincc)1-1/+0
OpenSim.Tests.Common instead
2011-04-30First stab at cleaning up Caps. Compiles. Untested.Diva Canto1-2/+1
2011-01-08Preserve the script running flag when copying an object.Melanie1-0/+12
2010-10-16Actually set the PrivateBinPath in XEngine so relocating the scriptsMelanie1-3/+3
directory works
2010-09-26Merge MasterMelanie1-7/+14
2010-09-26Add configurable path to script engine assembliesBlueWall1-10/+17
Adding ability to place script engine assemblies outside the codebase directories. Uses new [XEngine] option: ScriptEnginesPath = "path_to_assemblies" Signed-off-by: Melanie <melanie@t-data.com>
2010-09-12Formatting cleanup.Jeff Ames1-1/+1
2010-08-23Remove various warnings and improve logging messages. No functional changes.Justin Clark-Casey (justincc)1-1/+1
2010-08-09For my own sanity, fix a bug in xenginemeta71-1/+2
2010-07-20Fix the XML serializationt to provide an empty script state element ifMelanie1-4/+28
the script hasn't yet saved state, or can't save state because of a loop
2010-07-20Adding it again.Diva Canto1-28/+36
Revert "Reverting this for now, but this needs to go in again." This reverts commit c0d9ab941dd1ab88f00f6d4f2a53a4fe5c605e57.
2010-07-19Reverting this for now, but this needs to go in again.Diva Canto1-36/+28
Revert "Another stab at http://opensimulator.org/mantis/view.php?id=4858. Eliminated more nested locks." This reverts commit ffbae52a130376ecaa04d7d475709985c62c06ed.
2010-07-19Another stab at http://opensimulator.org/mantis/view.php?id=4858. Eliminated ↵Diva Canto1-28/+36
more nested locks.
2010-07-19One more stab at http://opensimulator.org/mantis/view.php?id=4858.Diva Canto1-33/+33
Eliminated the nested locks of m_Scripts and m_PrimObjects.
2010-07-19Revert "A stab in the dark. Revert the compile lockout temporarily. If you ↵Melanie1-20/+20
know what" This reverts commit f798679b8005e532f933553007cca989112f4a1d.