Commit Graph

387 Commits

Author SHA1 Message Date
UbitUmarov
b72676bae9 let osGetRegionStats return a list with all the avaiable values (43 currently) 2021-05-04 20:39:52 +01:00
UbitUmarov
60868fe975 vs2017 debug seems to get very confused with our script class called Timer (run runprebuild) 2021-03-11 23:54:34 +00:00
UbitUmarov
a1239d2706 Yengine: avoid use of Enum.Parse 2020-08-31 18:46:10 +01:00
UbitUmarov
3c3553d5b1 Xengine: cosmetics 2020-08-31 17:37:15 +01:00
UbitUmarov
9aa7f41bca add cap AttachmentResources ( no urls, memory account is per yengine mem usage) 2020-08-23 01:46:34 +01:00
UbitUmarov
16ab72a223 break the top thingies 2020-08-22 17:33:38 +01:00
StolenRuby
2f0d2db19d Top Scripts
Signed-off-by: UbitUmarov <ajlduarte@sapo.pt>
2020-08-22 12:38:35 +01:00
UbitUmarov
be5c2bb212 Xengine: remove option CompactMemOnLoad, that wasn't that good; add option AttachmentsDomainLoading to allow attachments to load on own appdomain even if AppDomainLoading is false. Scripts will be slower, use more memory but will be disposed on avatar leave, if gc is in good mood. This may be usefull on regions with a lot of traffic, sure use Yengine even better, 2020-07-27 16:13:09 +01:00
UbitUmarov
66eb8a2c2e let engines Suspend and resume scripts return false if script not on that engine 2020-05-25 14:41:59 +01:00
UbitUmarov
e87dfd48bf Yengine: we also need to cancel timer events in queue, because some bad scripts that do work on X 2019-11-11 12:51:09 +00:00
UbitUmarov
46e36601cb remove some more useless NULL arguments 2019-10-22 13:04:01 +01:00
Melanie
0fd17c08ae Massive console refactor. Greatly simplify interface. 2019-08-20 23:28:59 +01:00
UbitUmarov
367bd48d91 script mono is meaningless for us 2019-01-25 21:21:23 +00:00
UbitUmarov
707eb8de82 remove more xml things no longer needed on .net >4.5.2 2018-01-17 07:17:24 +00:00
UbitUmarov
ec6f87d3ef disable some XmlResolver 2018-01-04 23:51:43 +00:00
Kevin Cozens
05db0c977f Fixed typo in function name HaveNotifiedLogOfScriptStopMistmatch. 2017-09-04 13:28:31 -04:00
UbitUmarov
289d4ca128 minor cleanup 2017-05-27 05:41:40 +01:00
UbitUmarov
772c5b7db0 move assetsconnector threads to whatchdog; Abort all alive threads known to watchdog before exit 2017-05-25 06:05:02 +01:00
UbitUmarov
928733efc9 please DIE! PLEASE?? 2017-05-23 03:26:32 +01:00
UbitUmarov
7d3cd3dd59 coment out a flodding debug message 2017-01-07 09:02:50 +00:00
Melanie Thielker
d9dba51223 Queue all events for a script that is waiting to compile
This fixes CHANGED_OWNER the right way. It also vastly improves link
message handling during object rez, which was iffy before. Now no
messages are lost anymore.
2017-01-07 00:25:59 +00:00
Melanie Thielker
fa5c47b916 Fix a slew of event like CHANGED_OWNER, attach() etc not working.
Optimization can ba taken too far. Compile scripts synchronously for
interactive rezzing because otherwise all events relating to rezzing/
wearing are lost.
2017-01-06 23:35:39 +00:00
Melanie Thielker
b16abc8166 Massive tab and trailing space cleanup 2017-01-05 19:07:37 +00:00
UbitUmarov
4ebb4e371f prevent self call to llSetScriptState(ownname,FALSE) from blocking entire engine 2016-11-13 19:25:32 +00:00
UbitUmarov
73b20c2ca2 XEngine: make calls to gc.collect on region startup scripts loading a configurable option, since it is very slow operation 2016-11-03 12:58:43 +00:00
UbitUmarov
054cc8f08e Xengine only do GC.Collect if logins disabled 2016-09-01 20:49:07 +01:00
UbitUmarov
96ee7e4c2c Xengine: if option AppDomainLoading = true, create script domains for each SOG (like already done for attachments) and not per script. This should reduce number of domains without excessive problem of deleted scripts still loaded. 2016-08-31 12:03:06 +01:00
UbitUmarov
5afc5fe343 Xengine: try to reduce memory pressure of scripts compile. Still ugly code, possible mistakes, but i need to share it before i loose it :) ) 2016-08-31 09:15:08 +01:00
UbitUmarov
4e1784d069 Xengine: remove a no thread safe locking, don't allocate a few objects only needed if creating a new domain 2016-08-30 08:56:35 +01:00
UbitUmarov
a11edceb00 seems to compile ( tests comented out) 2015-09-02 19:54:53 +01:00
UbitUmarov
371c9dd2af bad merge? 2015-09-01 14:54:35 +01:00
Melanie Thielker
c53f732163 Change the IScriptApi back to it's original form, removing XEngine
specific additions that should not have been there in the first place.
Sleeping and time measurement are now completely internal to XEngine
2015-08-17 21:46:30 +02:00
Oren Hurvitz
59da146e9d When the user stops a script, have it remain stopped
Previously the script state was never saved for a !Running script, so upon region restart the script would be Running again.

