aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Replace script-lines-per-second with the script execution time scaled by its ↵Justin Clark-Casey (justincc)2012-03-163-1/+88
| | | | | | | | | | | 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.
* Protect the scriptmodulecomms interface.Mic Bowman2012-03-151-1/+4
|
* Adds a new script command 'modInvoke' to invoke registered functionsMic Bowman2012-03-155-3/+163
| | | | | | | | | from region modules. The LSL translator is extended to generate the modInvoke format of commands for directly inlined function calls. A region module can register a function Test() with the name "Test". LSL code can call that function as "Test()". The compiler will translate that invocation into modInvoke("Test", ...)
* Remove property/field duplication in ScriptInstance where it's unnecessary.Justin Clark-Casey (justincc)2012-03-152-170/+115
|
* Simplify some logic in the ScriptInstance constructor - running is set to ↵Justin Clark-Casey (justincc)2012-03-151-9/+3
| | | | false in both if/else branches
* minor: correct indentation levelsJustin Clark-Casey (justincc)2012-03-151-13/+12
|
* Remove duplication of m_RunEvents and RunningJustin Clark-Casey (justincc)2012-03-151-17/+11
|
* Fix a problem where multiple near simultaneous calls to llDie() from ↵Justin Clark-Casey (justincc)2012-03-151-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.
* Alleviate an issue where calling Thread.Abort() on script WorkItems can fail ↵Justin Clark-Casey (justincc)2012-03-152-4/+15
| | | | | | | | | | 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.
* refactor: rename ScriptInstance.m_CurrentResult to m_CurrentWorkItem to make ↵Justin Clark-Casey (justincc)2012-03-143-25/+50
| | | | | | 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
* Add max thread and min thread information to "xengine status" region console ↵Justin Clark-Casey (justincc)2012-03-122-0/+5
| | | | command
* Added osGetGridGatekeeperURI()Diva Canto2012-03-103-0/+20
|
* Use SP.ParentPart instead of ParentID in places where it's more efficient ↵Justin Clark-Casey (justincc)2012-03-091-17/+7
| | | | | | | (saving extra null checks, etc.) However, it looks like we should retain SP.ParentID since it's much easier to use that in places where another thread could change ParentPart to null. Otherwise one has to clumsily put ParentPart in a reference, etc. to avoid a race.
* FireAndForget scripted rez - port from AvinationMelanie2012-03-091-41/+46
|
* Change "help" to display categories/module list then "help ↵Justin Clark-Casey (justincc)2012-03-081-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.
* Add sensor, dataserver requests, timer and listener counts to "xengine ↵Justin Clark-Casey (justincc)2012-03-066-12/+111
| | | | | | status" command. This is for diagnostic purposes.
* Fix TestSyntaxError() and TestSyntaxErrorDeclaringVariableInForLoop()Justin Clark-Casey (justincc)2012-03-061-8/+14
| | | | | | | They were all failing assertions but the exceptions these threw were caught as expected Exceptions. I don't think we can easily distinguish these from the Exceptions that we're expecting. So for now we'll do some messy manually checking with boolean setting instead. This patch also corrects the assertions themselves.
* Get all test methods in OpenSim.Region.ScriptEngine.Tests.dll to report that ↵Justin Clark-Casey (justincc)2012-03-068-26/+228
| | | | they're running
* Fix off by one error in script error reporting.Justin Clark-Casey (justincc)2012-03-061-1/+1
|
* Move SenseRepeaters.Count check inside the SenseRepeatListLock.Justin Clark-Casey (justincc)2012-03-021-4/+4
| | | | No methods in the List class are thread safe in the MS specification/documentation
* lock SenseRepeatListLock when added a new sensor during script reconstitution.Justin Clark-Casey (justincc)2012-03-021-1/+3
| | | | | This is already being done in the other place where a sensor is added. Adding a sensor whilst another thread is iterating over the sensor list can cause a concurrency exception.
* Adds an OSSL command for regular expression-based string replacement. ParametersMic Bowman2012-03-013-0/+32
| | | | | | are osReplaceString(string source, string patter, string replace, integer count, integer start) The count parameter specifies the total number of replacements to make, -1 makes all replacements.
* Fix indexing on string trimBlueWall2012-03-011-1/+1
| | | | | | Thanks to zadark for pointing this out, smxy for deciphering the ?: operator and Plugh for the fix \o/ yay for IRC
* PRIM_SCULPT_FLAG_INVERT, PRIM_SCULPT_FLAG_MIRROR implementedPixelTomsen2012-02-252-4/+8
| | | | http://opensimulator.org/mantis/view.php?id=5763
* llGetLinkMedia, llSetLinkMedia, llClearLinkMedia implementation mantis: ↵PixelTomsen2012-02-243-27/+105
| | | | http://opensimulator.org/mantis/view.php?id=5756 http://opensimulator.org/mantis/view.php?id=5755 http://opensimulator.org/mantis/view.php?id=5754
* Stop spurious scene loop startup timeout alarms for scenes with many prims.Justin Clark-Casey (justincc)2012-02-241-1/+3
| | | | | | | | On the first frame, all startup scene objects are added to the physics scene. This can cause a considerable delay, so we don't start raising the alarm on scene loop timeouts until the second frame. This commit also slightly changes the behaviour of timeout reporting. Previously, a report was made for the very first timed out thread, ignoring all others until the next watchdog check. Instead, we now report every timed out thread, though we still only do this once no matter how long the timeout.
* In osSetSpeed(), if no avatar for a uuid is found then don't attempt to set ↵Justin Clark-Casey (justincc)2012-02-241-1/+3
| | | | speed.
* llLinkSitTarget implementation http://wiki.secondlife.com/wiki/LlLinkSitTargetPixelTomsen2012-02-243-5/+33
|
* Fix:LINK_ROOT flag for llGetLinkName() by SinglePrimPixelTomsen2012-02-211-1/+1
|
* Make osNpcStopAnimation() call AvatarStopAnimation() rather than ↵Justin Clark-Casey (justincc)2012-02-171-1/+1
| | | | AvatarPlayAnimation()
* Fix some logic mistakes where firstly osNpcCreate() without options was ↵Justin Clark-Casey (justincc)2012-02-162-3/+18
| | | | | | creating npcs sensed as agents and secondly the OS_NPC_SENSE_AS_AGENT option was having the opposite effect. Hopefully makes progress on addressing http://opensimulator.org/mantis/view.php?id=5872
* Fix an npc delete race condition with LSL sensors where an initial presence ↵Justin Clark-Casey (justincc)2012-02-101-9/+20
| | | | | | | check could succeed but then the npc removed before the subequent npc check. The resulting null would cause an exception. We now check for null before looking at SenseAsAgent. Hopefully fixes http://opensimulator.org/mantis/view.php?id=5872
* minor: put in commented out logging statements for future reuseJustin Clark-Casey (justincc)2012-02-091-1/+7
|
* Add a regression test to compile and start a script. Remove ↵Justin Clark-Casey (justincc)2012-02-075-26/+113
| | | | | | | | 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.
* Add missing RCERR_UNKNOWN and RCERR_SIM_PERF_LOW LSL constants that would ↵Justin Clark-Casey (justincc)2012-02-041-0/+2
| | | | eventually be used by llCastRay(), though OpenSim does not use these yet.
* Correct RC_* LSL constants used by llCastRay().Justin Clark-Casey (justincc)2012-02-041-12/+12
| | | | Many thanks to WhiteStar for doing the research on this.
* Merge branch 'master' of melanie@opensimulator.org:/var/git/opensimMelanie2012-02-032-1/+7
|\
| * D'oh - we want to call llGetLinkNumberOfSides() in the LSL_Stub, not ↵Justin Clark-Casey (justincc)2012-02-021-1/+1
| | | | | | | | llGetLinkNumber().
| * Add llGetLinkNumberOfSides to LSL_Stub and ILSL_ApiJustin Clark-Casey (justincc)2012-02-022-1/+7
| | | | | | | | | | It already existed in LSL_Api but it also needs to exist in these two other places for a script to be able to see it. Hopefully resolves http://opensimulator.org/mantis/view.php?id=5489
* | Replace ParcelAccessEntry with a new struct, LandAccessEntry, which moreMelanie2012-02-021-31/+68
|/ | | | | | accurately reflects the data sent by the viewer. Add times bans and the expiration of timed bans. Warning: Contains a Migration (and nuts)
* Lay out script status in property per row format, since getting too long for ↵Justin Clark-Casey (justincc)2012-02-011-6/+12
| | | | console lines.
* Add count of events queued for a particular script in "scripts show" console ↵Justin Clark-Casey (justincc)2012-02-011-4/+9
| | | | command
* Make script console commands only show for selected region.Justin Clark-Casey (justincc)2012-02-011-0/+9
|
* Implement "xengine status" console command to show various xengine statsJustin Clark-Casey (justincc)2012-02-011-4/+28
|
* Fix:llSetText - limited text to a maximum of 254 charsPixelTomsen2012-01-311-3/+3
| | | | | | mantis: http://opensimulator.org/mantis/view.php?id=5867 Signed-off-by: nebadon <michael@osgrid.org>
* Fix llEdgeOfWorld functionality - see mantis ↵Garmin Kawaguichi2012-01-291-1/+1
| | | | | | http://opensimulator.org/mantis/view.php?id=5865 Signed-off-by: nebadon <michael@osgrid.org>
* Add OS_NPC_SENSE_AS_AGENT option to osNpcCreate().Justin Clark-Casey (justincc)2012-01-283-6/+18
| | | | | This allows NPCs to be sensed as agents by LSL sensors rather than as a specific NPC type (which is currently an OpenSimulator-only extension). Wiki doc on this and other recent NPC functions will follow soon
* Increment LPS script stat for OSSL functions that were not already doing thisJustin Clark-Casey (justincc)2012-01-271-2/+41
|
* Implement osIsNpc(key npc):integer. This return TRUE if the given key ↵Justin Clark-Casey (justincc)2012-01-273-0/+29
| | | | belongs to an NPC in the region. FALSE if not or if the NPC module isn't present.
* Merge branch 'master' of ssh://opensimulator.org/var/git/opensimJustin Clark-Casey (justincc)2012-01-274-0/+83
|\