aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
authorMcCabe Maxsted2011-02-10 11:33:32 -0700
committerMcCabe Maxsted2011-02-10 11:33:32 -0700
commit77d16777c448cc4e09e0ddb1408260044f925c0b (patch)
tree74d6ab3e3a07b673698b760916c9212d69deaff6 /linden/indra
parentUse gstreamer plugin for windows audio mime types (diff)
downloadmeta-impy-77d16777c448cc4e09e0ddb1408260044f925c0b.zip
meta-impy-77d16777c448cc4e09e0ddb1408260044f925c0b.tar.gz
meta-impy-77d16777c448cc4e09e0ddb1408260044f925c0b.tar.bz2
meta-impy-77d16777c448cc4e09e0ddb1408260044f925c0b.tar.xz
Patch by Armin to split apart the 'Plugin' logcontrol.xml entry to avoid spam when debugging plugins
Diffstat (limited to '')
-rwxr-xr-xlinden/indra/llplugin/llpluginclassmedia.cpp34
-rwxr-xr-xlinden/indra/llplugin/llplugininstance.cpp24
-rwxr-xr-xlinden/indra/llplugin/llpluginmessagepipe.cpp26
-rwxr-xr-xlinden/indra/llplugin/llpluginprocesschild.cpp56
-rwxr-xr-xlinden/indra/llplugin/llpluginprocessparent.cpp68
-rw-r--r--linden/indra/newview/app_settings/logcontrol.xml10
-rw-r--r--linden/indra/newview/llviewermedia.cpp4
7 files changed, 115 insertions, 107 deletions
diff --git a/linden/indra/llplugin/llpluginclassmedia.cpp b/linden/indra/llplugin/llpluginclassmedia.cpp
index 85241be..5a81c46 100755
--- a/linden/indra/llplugin/llpluginclassmedia.cpp
+++ b/linden/indra/llplugin/llpluginclassmedia.cpp
@@ -72,10 +72,10 @@ LLPluginClassMedia::~LLPluginClassMedia()
72} 72}
73 73
74bool LLPluginClassMedia::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug) 74bool LLPluginClassMedia::init(const std::string &launcher_filename, const std::string &plugin_filename, bool debug)
75{ 75{
76 LL_DEBUGS("Plugin") << "launcher: " << launcher_filename << LL_ENDL; 76 LL_DEBUGS("PluginClassMedia") << "launcher: " << launcher_filename << LL_ENDL;
77 LL_DEBUGS("Plugin") << "plugin: " << plugin_filename << LL_ENDL; 77 LL_DEBUGS("PluginClassMedia") << "plugin: " << plugin_filename << LL_ENDL;
78 78
79 mPlugin = new LLPluginProcessParent(this); 79 mPlugin = new LLPluginProcessParent(this);
80 mPlugin->setSleepTime(mSleepTime); 80 mPlugin->setSleepTime(mSleepTime);
81 81
@@ -198,7 +198,7 @@ void LLPluginClassMedia::idle(void)
198 } 198 }
199 else 199 else
200 { 200 {
201 LL_WARNS("Plugin") << "Unable to pad texture width, padding size " << mPadding << "is not a multiple of pixel size " << mRequestedTextureDepth << LL_ENDL; 201 LL_WARNS("PluginClassMedia") << "Unable to pad texture width, padding size " << mPadding << "is not a multiple of pixel size " << mRequestedTextureDepth << LL_ENDL;
202 } 202 }
203 } 203 }
204 } 204 }
@@ -256,11 +256,11 @@ void LLPluginClassMedia::idle(void)
256 message.setValueReal("background_b", mBackgroundColor.mV[VZ]); 256 message.setValueReal("background_b", mBackgroundColor.mV[VZ]);
257 message.setValueReal("background_a", mBackgroundColor.mV[VW]); 257 message.setValueReal("background_a", mBackgroundColor.mV[VW]);
258 mPlugin->sendMessage(message); // DO NOT just use sendMessage() here -- we want this to jump ahead of the queue. 258 mPlugin->sendMessage(message); // DO NOT just use sendMessage() here -- we want this to jump ahead of the queue.
259 259
260 LL_DEBUGS("Plugin") << "Sending size_change" << LL_ENDL; 260 LL_DEBUGS("PluginClassMedia") << "Sending size_change" << LL_ENDL;
261 } 261 }
262 } 262 }
263 263
264 if(mPlugin && mPlugin->isRunning()) 264 if(mPlugin && mPlugin->isRunning())
265 { 265 {
266 // Send queued messages 266 // Send queued messages
@@ -777,7 +777,7 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
777 mDirtyRect.unionWith(newDirtyRect); 777 mDirtyRect.unionWith(newDirtyRect);
778 } 778 }
779 779
780 LL_DEBUGS("Plugin") << "adjusted incoming rect is: (" 780 LL_DEBUGS("PluginClassMedia") << "adjusted incoming rect is: ("
781 << newDirtyRect.mLeft << ", " 781 << newDirtyRect.mLeft << ", "
782 << newDirtyRect.mTop << ", " 782 << newDirtyRect.mTop << ", "
783 << newDirtyRect.mRight << ", " 783 << newDirtyRect.mRight << ", "
@@ -841,9 +841,9 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
841 else if(message_name == "media_status") 841 else if(message_name == "media_status")
842 { 842 {
843 std::string status = message.getValue("status"); 843 std::string status = message.getValue("status");
844 844
845 LL_DEBUGS("Plugin") << "Status changed to: " << status << LL_ENDL; 845 LL_DEBUGS("PluginClassMedia") << "Status changed to: " << status << LL_ENDL;
846 846
847 if(status == "loading") 847 if(status == "loading")
848 { 848 {
849 mStatus = LLPluginClassMediaOwner::MEDIA_LOADING; 849 mStatus = LLPluginClassMediaOwner::MEDIA_LOADING;
@@ -933,7 +933,7 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
933 } 933 }
934 else 934 else
935 { 935 {
936 LL_WARNS("Plugin") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL; 936 LL_WARNS("PluginClassMedia") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL;
937 } 937 }
938 } 938 }
939 else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER) 939 else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_BROWSER)
@@ -990,7 +990,7 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
990 } 990 }
991 else 991 else
992 { 992 {
993 LL_WARNS("Plugin") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL; 993 LL_WARNS("PluginClassMedia") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL;
994 } 994 }
995 } 995 }
996 else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME) 996 else if(message_class == LLPLUGIN_MESSAGE_CLASS_MEDIA_TIME)
@@ -1001,9 +1001,9 @@ void LLPluginClassMedia::receivePluginMessage(const LLPluginMessage &message)
1001// if(message_name == "message_name") 1001// if(message_name == "message_name")
1002// { 1002// {
1003// } 1003// }
1004// else 1004// else
1005 { 1005 {
1006 LL_WARNS("Plugin") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL; 1006 LL_WARNS("PluginClassMedia") << "Unknown " << message_name << " class message: " << message_name << LL_ENDL;
1007 } 1007 }
1008 } 1008 }
1009 1009
@@ -1230,6 +1230,6 @@ void LLPluginClassMedia::initializeUrlHistory(const LLSD& url_history)
1230 message.setValueLLSD("history", url_history); 1230 message.setValueLLSD("history", url_history);
1231 sendMessage(message); 1231 sendMessage(message);
1232 1232
1233 LL_DEBUGS("Plugin") << "Sending history" << LL_ENDL; 1233 LL_DEBUGS("PluginClassMedia") << "Sending history" << LL_ENDL;
1234} 1234}
1235 1235
diff --git a/linden/indra/llplugin/llplugininstance.cpp b/linden/indra/llplugin/llplugininstance.cpp
index b822b9e..fd1c3c1 100755
--- a/linden/indra/llplugin/llplugininstance.cpp
+++ b/linden/indra/llplugin/llplugininstance.cpp
@@ -92,10 +92,10 @@ int LLPluginInstance::load(std::string &plugin_file)
92 char buf[1024]; 92 char buf[1024];
93 apr_dso_error(mDSOHandle, buf, sizeof(buf)); 93 apr_dso_error(mDSOHandle, buf, sizeof(buf));
94 94
95 LL_WARNS("Plugin") << "apr_dso_load of " << plugin_file << " failed with error " << result << " , additional info string: " << buf << LL_ENDL; 95 LL_WARNS("PluginInstance") << "apr_dso_load of " << plugin_file << " failed with error " << result << " , additional info string: " << buf << LL_ENDL;
96 96
97 } 97 }
98 98
99 if(result == APR_SUCCESS) 99 if(result == APR_SUCCESS)
100 { 100 {
101 result = apr_dso_sym((apr_dso_handle_sym_t*)&init_function, 101 result = apr_dso_sym((apr_dso_handle_sym_t*)&init_function,
@@ -104,20 +104,20 @@ int LLPluginInstance::load(std::string &plugin_file)
104 104
105 if(result != APR_SUCCESS) 105 if(result != APR_SUCCESS)
106 { 106 {
107 LL_WARNS("Plugin") << "apr_dso_sym failed with error " << result << LL_ENDL; 107 LL_WARNS("PluginInstance") << "apr_dso_sym failed with error " << result << LL_ENDL;
108 } 108 }
109 } 109 }
110 110
111 if(result == APR_SUCCESS) 111 if(result == APR_SUCCESS)
112 { 112 {
113 result = init_function(staticReceiveMessage, (void*)this, &mPluginSendMessageFunction, &mPluginUserData); 113 result = init_function(staticReceiveMessage, (void*)this, &mPluginSendMessageFunction, &mPluginUserData);
114 114
115 if(result != APR_SUCCESS) 115 if(result != APR_SUCCESS)
116 { 116 {
117 LL_WARNS("Plugin") << "call to init function failed with error " << result << LL_ENDL; 117 LL_WARNS("PluginInstance") << "call to init function failed with error " << result << LL_ENDL;
118 } 118 }
119 } 119 }
120 120
121 return (int)result; 121 return (int)result;
122} 122}
123 123
@@ -130,12 +130,12 @@ void LLPluginInstance::sendMessage(const std::string &message)
130{ 130{
131 if(mPluginSendMessageFunction) 131 if(mPluginSendMessageFunction)
132 { 132 {
133 LL_DEBUGS("Plugin") << "sending message to plugin: \"" << message << "\"" << LL_ENDL; 133 LL_DEBUGS("PluginInstance") << "sending message to plugin: \"" << message << "\"" << LL_ENDL;
134 mPluginSendMessageFunction(message.c_str(), &mPluginUserData); 134 mPluginSendMessageFunction(message.c_str(), &mPluginUserData);
135 } 135 }
136 else 136 else
137 { 137 {
138 LL_WARNS("Plugin") << "dropping message: \"" << message << "\"" << LL_ENDL; 138 LL_WARNS("PluginInstance") << "dropping message: \"" << message << "\"" << LL_ENDL;
139 } 139 }
140} 140}
141 141
@@ -165,11 +165,11 @@ void LLPluginInstance::receiveMessage(const char *message_string)
165{ 165{
166 if(mOwner) 166 if(mOwner)
167 { 167 {
168 LL_DEBUGS("Plugin") << "processing incoming message: \"" << message_string << "\"" << LL_ENDL; 168 LL_DEBUGS("PluginInstance") << "processing incoming message: \"" << message_string << "\"" << LL_ENDL;
169 mOwner->receivePluginMessage(message_string); 169 mOwner->receivePluginMessage(message_string);
170 } 170 }
171 else 171 else
172 { 172 {
173 LL_WARNS("Plugin") << "dropping incoming message: \"" << message_string << "\"" << LL_ENDL; 173 LL_WARNS("PluginInstance") << "dropping incoming message: \"" << message_string << "\"" << LL_ENDL;
174 } 174 }
175} 175}
diff --git a/linden/indra/llplugin/llpluginmessagepipe.cpp b/linden/indra/llplugin/llpluginmessagepipe.cpp
index 8168b32..26cc9c0 100755
--- a/linden/indra/llplugin/llpluginmessagepipe.cpp
+++ b/linden/indra/llplugin/llpluginmessagepipe.cpp
@@ -82,10 +82,10 @@ bool LLPluginMessagePipeOwner::writeMessageRaw(const std::string &message)
82 } 82 }
83 else 83 else
84 { 84 {
85 LL_WARNS("Plugin") << "dropping message: " << message << LL_ENDL; 85 LL_WARNS("PluginPipe") << "dropping message: " << message << LL_ENDL;
86 result = false; 86 result = false;
87 } 87 }
88 88
89 return result; 89 return result;
90} 90}
91 91
@@ -179,18 +179,18 @@ bool LLPluginMessagePipe::pumpOutput()
179 { 179 {
180 // write any outgoing messages 180 // write any outgoing messages
181 size = (apr_size_t)mOutput.size(); 181 size = (apr_size_t)mOutput.size();
182 182
183 setSocketTimeout(0); 183 setSocketTimeout(0);
184 184
185// LL_INFOS("Plugin") << "before apr_socket_send, size = " << size << LL_ENDL; 185// LL_INFOS("PluginPipe") << "before apr_socket_send, size = " << size << LL_ENDL;
186 186
187 status = apr_socket_send( 187 status = apr_socket_send(
188 mSocket->getSocket(), 188 mSocket->getSocket(),
189 (const char*)mOutput.data(), 189 (const char*)mOutput.data(),
190 &size); 190 &size);
191 191
192// LL_INFOS("Plugin") << "after apr_socket_send, size = " << size << LL_ENDL; 192// LL_INFOS("PluginPipe") << "after apr_socket_send, size = " << size << LL_ENDL;
193 193
194 if(status == APR_SUCCESS) 194 if(status == APR_SUCCESS)
195 { 195 {
196 // success 196 // success
@@ -277,15 +277,15 @@ bool LLPluginMessagePipe::pumpInput(F64 timeout)
277 { 277 {
278 size = request_size; 278 size = request_size;
279 279
280// LL_INFOS("Plugin") << "before apr_socket_recv, size = " << size << LL_ENDL; 280// LL_INFOS("PluginPipe") << "before apr_socket_recv, size = " << size << LL_ENDL;
281 281
282 status = apr_socket_recv( 282 status = apr_socket_recv(
283 mSocket->getSocket(), 283 mSocket->getSocket(),
284 input_buf, 284 input_buf,
285 &size); 285 &size);
286 286
287// LL_INFOS("Plugin") << "after apr_socket_recv, size = " << size << LL_ENDL; 287// LL_INFOS("PluginPipe") << "after apr_socket_recv, size = " << size << LL_ENDL;
288 288
289 if(size > 0) 289 if(size > 0)
290 { 290 {
291 LLMutexLock lock(&mInputMutex); 291 LLMutexLock lock(&mInputMutex);
@@ -379,7 +379,7 @@ void LLPluginMessagePipe::processInput(void)
379 } 379 }
380 else 380 else
381 { 381 {
382 LL_WARNS("Plugin") << "!mOwner" << LL_ENDL; 382 LL_WARNS("PluginPipe") << "!mOwner" << LL_ENDL;
383 } 383 }
384 } 384 }
385 mInputMutex.unlock(); 385 mInputMutex.unlock();
diff --git a/linden/indra/llplugin/llpluginprocesschild.cpp b/linden/indra/llplugin/llpluginprocesschild.cpp
index 8dbf2b3..c8b97b1 100755
--- a/linden/indra/llplugin/llpluginprocesschild.cpp
+++ b/linden/indra/llplugin/llpluginprocesschild.cpp
@@ -94,18 +94,18 @@ void LLPluginProcessChild::idle(void)
94 } 94 }
95 else if(mSocketError != APR_SUCCESS) 95 else if(mSocketError != APR_SUCCESS)
96 { 96 {
97 LL_INFOS("Plugin") << "message pipe is in error state (" << mSocketError << "), moving to STATE_ERROR"<< LL_ENDL; 97 LL_INFOS("PluginChild") << "message pipe is in error state (" << mSocketError << "), moving to STATE_ERROR"<< LL_ENDL;
98 setState(STATE_ERROR); 98 setState(STATE_ERROR);
99 } 99 }
100 100
101 if((mState > STATE_INITIALIZED) && (mMessagePipe == NULL)) 101 if((mState > STATE_INITIALIZED) && (mMessagePipe == NULL))
102 { 102 {
103 // The pipe has been closed -- we're done. 103 // The pipe has been closed -- we're done.
104 // TODO: This could be slightly more subtle, but I'm not sure it needs to be. 104 // TODO: This could be slightly more subtle, but I'm not sure it needs to be.
105 LL_INFOS("Plugin") << "message pipe went away, moving to STATE_ERROR"<< LL_ENDL; 105 LL_INFOS("PluginChild") << "message pipe went away, moving to STATE_ERROR"<< LL_ENDL;
106 setState(STATE_ERROR); 106 setState(STATE_ERROR);
107 } 107 }
108 108
109 // If a state needs to go directly to another state (as a performance enhancement), it can set idle_again to true after calling setState(). 109 // If a state needs to go directly to another state (as a performance enhancement), it can set idle_again to true after calling setState().
110 // USE THIS CAREFULLY, since it can starve other code. Specifically make sure there's no way to get into a closed cycle and never return. 110 // USE THIS CAREFULLY, since it can starve other code. Specifically make sure there's no way to get into a closed cycle and never return.
111 // When in doubt, don't do it. 111 // When in doubt, don't do it.
@@ -291,17 +291,17 @@ void LLPluginProcessChild::sendMessageToPlugin(const LLPluginMessage &message)
291 if (mInstance) 291 if (mInstance)
292 { 292 {
293 std::string buffer = message.generate(); 293 std::string buffer = message.generate();
294 294
295 LL_DEBUGS("Plugin") << "Sending to plugin: " << buffer << LL_ENDL; 295 LL_DEBUGS("PluginChild") << "Sending to plugin: " << buffer << LL_ENDL;
296 LLTimer elapsed; 296 LLTimer elapsed;
297 297
298 mInstance->sendMessage(buffer); 298 mInstance->sendMessage(buffer);
299 299
300 mCPUElapsed += elapsed.getElapsedTimeF64(); 300 mCPUElapsed += elapsed.getElapsedTimeF64();
301 } 301 }
302 else 302 else
303 { 303 {
304 LL_WARNS("Plugin") << "mInstance == NULL" << LL_ENDL; 304 LL_WARNS("PluginChild") << "mInstance == NULL" << LL_ENDL;
305 } 305 }
306} 306}
307 307
@@ -309,7 +309,7 @@ void LLPluginProcessChild::sendMessageToParent(const LLPluginMessage &message)
309{ 309{
310 std::string buffer = message.generate(); 310 std::string buffer = message.generate();
311 311
312 LL_DEBUGS("Plugin") << "Sending to parent: " << buffer << LL_ENDL; 312 LL_DEBUGS("PluginChild") << "Sending to parent: " << buffer << LL_ENDL;
313 313
314 writeMessageRaw(buffer); 314 writeMessageRaw(buffer);
315} 315}
@@ -318,7 +318,7 @@ void LLPluginProcessChild::receiveMessageRaw(const std::string &message)
318{ 318{
319 // Incoming message from the TCP Socket 319 // Incoming message from the TCP Socket
320 320
321 LL_DEBUGS("Plugin") << "Received from parent: " << message << LL_ENDL; 321 LL_DEBUGS("PluginChild") << "Received from parent: " << message << LL_ENDL;
322 322
323 // Decode this message 323 // Decode this message
324 LLPluginMessage parsed; 324 LLPluginMessage parsed;
@@ -365,7 +365,7 @@ void LLPluginProcessChild::receiveMessageRaw(const std::string &message)
365 if(iter != mSharedMemoryRegions.end()) 365 if(iter != mSharedMemoryRegions.end())
366 { 366 {
367 // Need to remove the old region first 367 // Need to remove the old region first
368 LL_WARNS("Plugin") << "Adding a duplicate shared memory segment!" << LL_ENDL; 368 LL_WARNS("PluginChild") << "Adding a duplicate shared memory segment!" << LL_ENDL;
369 } 369 }
370 else 370 else
371 { 371 {
@@ -392,7 +392,7 @@ void LLPluginProcessChild::receiveMessageRaw(const std::string &message)
392 } 392 }
393 else 393 else
394 { 394 {
395 LL_WARNS("Plugin") << "Couldn't create a shared memory segment!" << LL_ENDL; 395 LL_WARNS("PluginChild") << "Couldn't create a shared memory segment!" << LL_ENDL;
396 delete region; 396 delete region;
397 } 397 }
398 } 398 }
@@ -411,7 +411,7 @@ void LLPluginProcessChild::receiveMessageRaw(const std::string &message)
411 } 411 }
412 else 412 else
413 { 413 {
414 LL_WARNS("Plugin") << "shm_remove for unknown memory segment!" << LL_ENDL; 414 LL_WARNS("PluginChild") << "shm_remove for unknown memory segment!" << LL_ENDL;
415 } 415 }
416 } 416 }
417 else if(message_name == "sleep_time") 417 else if(message_name == "sleep_time")
@@ -421,12 +421,12 @@ void LLPluginProcessChild::receiveMessageRaw(const std::string &message)
421 else if(message_name == "crash") 421 else if(message_name == "crash")
422 { 422 {
423 // Crash the plugin 423 // Crash the plugin
424 LL_ERRS("Plugin") << "Plugin crash requested." << LL_ENDL; 424 LL_ERRS("PluginChild") << "Plugin crash requested." << LL_ENDL;
425 } 425 }
426 else if(message_name == "hang") 426 else if(message_name == "hang")
427 { 427 {
428 // Hang the plugin 428 // Hang the plugin
429 LL_WARNS("Plugin") << "Plugin hang requested." << LL_ENDL; 429 LL_WARNS("PluginChild") << "Plugin hang requested." << LL_ENDL;
430 while(1) 430 while(1)
431 { 431 {
432 // wheeeeeeeee...... 432 // wheeeeeeeee......
@@ -434,7 +434,7 @@ void LLPluginProcessChild::receiveMessageRaw(const std::string &message)
434 } 434 }
435 else 435 else
436 { 436 {
437 LL_WARNS("Plugin") << "Unknown internal message from parent: " << message_name << LL_ENDL; 437 LL_WARNS("PluginChild") << "Unknown internal message from parent: " << message_name << LL_ENDL;
438 } 438 }
439 } 439 }
440 } 440 }
@@ -449,17 +449,17 @@ void LLPluginProcessChild::receiveMessageRaw(const std::string &message)
449 } 449 }
450} 450}
451 451
452/* virtual */ 452/* virtual */
453void LLPluginProcessChild::receivePluginMessage(const std::string &message) 453void LLPluginProcessChild::receivePluginMessage(const std::string &message)
454{ 454{
455 LL_DEBUGS("Plugin") << "Received from plugin: " << message << LL_ENDL; 455 LL_DEBUGS("PluginChild") << "Received from plugin: " << message << LL_ENDL;
456 456
457 if(mBlockingRequest) 457 if(mBlockingRequest)
458 { 458 {
459 // 459 //
460 LL_ERRS("Plugin") << "Can't send a message while already waiting on a blocking request -- aborting!" << LL_ENDL; 460 LL_ERRS("PluginChild") << "Can't send a message while already waiting on a blocking request -- aborting!" << LL_ENDL;
461 } 461 }
462 462
463 // Incoming message from the plugin instance 463 // Incoming message from the plugin instance
464 bool passMessage = true; 464 bool passMessage = true;
465 465
@@ -523,18 +523,18 @@ void LLPluginProcessChild::receivePluginMessage(const std::string &message)
523 } 523 }
524 else 524 else
525 { 525 {
526 LL_WARNS("Plugin") << "shm_remove_response for unknown memory segment!" << LL_ENDL; 526 LL_WARNS("PluginChild") << "shm_remove_response for unknown memory segment!" << LL_ENDL;
527 } 527 }
528 } 528 }
529 } 529 }
530 } 530 }
531 531
532 if(passMessage) 532 if(passMessage)
533 { 533 {
534 LL_DEBUGS("Plugin") << "Passing through to parent: " << message << LL_ENDL; 534 LL_DEBUGS("PluginChild") << "Passing through to parent: " << message << LL_ENDL;
535 writeMessageRaw(message); 535 writeMessageRaw(message);
536 } 536 }
537 537
538 while(mBlockingRequest) 538 while(mBlockingRequest)
539 { 539 {
540 // The plugin wants to block and wait for a response to this message. 540 // The plugin wants to block and wait for a response to this message.
@@ -552,8 +552,8 @@ void LLPluginProcessChild::receivePluginMessage(const std::string &message)
552 552
553void LLPluginProcessChild::setState(EState state) 553void LLPluginProcessChild::setState(EState state)
554{ 554{
555 LL_DEBUGS("Plugin") << "setting state to " << state << LL_ENDL; 555 LL_DEBUGS("PluginChild") << "setting state to " << state << LL_ENDL;
556 mState = state; 556 mState = state;
557}; 557};
558 558
559void LLPluginProcessChild::deliverQueuedMessages() 559void LLPluginProcessChild::deliverQueuedMessages()
diff --git a/linden/indra/llplugin/llpluginprocessparent.cpp b/linden/indra/llplugin/llpluginprocessparent.cpp
index 8fd18ef..ecb2262 100755
--- a/linden/indra/llplugin/llpluginprocessparent.cpp
+++ b/linden/indra/llplugin/llpluginprocessparent.cpp
@@ -119,7 +119,7 @@ LLPluginProcessParent::LLPluginProcessParent(LLPluginProcessParentOwner *owner):
119 119
120LLPluginProcessParent::~LLPluginProcessParent() 120LLPluginProcessParent::~LLPluginProcessParent()
121{ 121{
122 LL_DEBUGS("Plugin") << "destructor" << LL_ENDL; 122 LL_DEBUGS("PluginParent") << "destructor" << LL_ENDL;
123 123
124 // Remove from the global list before beginning destruction. 124 // Remove from the global list before beginning destruction.
125 { 125 {
@@ -264,10 +264,10 @@ void LLPluginProcessParent::idle(void)
264 else if(mSocketError != APR_SUCCESS) 264 else if(mSocketError != APR_SUCCESS)
265 { 265 {
266 // The socket is in an error state -- the plugin is gone. 266 // The socket is in an error state -- the plugin is gone.
267 LL_WARNS("Plugin") << "Socket hit an error state (" << mSocketError << ")" << LL_ENDL; 267 LL_WARNS("PluginParent") << "Socket hit an error state (" << mSocketError << ")" << LL_ENDL;
268 errorState(); 268 errorState();
269 } 269 }
270 } 270 }
271 271
272 // If a state needs to go directly to another state (as a performance enhancement), it can set idle_again to true after calling setState(). 272 // If a state needs to go directly to another state (as a performance enhancement), it can set idle_again to true after calling setState().
273 // USE THIS CAREFULLY, since it can starve other code. Specifically make sure there's no way to get into a closed cycle and never return. 273 // USE THIS CAREFULLY, since it can starve other code. Specifically make sure there's no way to get into a closed cycle and never return.
@@ -327,15 +327,15 @@ void LLPluginProcessParent::idle(void)
327 327
328 if(mBoundPort == 0) 328 if(mBoundPort == 0)
329 { 329 {
330 LL_WARNS("Plugin") << "Bound port number unknown, bailing out." << LL_ENDL; 330 LL_WARNS("PluginParent") << "Bound port number unknown, bailing out." << LL_ENDL;
331 331
332 killSockets(); 332 killSockets();
333 errorState(); 333 errorState();
334 break; 334 break;
335 } 335 }
336 } 336 }
337 337
338 LL_DEBUGS("Plugin") << "Bound tcp socket to port: " << addr->port << LL_ENDL; 338 LL_DEBUGS("PluginParent") << "Bound tcp socket to port: " << addr->port << LL_ENDL;
339 339
340 // Make the listen socket non-blocking 340 // Make the listen socket non-blocking
341 status = apr_socket_opt_set(mListenSocket->getSocket(), APR_SO_NONBLOCK, 1); 341 status = apr_socket_opt_set(mListenSocket->getSocket(), APR_SO_NONBLOCK, 1);
@@ -458,8 +458,8 @@ void LLPluginProcessParent::idle(void)
458 break; 458 break;
459 459
460 case STATE_HELLO: 460 case STATE_HELLO:
461 LL_DEBUGS("Plugin") << "received hello message" << LL_ENDL; 461 LL_DEBUGS("PluginParent") << "received hello message" << LL_ENDL;
462 462
463 // Send the message to load the plugin 463 // Send the message to load the plugin
464 { 464 {
465 LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "load_plugin"); 465 LLPluginMessage message(LLPLUGIN_MESSAGE_CLASS_INTERNAL, "load_plugin");
@@ -492,7 +492,7 @@ void LLPluginProcessParent::idle(void)
492 } 492 }
493 else if(pluginLockedUp()) 493 else if(pluginLockedUp())
494 { 494 {
495 LL_WARNS("Plugin") << "timeout in exiting state, bailing out" << LL_ENDL; 495 LL_WARNS("PluginParent") << "timeout in exiting state, bailing out" << LL_ENDL;
496 errorState(); 496 errorState();
497 } 497 }
498 break; 498 break;
@@ -589,11 +589,11 @@ void LLPluginProcessParent::sendMessage(const LLPluginMessage &message)
589 // reset the heartbeat timer, since there will have been no heartbeats while the plugin was blocked. 589 // reset the heartbeat timer, since there will have been no heartbeats while the plugin was blocked.
590 mHeartbeat.setTimerExpirySec(mPluginLockupTimeout); 590 mHeartbeat.setTimerExpirySec(mPluginLockupTimeout);
591 } 591 }
592 592
593 std::string buffer = message.generate(); 593 std::string buffer = message.generate();
594 LL_DEBUGS("Plugin") << "Sending: " << buffer << LL_ENDL; 594 LL_DEBUGS("PluginParent") << "Sending: " << buffer << LL_ENDL;
595 writeMessageRaw(buffer); 595 writeMessageRaw(buffer);
596 596
597 // Try to send message immediately. 597 // Try to send message immediately.
598 if(mMessagePipe) 598 if(mMessagePipe)
599 { 599 {
@@ -851,8 +851,8 @@ void LLPluginProcessParent::servicePoll()
851 851
852void LLPluginProcessParent::receiveMessageRaw(const std::string &message) 852void LLPluginProcessParent::receiveMessageRaw(const std::string &message)
853{ 853{
854 LL_DEBUGS("Plugin") << "Received: " << message << LL_ENDL; 854 LL_DEBUGS("PluginParent") << "Received: " << message << LL_ENDL;
855 855
856 LLPluginMessage parsed; 856 LLPluginMessage parsed;
857 if(parsed.parse(message) != -1) 857 if(parsed.parse(message) != -1)
858 { 858 {
@@ -918,19 +918,19 @@ void LLPluginProcessParent::receiveMessage(const LLPluginMessage &message)
918 } 918 }
919 else 919 else
920 { 920 {
921 LL_WARNS("Plugin") << "received hello message in wrong state -- bailing out" << LL_ENDL; 921 LL_WARNS("PluginParent") << "received hello message in wrong state -- bailing out" << LL_ENDL;
922 errorState(); 922 errorState();
923 } 923 }
924 924
925 } 925 }
926 else if(message_name == "load_plugin_response") 926 else if(message_name == "load_plugin_response")
927 { 927 {
928 if(mState == STATE_LOADING) 928 if(mState == STATE_LOADING)
929 { 929 {
930 // Plugin has been loaded. 930 // Plugin has been loaded.
931 931
932 mPluginVersionString = message.getValue("plugin_version"); 932 mPluginVersionString = message.getValue("plugin_version");
933 LL_INFOS("Plugin") << "plugin version string: " << mPluginVersionString << LL_ENDL; 933 LL_INFOS("PluginParent") << "plugin version string: " << mPluginVersionString << LL_ENDL;
934 934
935 // Check which message classes/versions the plugin supports. 935 // Check which message classes/versions the plugin supports.
936 // TODO: check against current versions 936 // TODO: check against current versions
@@ -939,9 +939,9 @@ void LLPluginProcessParent::receiveMessage(const LLPluginMessage &message)
939 LLSD::map_iterator iter; 939 LLSD::map_iterator iter;
940 for(iter = mMessageClassVersions.beginMap(); iter != mMessageClassVersions.endMap(); iter++) 940 for(iter = mMessageClassVersions.beginMap(); iter != mMessageClassVersions.endMap(); iter++)
941 { 941 {
942 LL_INFOS("Plugin") << "message class: " << iter->first << " -> version: " << iter->second.asString() << LL_ENDL; 942 LL_INFOS("PluginParent") << "message class: " << iter->first << " -> version: " << iter->second.asString() << LL_ENDL;
943 } 943 }
944 944
945 // Send initial sleep time 945 // Send initial sleep time
946 setSleepTime(mSleepTime, true); 946 setSleepTime(mSleepTime, true);
947 947
@@ -949,7 +949,7 @@ void LLPluginProcessParent::receiveMessage(const LLPluginMessage &message)
949 } 949 }
950 else 950 else
951 { 951 {
952 LL_WARNS("Plugin") << "received load_plugin_response message in wrong state -- bailing out" << LL_ENDL; 952 LL_WARNS("PluginParent") << "received load_plugin_response message in wrong state -- bailing out" << LL_ENDL;
953 errorState(); 953 errorState();
954 } 954 }
955 } 955 }
@@ -960,8 +960,8 @@ void LLPluginProcessParent::receiveMessage(const LLPluginMessage &message)
960 960
961 mCPUUsage = message.getValueReal("cpu_usage"); 961 mCPUUsage = message.getValueReal("cpu_usage");
962 962
963 LL_DEBUGS("Plugin") << "cpu usage reported as " << mCPUUsage << LL_ENDL; 963 LL_DEBUGS("PluginSpam") << "cpu usage reported as " << mCPUUsage << LL_ENDL;
964 964
965 } 965 }
966 else if(message_name == "shm_add_response") 966 else if(message_name == "shm_add_response")
967 { 967 {
@@ -983,7 +983,7 @@ void LLPluginProcessParent::receiveMessage(const LLPluginMessage &message)
983 } 983 }
984 else 984 else
985 { 985 {
986 LL_WARNS("Plugin") << "Unknown internal message from child: " << message_name << LL_ENDL; 986 LL_WARNS("PluginParent") << "Unknown internal message from child: " << message_name << LL_ENDL;
987 } 987 }
988 } 988 }
989 else 989 else
@@ -1015,7 +1015,7 @@ std::string LLPluginProcessParent::addSharedMemory(size_t size)
1015 } 1015 }
1016 else 1016 else
1017 { 1017 {
1018 LL_WARNS("Plugin") << "Couldn't create a shared memory segment!" << LL_ENDL; 1018 LL_WARNS("PluginParent") << "Couldn't create a shared memory segment!" << LL_ENDL;
1019 1019
1020 // Don't leak 1020 // Don't leak
1021 delete region; 1021 delete region;
@@ -1037,7 +1037,7 @@ void LLPluginProcessParent::removeSharedMemory(const std::string &name)
1037 } 1037 }
1038 else 1038 else
1039 { 1039 {
1040 LL_WARNS("Plugin") << "Request to remove an unknown shared memory segment." << LL_ENDL; 1040 LL_WARNS("PluginParent") << "Request to remove an unknown shared memory segment." << LL_ENDL;
1041 } 1041 }
1042} 1042}
1043size_t LLPluginProcessParent::getSharedMemorySize(const std::string &name) 1043size_t LLPluginProcessParent::getSharedMemorySize(const std::string &name)
@@ -1084,25 +1084,25 @@ std::string LLPluginProcessParent::getPluginVersion(void)
1084 1084
1085void LLPluginProcessParent::setState(EState state) 1085void LLPluginProcessParent::setState(EState state)
1086{ 1086{
1087 LL_DEBUGS("Plugin") << "setting state to " << stateToString(state) << LL_ENDL; 1087 LL_DEBUGS("PluginParent") << "setting state to " << stateToString(state) << LL_ENDL;
1088 mState = state; 1088 mState = state;
1089}; 1089};
1090 1090
1091bool LLPluginProcessParent::pluginLockedUpOrQuit() 1091bool LLPluginProcessParent::pluginLockedUpOrQuit()
1092{ 1092{
1093 bool result = false; 1093 bool result = false;
1094 1094
1095 if(!mProcess.isRunning()) 1095 if(!mProcess.isRunning())
1096 { 1096 {
1097 LL_WARNS("Plugin") << "child exited" << LL_ENDL; 1097 LL_WARNS("PluginParent") << "child exited" << LL_ENDL;
1098 result = true; 1098 result = true;
1099 } 1099 }
1100 else if(pluginLockedUp()) 1100 else if(pluginLockedUp())
1101 { 1101 {
1102 LL_WARNS("Plugin") << "timeout" << LL_ENDL; 1102 LL_WARNS("PluginParent") << "timeout" << LL_ENDL;
1103 result = true; 1103 result = true;
1104 } 1104 }
1105 1105
1106 return result; 1106 return result;
1107} 1107}
1108 1108
diff --git a/linden/indra/newview/app_settings/logcontrol.xml b/linden/indra/newview/app_settings/logcontrol.xml
index c94fc51..cdc837d 100644
--- a/linden/indra/newview/app_settings/logcontrol.xml
+++ b/linden/indra/newview/app_settings/logcontrol.xml
@@ -66,7 +66,15 @@
66 66
67 <!--<string>Messaging</string>--> 67 <!--<string>Messaging</string>-->
68 <!--<string>Notifications</string>--> 68 <!--<string>Notifications</string>-->
69 <!--<string>Plugin</string>--> 69 <string>Plugin</string>
70 <string>PluginClassMedia</string>
71 <string>PluginInstance</string>
72 <string>PluginPipe</string>
73 <string>PluginChild</string>
74 <!--<string>PluginSpam</string>-->
75 <string>PluginParent</string>
76 <string>PluginViewerMedia</string>
77
70 <!--<string>Radar</string>--> 78 <!--<string>Radar</string>-->
71 <!--<string>ShaderLoading</string>--> 79 <!--<string>ShaderLoading</string>-->
72 80
diff --git a/linden/indra/newview/llviewermedia.cpp b/linden/indra/newview/llviewermedia.cpp
index 5c01b25..f0faedf 100644
--- a/linden/indra/newview/llviewermedia.cpp
+++ b/linden/indra/newview/llviewermedia.cpp
@@ -402,7 +402,7 @@ bool LLViewerMediaImpl::initializeMedia(const std::string& mime_type)
402 { 402 {
403 if(! initializePlugin(mime_type)) 403 if(! initializePlugin(mime_type))
404 { 404 {
405 LL_WARNS("Plugin") << "plugin intialization failed for mime type: " << mime_type << LL_ENDL; 405 LL_WARNS("PluginViewerMedia") << "plugin intialization failed for mime type: " << mime_type << LL_ENDL;
406 LLSD args; 406 LLSD args;
407 args["MIME_TYPE"] = mime_type; 407 args["MIME_TYPE"] = mime_type;
408 LLNotifications::instance().add("NoPlugin", args); 408 LLNotifications::instance().add("NoPlugin", args);
@@ -520,7 +520,7 @@ LLPluginClassMedia* LLViewerMediaImpl::newSourceFromMediaType(std::string media_
520 } 520 }
521 } 521 }
522 522
523 LL_WARNS("Plugin") << "plugin intialization failed for mime type: " << media_type << LL_ENDL; 523 LL_WARNS("PluginViewerMedia") << "plugin intialization failed for mime type: " << media_type << LL_ENDL;
524 LLSD args; 524 LLSD args;
525 args["MIME_TYPE"] = media_type; 525 args["MIME_TYPE"] = media_type;
526 LLNotifications::instance().add("NoPlugin", args); 526 LLNotifications::instance().add("NoPlugin", args);