Lines Matching refs:to

16  * 2 along with this work; if not, write to the Free Software Foundation,
25 // Must be at least Windows 2000 or XP to use VectoredExceptions and IsDebuggerPresent
175 // This method is a periodic task to check for misbehaving JNI applications
199 // Found the full path to jvm[_g].dll.
200 // Now cut the path to <java_home>/jre if we can.
322 * RtlCaptureStackBackTrace Windows API may not exist prior to Windows XP.
392 // Try to randomize the cache line index of hot stack frames.
413 // If we are using vectored exception we don't need to set a SEH
424 // Nothing to do.
554 // Contrary to what MSDN document says, "stack_size" in _beginthreadex()
558 // than default value in the PE header, the stack is rounded up to the
564 // not only the stack space will be rounded up to MB, but also the
569 // are not supposed to call CreateThread() directly according to MSDN
571 // flag appears to work with _beginthredex() as well.
596 // Need to clean up stuff we've allocated so far
617 // Free Win32 resources related to the OSThread
633 jlong result = 0; // initialization to avoid warning
685 // Limit to 1400m because of the 2gb address space wall
760 // Just to be safe, recalculate the offset in debug mode
804 // whether it can actually be made to (DLD, 9/13/05).
840 // but it is not going to wrap -- so all 64 bits
853 // use the max value the counter can reach to
905 // allow PerfMemory to attempt cleanup of any persistent resources
947 VMError::report_coredump_status("Failed to load dbghelp.dll", false);
957 VMError::report_coredump_status("Failed to find MiniDumpWriteDump() in module dbghelp.dll", false);
975 VMError::report_coredump_status("Failed to create file for dumping", false);
991 // the dump types we really want. If first call fails, lets fall back to just use MiniDumpWithFullMemory then.
994 VMError::report_coredump_status("Call to MiniDumpWriteDump() failed", false);
1038 * Win32 accepts "\" in its POSIX stat(), but refuses to treat it
1071 /* Append "*.*", or possibly "\\*.*", to path */
1201 // Needs to be in os specific directory because windows requires another
1313 // Get a handle to a Toolhelp snapshot of the system
1348 char* full_path; // point to a char buffer
1360 // if a buffer is provided, copy path name to the buffer
1373 // return the full path to the DLL file, sometimes it returns path
1374 // to the corresponding PDB file (debug info); sometimes it only
1465 // - then print to buffer "DLL was built for a different architecture"
1466 // else call os::lasterror to obtain system error message
1482 //Go to position 3c in the dll
1489 //Go to COFF File Header in dll
1672 // Nothing to do for now.
1733 // Find the full path to the current module, jvm.dll or jvm_g.dll
1741 // Lazy resolve the path to current module.
1847 // We need to reinstate the signal handler each time...
1870 // into SIGBREAK, which makes it impossible to distinguish ^BREAK from close,
1879 // handler fails to abort. Let VM die immediately.
1900 // If it is a non-interactive session, let next handler to deal
1939 // Programs embedding the VM do not want it to attempt to receive
1940 // events like CTRL_LOGOFF_EVENT, which are used to implement the
1944 // control handler to return FALSE, not TRUE, because the OS's
1945 // "final" handler for such events allows the process to continue if
1997 // another thread suspended us. We don't want to continue running
2025 // Set pc to handler
2029 // Set pc to handler
2033 // Set pc to handler
2047 // According to Windows API documentation, an illegal instruction sequence should generate
2050 // seems to be an undocumented feature of Win NT 4.0 (and probably other Windows systems).
2173 // We didn't handle this exception so pass it to the previous
2186 However should we decide to restore of mxcsr after a faulty
2235 // Handled first to avoid misdiagnosis as a "normal" access violation;
2236 // This is safe to do because we have a new/unique ExceptionInformation
2251 // different - we still want to unguard the 2nd page in this case.
2253 // 15 bytes seems to be a (very) safe value for max instruction size.
2268 // Set memory to RWX and retry
2288 // threads to think it already unguarded, and abort the VM. Likely
2292 // different addresses and failing to unguard the page, resulting in
2317 // Check to see if we caught the safepoint code in the
2367 // zone page for us. Note: must call disable_stack_yellow_zone to
2384 // a one-time-only guard page, which it has released to us. The next
2452 // Give us some room to process the exception
2467 // an access to the first page of VM--assume it is a null pointer
2513 // We check to see if the pc of the fault is in NTDLL.DLL
2514 // if so, we pass control on to Windows for handling.
2578 // Need to install our own structured exception handler since native code may
2633 // Windows large page support is available on Windows 2003. In order to use
2635 // to the user:
2641 // by default do not have the privilege to lock pages in memory.
2649 // in the future, if so the code below needs to be revisited.
2783 // this routine is used whenever we need to reserve a contiguous VA range
2784 // but we need to make separate VirtualAlloc calls for each piece of the range
2786 // * UseLargePagesIndividualAllocation was set (normally only needed on WS2003 but possible to be set otherwise)
2791 // note: at setup time we guaranteed that NUMAInterleaveGranularity was aligned up to a page size
2795 // first reserve enough address space in advance since we want to be
2796 // able to break a single contiguous virtual address range into multiple
2815 // we still need to round up to a page boundary (in case we are using large pages)
2816 // but not to a chunk boundary (in case InterleavingGranularity doesn't align with page size)
2836 // select bytes_to_rq to get to the next chunk_size boundary
2857 // get the next node to use from the used_node_list
2874 // NMT has yet to record any individual blocks, so it
2875 // need to create a dummy 'reserve' record to match
2941 WARN("JVM cannot use large page memory because it does not have enough privilege to lock pages in memory.");
2979 // Multiple threads can race in this code but it's not possible to unmap small sections of
2980 // virtual space to get requested alignment, like posix-like os's.
2988 assert(extra_size >= size, "overflow, size is too large to allow alignment");
3022 // in numa interleaving, we have to allocate pages individually
3055 // future, but with Windows 2003 it's not possible to commit on demand.
3068 // with large pages, there are two cases where we need to use Individual Allocation
3083 "use -XX:-UseLargePagesIndividualAllocation to turn off");
3127 // Don't attempt to print anything if the OS call fails. We're
3140 // Windows doc says to use VirtualProtect to get execute permissions
3250 // Pages in the region become guard pages. Any attempt to access a guard page
3251 // causes the system to raise a STATUS_GUARD_PAGE exception and turn off
3316 // The default timer resolution seems to be 10 milliseconds.
3318 // If someone wants to sleep for only a fraction of the default,
3319 // then we set the timer resolution down to 1 millisecond for
3322 // seem to incur an overhead (3%?) that we don't need.
3324 // Buf if ms is large, say 500, or 503, we should avoid the call to timeBeginPeriod().
3327 // timeBeginPeriod() has been linked to problems with clock drift on win32 systems and
3328 // to decreased efficiency related to increased timer "tick" rates. We want to minimize
3329 // (a) calls to timeBeginPeriod() and timeEndPeriod() and (b) time spent with high
3395 // Sleep forever; naked call to OS-specific sleep; use with CAUTION
3418 // Yields to all threads, including threads with lower priorities
3422 // Win32 only gives you access to seven real priorities at a time,
3423 // so we compress Java's ten down to seven. It would be better
3491 // Hint to the underlying OS that a task switch would not be good.
3503 // to interrupted() to be visible to other threads before we post
3526 // if we are going to report that we were indeed interrupted - else
3527 // an interrupt can be "lost", leading to spurious wakeups or lost wakeups
3629 // known to deadlock the system, if the VM issues to thread operations with
3631 // The 6000 seems to work well - no deadlocks has been notices on the test
3691 fprintf(stderr, "Press any key to continue...\n");
3726 // Helpers to check whether NX protection is enabled
3860 // Check minimum allowable stack size for thread creation and to initialize
3863 // Add in 2*BytesPerWord times page size to account for VM stack during
3877 // Calculate theoretical max. size of Threads to guard gainst artifical
3893 // there is no limit to the number of functions registered. atexit does
3900 // call DestroyJavaVM() to assure that VM resources are released.
3903 // the future if the appropriate cleanup code can be added to the
3973 // after the call to stat() but before 'GetTimeZoneInformation()', then
3977 // mechanism, we'll have to live with this risk.
3993 // are used by JVM M&M and JVMTI to get user+sys or user CPU time
4070 // It does have primitives (PDH API) to get CPU usage and run queue length.
4072 // If we wanted to implement loadavg on Windows, we have a few options:
4080 // returns 100%), so we'd have to deal with that as well.
4083 // the answer in a global variable. The call to loadavg would
4086 // c) Sample a better answer using exponential decay to smooth the
4139 // move file pointer to the specified offset
4152 /* Convert a pathname to native format. On win32, this involves forcing all
4153 separators to be '\\' rather than '/' (both are legal inputs, but Win95
4155 assumed to have been converted into the character encoding used by the local
4156 system. Because this might be a double-byte encoding, care is taken to
4165 point to the colon following the drive
4182 hack is necessary to support file URLs containing drive
4184 "/c:/path" can be used as an alternative to "c:/path". */
4197 path[0] = '\\'; /* Force first separator to '\\' */
4204 separators to be '\\' rather than '/'. Also, single byte space
4218 /* "\\\\" is not collapsed to "\\" because "\\\\" marks the
4221 to be consistent with the path canonicalizer as well
4248 /* For "z:", add "." to work around a bug in the C runtime library */
4346 * connected to an exec'd process).
4360 * The only alternative is to raise an Exception,
4384 INPUT_RECORD *lpBuffer; /* Pointer to records of input events */
4456 // Even VirtualProtect refuses to give execute access to mapped memory
4538 // VirtualProtect fails, we should still be able to execute
4560 // This OS does not allow existing memory maps to be remapped so we
4561 // have to unmap the memory before we remap it.
4568 // code may be able to access an address that is no longer mapped.
4615 // 1: When a thread dies return the Event to the EventFreeList, clear the ParkHandle
4617 // need to be modified to tolerate finding a NULL (invalid) win32 event handle.
4627 // as handle leakage, but only up to the maximum # of threads that have been extant
4629 // permit a process to have hundreds of thousands of open handles.
4634 // 4: Add a CRITICAL_SECTION to the Event to protect LD+SetEvent from LD;ST(null);CloseHandle.
4638 // Or perhaps something similar to Maged Michael's "Hazard pointers".
4645 // to recover from (or at least detect) the dreaded Windows 841176 bug.
4667 // CONSIDER: defer assigning a CreateEvent() handle to the Event until
4687 // to happen early in the wait interval. Specifically, after a spurious wakeup (rv ==
4688 // WAIT_OBJECT_0 but _Event is still < 0) we don't bother to recompute Millis to compensate
4690 // In the future, however, we might want to track the accumulated wait time and
4738 // multiple unpark() operations drove _Event up to 1.
4751 // That is, we can safely transition _Event from -1 to either
4752 // 0 or 1. Forcing 1 is slightly more efficient for back-to-back
4756 // Note: Forcing a transition from "-1" to "1" on an unpark() means
4757 // that it will take two back-to-back park() calls for the owning
4758 // thread to block. This has the benefit of forcing a spurious return
4773 * operations on Win32 Events turn out to have the right semantics to
4789 time -= os::javaTimeMillis(); // convert to relative time
4794 time /= 1000000; // Must coarsen from nanos to millis
4876 // To get to the exlicit error message(s) below, just continue twice.
4989 struct sockaddr* to, socklen_t tolen) {
4991 return ::sendto(fd, buf, (int)len, flags, to, tolen);
5106 // pass context to Thread Sampling impl