The use of the 'StayStopped' flag is needed because all scripts are automatically stopped when the region shuts down, but in that case we shouldn't save in their state that they're !Running.
2015-08-11 08:44:27 +01:00
Oren Hurvitz
a3bed1fbcb Report "Script Execution Time" as the time spent executing the script in the last 30 seconds. Use a sliding window to calculate this.
Notes:
- This metric provides a better indication of which scripts are taking up a lot of CPU (and therefore should be optimized).
- Previously the execution time was reset to 0 in every new measurement period, causing the reported time to fluctuate for no reason. This has been fixed by using a sliding window.
2015-08-11 08:42:26 +01:00
Oren Hurvitz
287096d826 Improved calculation of Script Execution TimeStarted
1. Use a Stopwatch (a high-resolution timer)
2. Whenever we start a new measurement period, zero out the total execution time (previously it just kept accumulating)
3. Changed the measurement period from 30 minutes to 30 seconds. This is much more useful in the "Top Scripts" dialog, as it shows currently active scripts
2015-08-11 07:35:41 +01:00
Oren Hurvitz
7457173fe4 Fixed calling "debug xengine log" without the 'level' parameter: this should show the current log level; not crash 2015-08-11 07:35:38 +01:00
Glenn Martin
1959eb8372 Moved over metrics from previous OpenSim 0.8.0.3 repository (this new repository is now the master branch from OpenSim). 2015-04-21 14:29:17 -04:00
Justin Clark-Casey (justincc)
557b0fae85 minor: correct log message when script with non-config stop strategy is detected to log actual strategy rather than true/false 2015-01-29 18:28:17 +00:00
Justin Clark-Casey (justincc)
cf0087e87c Correct typo in raw default script stop strategy 2015-01-27 21:04:11 +00:00
Justin Clark-Casey (justincc)
e0a3440263 If [XEngine] ScriptStopStrategy is different from a compiled script strategy, ask user to manually set DeleteScriptsOnStartup = true for at least one simuator session rather than auto-recompiling.
This does not work on Windows since the VM retains a handle to the DLL even if class instantiation was unsuccessful.
Which causes deletion of the old DLL to fail with access sharing violations.
Instead, log a warning in this situation asking the user to manually set DeleteScriptsOnStartup = true for a session (or one could separately delete the DLLs in the relevant bin/scriptengines/<region-uuid> dir
For the current session, the script engine will continue using the script compiled stop strategy as before.
Relates to http://opensimulator.org/mantis/view.php?id=7278
2015-01-27 19:07:20 +00:00
Justin Clark-Casey (justincc)
13ba2f2d83 If an exception comes out of DoOnRezScript in DoOnRezScriptQueue(), then only fail a single script rather than halting the exntire script startup process. 2015-01-26 23:32:51 +00:00
Justin Clark-Casey (justincc)
1bed3aff0b On a multi-region simulator when AppDomain = true, make sure the DLL from the appropriate script engines subdir is loaded rather than always that of the first engine to load the DLL.
This resolves a DLL load failure on my Linux box when an attachment script was present on another region before the avatar arrived.
2015-01-26 23:31:46 +00:00
Justin Clark-Casey (justincc)
2995868176 Make XEngine.SaveAllState() actually do this instead of script maintenance 2015-01-17 00:05:13 +00:00
Justin Clark-Casey (justincc)
0eb268e265 minor: remove old commented out objectRemoved bool in XEngine.OnRemoveScript() 2015-01-16 23:59:08 +00:00
Justin Clark-Casey (justincc)
58f7efc41a Add clearqueue code adjustment that should have been in previous commit faaf47a 2015-01-16 23:57:51 +00:00
Justin Clark-Casey (justincc)
faaf47a86f Prevent a race condition between the script engine backup thread and script removal by locking on the script's EventQueue and only proceeding if it's flagged as still running.
Relates to http://opensimulator.org/mantis/view.php?id=7407
2015-01-16 23:55:11 +00:00
Justin Clark-Casey (justincc)
8d724e90de For scripts in attachments, don't save .state files apart from the initial one as these are ignored since .state is saved in the attachment's asset.
This eliminates pointless work and exceptions when an appdomain is unloaded whilst an attachment script state is persisted.
Adds test for this case.
Relates to http://opensimulator.org/mantis/view.php?id=7407
2015-01-16 22:46:48 +00:00
Diva Canto
7466ef0525 This cleans up versioning. Specifically:
- It establishes 4 digits for opensim versions
- It uses the same number between opensim releases and mono addins versions

It also eliminates the last addin.xml files that were still there, for consistency.
2014-12-30 12:53:31 -08:00
Justin Clark-Casey (justincc)
147d401b28 Remove XEngine.m_uniqueScripts
This provides no obvious benefit as far as I can tell but has a definite cost in keep script strings in memory for the entire simulator session.
2014-12-15 20:38:26 +00:00
Justin Clark-Casey (justincc)
2b9f0647de Fix a regression where objects crossing regions in the same simulator (on their own or as attachments) with AppDomainLoading = false would create the new state in the source region area rather than the dest.
This was beause the code was finding the script DLL compiled for the source region as everything is in the same appdomain and using this as the location for the destination script state, etc.
This resolves the regression by passing the proper destination separately from the DLL retrieved.
Probably a regression since commit d7b92604 (11 July 2014).
Added regression test for this case.
At least partly addresses http://opensimulator.org/mantis/view.php?id=7278
2014-12-10 00:25:27 +00:00