Commit Graph

16656 Commits (d4beb2f5bcc71949c47daefc25d65160423d6cb1)

Author SHA1 Message Date
Justin Clark-Casey (justincc) a4b01ef38a Replace script-lines-per-second with the script execution time scaled by its 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-16 00:34:30 +00:00
Diva Canto 0548eeb571 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-03-15 16:03:33 -07:00
Diva Canto 18d1d6d3b4 More on SLURLs and V3. This is hacky, but it works. Basically, we have to redefine the encoding of HG URLs because the viewer messes them up. Examples of what works and doesn't work:
- secondlife://ucigrid00.nacs.uci.edu|8002/128/128 <-- works throughout the viewer
- secondlife://http|!!ucigrid00.nacs.uci.edu|8002+Test+Zone+1/128/128 <-- works throughout the viewer
- secondlife://http|!!grid.sciencesim.com!grid!hypergrid.php+Yellowstone01+74/128/128 <-- works throughout
- secondlife://http%3A%2F%2Fucigrid00.nacs.uci.edu%3A8002%20UCI%20Central%201/128/128 <-- works in chat, but not as URLs in the webkit
2012-03-15 16:03:09 -07:00
Diva Canto df144eb9e2 Revert "Revert "More hacking around viewer bug""
This reverts commit e5612553ce.
2012-03-15 14:55:25 -07:00
Diva Canto f52917288a These SLURLs are very confusing! -- reverting the revert. Hack is, indeed, needed.
Revert "Revert "Hack around https://jira.secondlife.com/browse/VWR-28570""

