summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2f8566e)
* Introduce preloadThread for launcher
#include <sys/wait.h>
#include <unistd.h>
#include <linux/limits.h>
#include <sys/wait.h>
#include <unistd.h>
#include <linux/limits.h>
#include <storage.h>
#include <vconf.h>
#include <storage.h>
#include <vconf.h>
+static pthread_t preloadThreadId = 0;
+static void* preloadThread(void* arg)
+{
+ _INFO("PreloadThread START\n");
+ preload();
+ _INFO("PreloadThread END\n");
+ pthread_exit(NULL);
+}
+
bool initializeCoreClr(PathManager* pm, const std::string& tpa)
{
bool ncdbStartupHook = isNCDBStartupHookProvided();
bool initializeCoreClr(PathManager* pm, const std::string& tpa)
{
bool ncdbStartupHook = isNCDBStartupHookProvided();
// See https://github.com/dotnet/coreclr/issues/6698
//
// libunwind use following methods to unwind stack frame.
// See https://github.com/dotnet/coreclr/issues/6698
//
// libunwind use following methods to unwind stack frame.
- // UNW_ARM_METHOD_ALL 0xFF
- // UNW_ARM_METHOD_DWARF 0x01
- // UNW_ARM_METHOD_FRAME 0x02
- // UNW_ARM_METHOD_EXIDX 0x04
+ // UNW_ARM_METHOD_ALL 0xFF
+ // UNW_ARM_METHOD_DWARF 0x01
+ // UNW_ARM_METHOD_FRAME 0x02
+ // UNW_ARM_METHOD_EXIDX 0x04
putenv(const_cast<char *>("UNW_ARM_UNWIND_METHOD=6"));
#endif // __arm__
putenv(const_cast<char *>("UNW_ARM_UNWIND_METHOD=6"));
#endif // __arm__
- if (launchMode == LaunchMode::loader) {
-
- // preload libraries and manage dlls for optimizing startup time
- preload();
+ // preload libraries and manage dlls for optimizing startup time
+ int err = pthread_create(&preloadThreadId, NULL, preloadThread, NULL);
+ if (err) {
+ _ERR("PreloadThread Creation Failed: %s", strerror(err));
+ }
+ if (launchMode == LaunchMode::loader) {
// The debug pipe created in the candidate process has a "User" label.
// As a result, smack deny occurs when app process try to access the debug pipe.
// Also, since debugging is performed only in standalone mode,
// The debug pipe created in the candidate process has a "User" label.
// As a result, smack deny occurs when app process try to access the debug pipe.
// Also, since debugging is performed only in standalone mode,
checkOnTerminate = true;
// workaround : to prevent crash while process terminate on profiling mode,
checkOnTerminate = true;
// workaround : to prevent crash while process terminate on profiling mode,
- // kill process immediately.
+ // kill process immediately.
// see https://github.com/dotnet/coreclr/issues/26687
if (__isProfileMode) {
_INFO("shutdown process immediately.");
// see https://github.com/dotnet/coreclr/issues/26687
if (__isProfileMode) {
_INFO("shutdown process immediately.");