Intention is to use `CreateToolhelp32Snapshot` in `dbghelp.dll: EnumerateLoadedModulesW64`. Right now we can't because `CreateToolhelp32Snapshot` can't capture 32bit modules in wow64 processes, which is needed to support `SYMOPT_INCLUDE_32BIT_MODULES`.
The advantage of using `CreateToolhelp32Snapshot` in mainly performance. Right now `EnumerateLoadedModulesW64` is `O(n^2)`, because of each module it calls `GetModuleInformation` which is itself `O(n)` w.r.t. number of modules. Whereas with `CreateToolhelp32Snapshot` there is no need for `GetModuleInformation`, thus reduce the complexity to just `O(n)`.
* * *
P.S. I am also uncomfortable with the amount of similar code between `CreateToolhelp32Snapshot` and `EnumProcessModulesEx`. Can something be done here?
--
v10: kernel32: Implement TH32CS_SNAPMODULE32 support for CreateToolhelp32Snapshot.
kernel32: Use GetCurrentProcess() handle in CreateToolhelp32Snapshot if possible.
kernel32/tests: Test CreateToolhelp32Snapshot with TH32CS_SNAPMODULE32.
kernel32: Fix CreateToolhelp32Snapshot on old WoW64.
include: Add TH32CS_SNAPMODULE32.
kernel32/tests: Handle ERROR_BAD_LENGTH from CreateToolhelp32Snapshot.
https://gitlab.winehq.org/wine/wine/-/merge_requests/9371
Intention is to use `CreateToolhelp32Snapshot` in `dbghelp.dll: EnumerateLoadedModulesW64`. Right now we can't because `CreateToolhelp32Snapshot` can't capture 32bit modules in wow64 processes, which is needed to support `SYMOPT_INCLUDE_32BIT_MODULES`.
The advantage of using `CreateToolhelp32Snapshot` in mainly performance. Right now `EnumerateLoadedModulesW64` is `O(n^2)`, because of each module it calls `GetModuleInformation` which is itself `O(n)` w.r.t. number of modules. Whereas with `CreateToolhelp32Snapshot` there is no need for `GetModuleInformation`, thus reduce the complexity to just `O(n)`.
* * *
P.S. I am also uncomfortable with the amount of similar code between `CreateToolhelp32Snapshot` and `EnumProcessModulesEx`. Can something be done here?
--
v9: kernel32: Implement TH32CS_SNAPMODULE32 support for CreateToolhelp32Snapshot.
kernel32: Use GetCurrentProcess() handle in CreateToolhelp32Snapshot if possible.
kernel32/tests: Test CreateToolhelp32Snapshot with TH32CS_SNAPMODULE32.
kernel32: Fix CreateToolhelp32Snapshot on old WoW64.
include: Add TH32CS_SNAPMODULE32.
kernel32/tests: Handle ERROR_BAD_LENGTH from CreateToolhelp32Snapshot.
https://gitlab.winehq.org/wine/wine/-/merge_requests/9371
Presently the wine file explorer has a create shortcut entry that does nothing. This implements the FCIDM_SHVIEW_CREATELINK command.
This is a patch that was first submitted in 2017 and I unfortunately let the revision request fall unimplemented.
--
v11: shell32: Implement FCIDM_SHVIEW_CREATELINK
https://gitlab.winehq.org/wine/wine/-/merge_requests/5373
Presently the wine file explorer has a create shortcut entry that does nothing. This implements the FCIDM_SHVIEW_CREATELINK command.
This is a patch that was first submitted in 2017 and I unfortunately let the revision request fall unimplemented.
--
v10: shell32: Implement FCIDM_SHVIEW_CREATELINK
https://gitlab.winehq.org/wine/wine/-/merge_requests/5373
This is a (first) MR about optmizing (new) PDB reader.
Context:
- game ships with a 1+ GB file and throws an exception at some
point in the game, then captures a backtrace with a bunch of
dbghelp invocations.
- exception is also raised on native but is handled rather quickly
(1-2seconds wall time), during what the game completly freezes.
Old PDB reader (first context was on Wine 9.x) crashed when reading
the PDB file.
Serie starts with a fix for that, but it takes ages to load the
PDB file.
Context moved to Wine 10.x (with new PDB reader).
Freeze time is about 7-8s. So this serie and subsequent ones will
reduce freeze time (current status is 2.6s).
This serie contains:
- fix for old PDB reader to avoid crash,
- some cleanups in PDB handling (nothing too fancy),
- remove the computation of CRC when considering an ELF module,
(the only place where this is used if when generating minidump
including ELF modules, but the CRC is recomputed anyway).
Since the CRC is computed on the whole ELF module image, and
depending on number of referenced ELF modules, this can save
quite some time (here ~1s).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/9658
Intention is to use `CreateToolhelp32Snapshot` in `dbghelp.dll: EnumerateLoadedModulesW64`. Right now we can't because `CreateToolhelp32Snapshot` can't capture 32bit modules in wow64 processes, which is needed to support `SYMOPT_INCLUDE_32BIT_MODULES`.
The advantage of using `CreateToolhelp32Snapshot` in mainly performance. Right now `EnumerateLoadedModulesW64` is `O(n^2)`, because of each module it calls `GetModuleInformation` which is itself `O(n)` w.r.t. number of modules. Whereas with `CreateToolhelp32Snapshot` there is no need for `GetModuleInformation`, thus reduce the complexity to just `O(n)`.
* * *
P.S. I am also uncomfortable with the amount of similar code between `CreateToolhelp32Snapshot` and `EnumProcessModulesEx`. Can something be done here?
--
v8: kernel32: Implement TH32CS_SNAPMODULE32 support for CreateToolhelp32Snapshot.
kernel32: Use GetCurrentProcess() handle in CreateToolhelp32Snapshot if possible.
kernel32/tests: Test CreateToolhelp32Snapshot with TH32CS_SNAPMODULE32.
kernel32: Fix CreateToolhelp32Snapshot on old WoW64.
https://gitlab.winehq.org/wine/wine/-/merge_requests/9371
Not sure about the extension replacement mechanism. Also, should tests be failing when extensions aren't supported?
--
v7: opengl32: Expose GL_EXT_memory_object_win32.
win32u/opengl: Implement glImportMemoryWin32(Handle/Name)EXT for opaque handle types.
opengl32, win32u: Move gl_error to wgl_context.
https://gitlab.winehq.org/wine/wine/-/merge_requests/9572
Not sure about the extension replacement mechanism. Also, should tests be failing when extensions aren't supported?
--
v5: opengl32: Expose GL_EXT_memory_object_win32.
win32u/opengl: Implement glImportMemoryWin32(Handle/Name)EXT for opaque handle types.
opengl32, win32u: Move gl_error to wgl_context.
win32u/opengl: Implement GL_DEVICE_LUID_EXT and GL_DEVICE_NODE_MASK_EXT.
opengl32: Cleanup glGet* and fix typo in glGetDoublev.
https://gitlab.winehq.org/wine/wine/-/merge_requests/9572