This reverts commit 5a9560db28.
2012-03-15 14:54:25 -07:00
Diva Canto 5a9560db28 Revert "Hack around https://jira.secondlife.com/browse/VWR-28570"
This reverts commit 697ac7fd9d.
2012-03-15 14:36:48 -07:00
Diva Canto e5612553ce Revert "More hacking around viewer bug"
This reverts commit 10731732b4.
2012-03-15 14:36:29 -07:00
Mic Bowman 8b5298a62e Protect the scriptmodulecomms interface. 2012-03-15 13:37:43 -07:00
Mic Bowman 402ff75d78 Adds a new script command 'modInvoke' to invoke registered functions
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", ...)
2012-03-15 13:16:02 -07:00
Diva Canto fd4ad82367 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-03-15 11:06:08 -07:00
Diva Canto 10731732b4 More hacking around viewer bug 2012-03-15 11:05:43 -07:00
Diva Canto 697ac7fd9d Hack around https://jira.secondlife.com/browse/VWR-28570 2012-03-15 10:17:02 -07:00
Justin Clark-Casey (justincc) acb1355ff2 Remove property/field duplication in ScriptInstance where it's unnecessary. 2012-03-15 02:02:31 +00:00
Justin Clark-Casey (justincc) 2d32401e23 Simplify some logic in the ScriptInstance constructor - running is set to false in both if/else branches 2012-03-15 01:32:16 +00:00
Justin Clark-Casey (justincc) f0c1746063 minor: correct indentation levels 2012-03-15 01:26:38 +00:00
Justin Clark-Casey (justincc) 5ddda89238 Remove duplication of m_RunEvents and Running 2012-03-15 00:48:44 +00:00
Justin Clark-Casey (justincc) 2f81e53f63 Fix a problem where multiple near simultaneous calls to llDie() from 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-15 00:20:47 +00:00
Justin Clark-Casey (justincc) 12cebb12d5 Alleviate an issue where calling Thread.Abort() on script WorkItems can fail 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-15 00:06:52 +00:00
Diva Canto d6dd3c42d1 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-03-13 20:16:19 -07:00
Diva Canto 479dd65a63 Teleports: bounce off repeated requests of teleporting the same agent. Some scripts do that, and that fails the whole thing. 2012-03-13 20:15:38 -07:00
Diva Canto 5a09572393 Minor sanity check on simulation agent handler (content type) 2012-03-13 20:14:51 -07:00
Justin Clark-Casey (justincc) 95ec96bf86 refactor: rename ScriptInstance.m_CurrentResult to m_CurrentWorkItem to make 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-14 00:29:36 +00:00
Diva Canto 37828c9b9a Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-03-13 08:07:11 -07:00
Diva Canto 4eb2605c79 Datasnapshot: added "secret" to the registration/deregistration query so that data providers can verify authenticity if they want. 2012-03-13 08:06:30 -07:00
Justin Clark-Casey (justincc) 25592bbd85 Add max thread and min thread information to "xengine status" region console command 2012-03-12 21:16:05 +00:00
Robert Adams e0dd38f672 Rename the stream extension method WebUtil.CopyTo() to WebUtil.CopyStream().
.NET 4.0 added the method Stream.CopyTo(stream, bufferSize). For .NET 3.5
and before, WebUtil defined an extension method for Stream with the signature
Stream.CopyTo(stream, maxBytesToCopy). The meaning of the second parameter
is different in the two forms and depending on which compiler and/or
runtime you use, you could get one form or the other. Crashes ensue.
This change renames the WebUtil stream copy method to something that
cannot be confused with the new CopyTo method defined in .NET 4.0.
2012-03-12 10:07:04 -07:00
Melanie 1547fe959e Change OpenSim.ini.example to reflect how to actually enable prim limits,
as opposed to how it was first designed.
2012-03-12 16:06:35 +00:00
Diva Canto 13fb582c12 DataSnapshot: renamed gridserverURL to gatekeeperURL, and normalimzed the capitalization of 'name' to lower case, also in the same <grid> section. 2012-03-12 07:55:17 -07:00
Diva Canto 824eb7ed20 Added osGetGridGatekeeperURI() 2012-03-10 19:51:28 -08:00
Diva Canto 291dc39691 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-03-10 08:09:43 -08:00
Justin Clark-Casey (justincc) 05e821c444 Fix TestSaveOarNoAssets() by not launch a no-assets request on a separate thread.
This was previous behaviour anyway.
2012-03-10 03:11:28 +00:00
Justin Clark-Casey (justincc) 6e26f17923 minor: In IAR save, log when we start adding the control file rather than saying afterwards that we added it. 2012-03-10 02:13:17 +00:00
Justin Clark-Casey (justincc) 5507752dc5 minor: rearrange some save oar messages so they say what they're about to do rather than what they've just done. 2012-03-10 02:11:30 +00:00
Justin Clark-Casey (justincc) 1693799623 On OAR saving, try fetch assets serially rather than firing all the requests at the asset service at once.
This may (or may not) improve reliability for http://opensimulator.org/mantis/view.php?id=5898
Quick tests show that save time is the same.
2012-03-10 02:03:07 +00:00
Justin Clark-Casey (justincc) 3a5928f813 Add satguru and Fernando to contributors 2012-03-10 01:31:27 +00:00
Justin Clark-Casey (justincc) d6ebf2d6ca Add ability to specify a default estate to be used when creating regions.
This is configured in the new [Estates] section of OpenSim.ini.
If a default estate is configured then all new regions are automatically joined to it instead of asking the user.
If the default estate does not already exist then it is created.
Current default behaviour remains the same - the user is asked for estate details when necessary.
Thanks to Frenando Oliveira for the patch which I adapated further.
2012-03-10 01:27:05 +00:00
Mic Bowman 7b8e9d88e3 Serialize all web requests to a particular host:port pair; only applied to the PostToService variants. 2012-03-09 16:53:51 -08:00
Justin Clark-Casey (justincc) bdc968f1fc Factor out common default animations code into SLUtil. LLClientView now makes use of the SLUtil copy via a method rather than each LLClientView loading a separate copy.
As per opensim-users mailing list discussion.
2012-03-09 23:57:24 +00:00
Melanie 5c5a493791 Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim 2012-03-09 22:59:23 +00:00
satguru srivastava 35f2479858 fix for NPC not playing internal animations 2012-03-09 22:58:59 +00:00
Diva Canto a58152bd2a More on inventory transfer hold ups:
- Added an inventory cache for caching root and system folders
- Synchronized the remote inventory connector, so that all the remote inventory calls are serialized
This will not make much difference in the hold ups. We'd have to move the FireAndForget high up to AddInventoryItem, but that opens up a can of worms regarding the notification of the recipient... the recipient would be notified of the offer before the items are effectively in his inventory, which could lead to surprises.
2012-03-09 12:59:24 -08:00
Diva Canto 81869c4a3f More on HG inventory transfers. Move the FireAndForget higher up. 2012-03-09 09:48:12 -08:00
Diva Canto f545d669de Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-03-08 19:32:21 -08:00
Diva Canto 7db5ba7702 More on the freeze on HG inventory transfers: spawn a threadlet on the functional asset posts so that the client threads doesn't freeze (but the network posts are serialized). 2012-03-08 19:31:53 -08:00
Justin Clark-Casey (justincc) 06dda14505 Simplify minimap coarse location code by just reference SP.AbsolutePosition
This is rather than checking whether the avatar is sitting and doing its own calculation.
2012-03-09 02:50:57 +00:00
Justin Clark-Casey (justincc) 205c36d3a4 Get rid of unnecessary ParentID == 0 check on SP.Get_AbsolutePosition since this is handled by the necessary ParentPart check 2012-03-09 02:44:08 +00:00
Justin Clark-Casey (justincc) 94e58ff6b9 Use SP.ParentPart instead of ParentID in places where it's more efficient (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.
2012-03-09 02:38:11 +00:00
Justin Clark-Casey (justincc) b454326273 refactor: cleanup SP.HandleAgentSit so that everything is done within one if (part != null), rather than having unnecessary multiple checks 2012-03-09 02:33:48 +00:00
Diva Canto c22446ede0 Merge branch 'master' of ssh://opensimulator.org/var/git/opensim 2012-03-08 18:29:08 -08:00
Diva Canto 8a34d1b710 HG inventory/asset transfers: serialize asset posts. I'm using the same pattern as suggested in the patch mantis #5921. Testing it in this smaller context to see how it works. 2012-03-08 18:28:46 -08:00