2004-01-10 02:14:13 +00:00
|
|
|
/*
|
[0.4.7][TASKMGR] Backport many fixes and improvements
Some commits I do port back all the way down till releases/0.4.7:
partially 0.4.15-dev-6768-g 63eaf2bd529f5bf94cde65afc26944e98b47850b [TASKMGR] *.rc Deduplicate dynamic menu strings (#5772) (I left out the FIXME-comments)
0.4.15-dev-6712-g 46b4b5581d1fc4c1b50cfc0ee8b82b77be182dc6 [TASKMGR] Favor _countof(), no functional change intended (#5757)
0.4.15-dev-6703-g 6528ab8fcb41eb47ee17cf738760126e6758af94 [TASKMGR] de-DE.rc Update part 3
0.4.15-dev-6702-g 65ce20896afa19032612871506dd5d1e8eb73119 [TASKMGR] *.rc Strip unused IDD_DEBUG_CHANNELS_DIALOG
0.4.15-dev-6700-g e15d68ba5d9906674b363cf8362ed08494e53a76 [TASKMGR] de-DE German Update & bug-fixes
partially 0.4.15-dev-6447-g 016acd170dd75a7a24af235339a5321e2c24bf5a [TASKMGR] Do not free shared icon for ShellAbout() calls (I picked just the taskmgr part) (was part of larger PR5519)
0.4.15-dev-6297-g 831288fe691ec311c5b910f05d9b833b4b952261 [TASKMGR] Fix text truncation for fr-FR.rc (#5380) CORE-18523
0.4.15-dev-6127-g c706222f3f1b2a63e8cc969ee756c8be92527853 [TASKMGR] Fix the license. Turns out it's LGPL-2.1-or-later from the texts.
0.4.15-dev-6124-g 9927163455b83fea29c6420a688535b8e233bff6 [TASKMGR] Reorder page controls to have natural TAB-ordering.
0.4.15-dev-6122-g d5707eefe2f08d230c07ab4693ac0bd59e809f85 [TASKMGR] High speed update is twice per second, and not every second.
0.4.15-dev-6121-g 2da0506f2a9fc02acede7d7ff479399013830fad [TASKMGR] Remove more dead code.
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code. (I left out using the strsafe.h-dependent stuff, as this is safe also in old-style)
0.4.15-dev-6119-g 0b4c8bdd1cb4cf1a50c1076c7ded19ee7e9f9198 [TASKMGR] Clamp the values returned from PerfDataGetProcessorUsage() and PerfDataGetProcessorSystemUsage() inside these functions.
0.4.15-dev-6118-g 7b53126375ee8889cf24615fa2ea646feabee0ae [TASKMGR] Completely reformat perfpage.c, perfpage.h, procpage.h and trayicon.c
partially 0.4.15-dev-6117-g da7dcec6a06c052339120ed4baa3caf24594f163 [TASKMGR] Reformat the files' headers
0.4.15-dev-6115-g 36aea8e56eb6eb9f1cab5fd6ce040b80ef6a302f [TASKMGR] affinity.c: Use _countof instead of sizeof/sizeof (was part of the larger CORE18991)
partially 0.4.15-dev-6109-g 99fb812be4ba86139438bf7961f2030ac9e016be [TASKMGR] Refactor trayicon.c
0.4.15-dev-5404-g c093d4f8038e7ddec1ca193edc573c48e12f12ff [TASKMGR] Prevent context menu on idle process (#4889) CORE-18640
0.4.15-dev-5031-g 46ea5171bdfaba2606486e27821fdd9ee88e551a [TASKMGR] Pixel-perfection for left border (#4680) CORE-18061
0.4.15-dev-4988-g de5af76811bbd318cdef46e193f306833e3fa740 [TASKMGR] Fix overlapping controls (French only) (#4658)
0.4.15-dev-4987-g f8c28b977363444ad31124a6794347c53532b43f [TASKMGR] Fix UI on SwitchTo for multiple application (#4652)
0.4.15-dev-3497-g e8a7e0da2bcbd842f95e4224e72bfb5d748dbd05 [TASKMGR] Make 'Hide When Minimized' non-default (#4169)
0.4.15-dev-3085-g 515e0cf38f8d07e59bb003f930eb08d33dc5f85d [TASKMGR] Handles: Get number only, skip data (#3910)
and a few *.rc improvements that are not explicitly mentioned here,
especially I stripped the menuLoop-statusbar-help-texts within the older branches.
A few improvements are still left to be done in a future commit (mostly around the plotgraphs and the trayicon-handling),
but I need to have a closer look at them and their impact on binary size,
so I do not want to squash them into this bigger backport,
where I concentrated on the safe/obvious and easy things.
Binary size decreases for all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 708.608 -> 696.832 (0.4.15-dev-6768-g63eaf2b)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 660.992 -> 549.888
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 659.968 -> 542.720
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 531.456
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE -> 110.080 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 108.032 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 107.520 Bytes
2023-10-19 15:25:14 +02:00
|
|
|
* PROJECT: ReactOS Task Manager
|
|
|
|
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
|
|
|
* COPYRIGHT: 1999-2001 Brian Palmer <brianp@reactos.org>
|
|
|
|
* 2009 Maxime Vernier <maxime.vernier@gmail.com>
|
2004-01-10 02:14:13 +00:00
|
|
|
*/
|
2005-05-08 04:07:56 +00:00
|
|
|
|
2013-01-24 23:00:42 +00:00
|
|
|
#include "precomp.h"
|
2004-01-10 02:14:13 +00:00
|
|
|
|
2014-01-13 12:43:06 +00:00
|
|
|
#include "proclist.h"
|
|
|
|
|
2009-06-27 19:16:29 +00:00
|
|
|
#define CMP(x1, x2)\
|
|
|
|
(x1 < x2 ? -1 : (x1 > x2 ? 1 : 0))
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
2009-09-17 16:07:37 +00:00
|
|
|
ULONG ProcessId;
|
2009-06-27 19:16:29 +00:00
|
|
|
} PROCESS_PAGE_LIST_ITEM, *LPPROCESS_PAGE_LIST_ITEM;
|
|
|
|
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
HWND hProcessPage;
|
|
|
|
HWND hProcessPageListCtrl;
|
|
|
|
HWND hProcessPageHeaderCtrl;
|
|
|
|
HWND hProcessPageEndProcessButton;
|
|
|
|
HWND hProcessPageShowAllProcessesButton;
|
2014-12-15 20:33:26 +00:00
|
|
|
BOOL bProcessPageSelectionMade = FALSE; /* Is item in ListCtrl selected */
|
2004-01-10 02:14:13 +00:00
|
|
|
|
2007-10-31 23:26:27 +00:00
|
|
|
static int nProcessPageWidth;
|
|
|
|
static int nProcessPageHeight;
|
2010-08-08 03:41:33 +00:00
|
|
|
#ifdef RUN_PROC_PAGE
|
|
|
|
static HANDLE hProcessThread = NULL;
|
|
|
|
static DWORD dwProcessThread;
|
|
|
|
#endif
|
2004-01-10 02:14:13 +00:00
|
|
|
|
2009-06-27 19:16:29 +00:00
|
|
|
int CALLBACK ProcessPageCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort);
|
|
|
|
void AddProcess(ULONG Index);
|
|
|
|
void UpdateProcesses();
|
|
|
|
void gethmsfromlargeint(LARGE_INTEGER largeint, DWORD *dwHours, DWORD *dwMinutes, DWORD *dwSeconds);
|
2004-01-10 02:14:13 +00:00
|
|
|
void ProcessPageOnNotify(WPARAM wParam, LPARAM lParam);
|
2014-11-23 20:10:15 +00:00
|
|
|
void CommaSeparateNumberString(LPWSTR strNumber, ULONG nMaxCount);
|
2004-01-10 02:14:13 +00:00
|
|
|
void ProcessPageShowContextMenu(DWORD dwProcessId);
|
2014-11-23 20:10:15 +00:00
|
|
|
BOOL PerfDataGetText(ULONG Index, ULONG ColumnIndex, LPTSTR lpText, ULONG nMaxCount);
|
2004-01-10 02:14:13 +00:00
|
|
|
DWORD WINAPI ProcessPageRefreshThread(void *lpParameter);
|
2009-09-17 16:07:37 +00:00
|
|
|
int ProcessRunning(ULONG ProcessId);
|
2004-01-10 02:14:13 +00:00
|
|
|
|
2015-04-12 15:45:40 +00:00
|
|
|
void Cleanup(void)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
LV_ITEM item;
|
|
|
|
LPPROCESS_PAGE_LIST_ITEM pData;
|
|
|
|
for (i = 0; i < ListView_GetItemCount(hProcessPageListCtrl); i++)
|
|
|
|
{
|
|
|
|
memset(&item, 0, sizeof(LV_ITEM));
|
|
|
|
item.mask = LVIF_PARAM;
|
|
|
|
item.iItem = i;
|
|
|
|
(void)ListView_GetItem(hProcessPageListCtrl, &item);
|
|
|
|
pData = (LPPROCESS_PAGE_LIST_ITEM)item.lParam;
|
|
|
|
HeapFree(GetProcessHeap(), 0, pData);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-04-08 22:10:45 +00:00
|
|
|
int ProcGetIndexByProcessId(DWORD dwProcessId)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
LVITEM item;
|
|
|
|
LPPROCESS_PAGE_LIST_ITEM pData;
|
|
|
|
|
|
|
|
for (i=0; i<ListView_GetItemCount(hProcessPageListCtrl); i++)
|
|
|
|
{
|
|
|
|
memset(&item, 0, sizeof(LV_ITEM));
|
|
|
|
item.mask = LVIF_PARAM;
|
|
|
|
item.iItem = i;
|
|
|
|
(void)ListView_GetItem(hProcessPageListCtrl, &item);
|
|
|
|
pData = (LPPROCESS_PAGE_LIST_ITEM)item.lParam;
|
2010-04-10 12:49:41 +00:00
|
|
|
if (pData->ProcessId == dwProcessId)
|
2010-04-08 22:10:45 +00:00
|
|
|
return i;
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2009-06-28 14:22:09 +00:00
|
|
|
DWORD GetSelectedProcessId(void)
|
|
|
|
{
|
|
|
|
int Index;
|
|
|
|
LVITEM lvitem;
|
|
|
|
|
|
|
|
if(ListView_GetSelectedCount(hProcessPageListCtrl) == 1)
|
|
|
|
{
|
|
|
|
Index = ListView_GetSelectionMark(hProcessPageListCtrl);
|
|
|
|
|
|
|
|
memset(&lvitem, 0, sizeof(LVITEM));
|
|
|
|
|
|
|
|
lvitem.mask = LVIF_PARAM;
|
|
|
|
lvitem.iItem = Index;
|
|
|
|
|
|
|
|
(void)ListView_GetItem(hProcessPageListCtrl, &lvitem);
|
|
|
|
|
|
|
|
if (lvitem.lParam)
|
2010-04-10 12:49:41 +00:00
|
|
|
return ((LPPROCESS_PAGE_LIST_ITEM)lvitem.lParam)->ProcessId;
|
2009-06-28 14:22:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2014-12-15 20:33:26 +00:00
|
|
|
void ProcessPageUpdate(void)
|
|
|
|
{
|
|
|
|
/* Enable or disable the "End Process" button */
|
|
|
|
if (ListView_GetSelectedCount(hProcessPageListCtrl))
|
|
|
|
EnableWindow(hProcessPageEndProcessButton, TRUE);
|
|
|
|
else
|
|
|
|
EnableWindow(hProcessPageEndProcessButton, FALSE);
|
|
|
|
}
|
|
|
|
|
2004-10-11 21:08:06 +00:00
|
|
|
INT_PTR CALLBACK
|
|
|
|
ProcessPageWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
|
2004-01-10 02:14:13 +00:00
|
|
|
{
|
2007-10-31 23:26:27 +00:00
|
|
|
RECT rc;
|
|
|
|
int nXDifference;
|
|
|
|
int nYDifference;
|
|
|
|
int cx, cy;
|
2004-01-10 02:14:13 +00:00
|
|
|
|
|
|
|
switch (message) {
|
|
|
|
case WM_INITDIALOG:
|
|
|
|
/*
|
|
|
|
* Save the width and height
|
|
|
|
*/
|
|
|
|
GetClientRect(hDlg, &rc);
|
|
|
|
nProcessPageWidth = rc.right;
|
|
|
|
nProcessPageHeight = rc.bottom;
|
|
|
|
|
|
|
|
/* Update window position */
|
|
|
|
SetWindowPos(hDlg, NULL, 15, 30, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER);
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Get handles to the controls
|
|
|
|
*/
|
|
|
|
hProcessPageListCtrl = GetDlgItem(hDlg, IDC_PROCESSLIST);
|
|
|
|
hProcessPageHeaderCtrl = ListView_GetHeader(hProcessPageListCtrl);
|
|
|
|
hProcessPageEndProcessButton = GetDlgItem(hDlg, IDC_ENDPROCESS);
|
|
|
|
hProcessPageShowAllProcessesButton = GetDlgItem(hDlg, IDC_SHOWALLPROCESSES);
|
|
|
|
|
|
|
|
/*
|
2009-02-20 21:31:31 +00:00
|
|
|
* Set the title, and extended window styles for the list control
|
2004-01-10 02:14:13 +00:00
|
|
|
*/
|
2007-11-09 15:26:02 +00:00
|
|
|
SetWindowTextW(hProcessPageListCtrl, L"Processes");
|
2006-03-04 17:27:40 +00:00
|
|
|
(void)ListView_SetExtendedListViewStyle(hProcessPageListCtrl, ListView_GetExtendedListViewStyle(hProcessPageListCtrl) | LVS_EX_FULLROWSELECT | LVS_EX_HEADERDRAGDROP);
|
2004-01-10 02:14:13 +00:00
|
|
|
|
|
|
|
AddColumns();
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Subclass the process list control so we can intercept WM_ERASEBKGND
|
|
|
|
*/
|
2014-10-11 12:39:50 +00:00
|
|
|
OldProcessListWndProc = (WNDPROC)SetWindowLongPtrW(hProcessPageListCtrl, GWLP_WNDPROC, (LONG_PTR)ProcessListWndProc);
|
2004-01-10 02:14:13 +00:00
|
|
|
|
2010-08-08 03:41:33 +00:00
|
|
|
#ifdef RUN_PROC_PAGE
|
2004-01-10 02:14:13 +00:00
|
|
|
/* Start our refresh thread */
|
2010-08-08 03:41:33 +00:00
|
|
|
hProcessThread = CreateThread(NULL, 0, ProcessPageRefreshThread, NULL, 0, &dwProcessThread);
|
|
|
|
#endif
|
2014-12-15 20:33:26 +00:00
|
|
|
|
2014-12-15 20:45:38 +00:00
|
|
|
/* Refresh page */
|
2014-12-15 20:33:26 +00:00
|
|
|
ProcessPageUpdate();
|
2004-01-10 02:14:13 +00:00
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
case WM_DESTROY:
|
|
|
|
/* Close the event handle, this will make the */
|
|
|
|
/* refresh thread exit when the wait fails */
|
2010-08-08 03:41:33 +00:00
|
|
|
#ifdef RUN_PROC_PAGE
|
|
|
|
EndLocalThread(&hProcessThread, dwProcessThread);
|
|
|
|
#endif
|
2004-01-10 02:14:13 +00:00
|
|
|
SaveColumnSettings();
|
2015-04-12 15:45:40 +00:00
|
|
|
Cleanup();
|
2004-01-10 02:14:13 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_COMMAND:
|
2005-01-02 20:47:34 +00:00
|
|
|
/* Handle the button clicks */
|
|
|
|
switch (LOWORD(wParam))
|
|
|
|
{
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
case IDC_ENDPROCESS:
|
|
|
|
ProcessPage_OnEndProcess();
|
2005-01-02 20:47:34 +00:00
|
|
|
}
|
2004-01-10 02:14:13 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_SIZE:
|
|
|
|
if (wParam == SIZE_MINIMIZED)
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
cx = LOWORD(lParam);
|
|
|
|
cy = HIWORD(lParam);
|
|
|
|
nXDifference = cx - nProcessPageWidth;
|
|
|
|
nYDifference = cy - nProcessPageHeight;
|
|
|
|
nProcessPageWidth = cx;
|
|
|
|
nProcessPageHeight = cy;
|
|
|
|
|
|
|
|
/* Reposition the application page's controls */
|
|
|
|
GetWindowRect(hProcessPageListCtrl, &rc);
|
|
|
|
cx = (rc.right - rc.left) + nXDifference;
|
|
|
|
cy = (rc.bottom - rc.top) + nYDifference;
|
|
|
|
SetWindowPos(hProcessPageListCtrl, NULL, 0, 0, cx, cy, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOMOVE|SWP_NOZORDER);
|
|
|
|
InvalidateRect(hProcessPageListCtrl, NULL, TRUE);
|
2005-05-08 04:07:56 +00:00
|
|
|
|
2004-01-10 02:14:13 +00:00
|
|
|
GetClientRect(hProcessPageEndProcessButton, &rc);
|
2014-08-24 17:07:43 +00:00
|
|
|
MapWindowPoints(hProcessPageEndProcessButton, hDlg, (LPPOINT)(PRECT)(&rc), sizeof(RECT)/sizeof(POINT));
|
2004-01-10 02:14:13 +00:00
|
|
|
cx = rc.left + nXDifference;
|
|
|
|
cy = rc.top + nYDifference;
|
|
|
|
SetWindowPos(hProcessPageEndProcessButton, NULL, cx, cy, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER);
|
|
|
|
InvalidateRect(hProcessPageEndProcessButton, NULL, TRUE);
|
2005-05-08 04:07:56 +00:00
|
|
|
|
2004-01-10 02:14:13 +00:00
|
|
|
GetClientRect(hProcessPageShowAllProcessesButton, &rc);
|
2014-08-24 17:07:43 +00:00
|
|
|
MapWindowPoints(hProcessPageShowAllProcessesButton, hDlg, (LPPOINT)(PRECT)(&rc), sizeof(RECT)/sizeof(POINT));
|
2004-01-10 02:14:13 +00:00
|
|
|
cx = rc.left;
|
|
|
|
cy = rc.top + nYDifference;
|
|
|
|
SetWindowPos(hProcessPageShowAllProcessesButton, NULL, cx, cy, 0, 0, SWP_NOACTIVATE|SWP_NOOWNERZORDER|SWP_NOSIZE|SWP_NOZORDER);
|
|
|
|
InvalidateRect(hProcessPageShowAllProcessesButton, NULL, TRUE);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case WM_NOTIFY:
|
|
|
|
ProcessPageOnNotify(wParam, lParam);
|
|
|
|
break;
|
2010-12-05 10:27:45 +00:00
|
|
|
|
|
|
|
case WM_KEYDOWN:
|
|
|
|
if (wParam == VK_DELETE)
|
|
|
|
ProcessPage_OnEndProcess();
|
|
|
|
break;
|
2004-01-10 02:14:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void ProcessPageOnNotify(WPARAM wParam, LPARAM lParam)
|
|
|
|
{
|
2007-10-31 23:26:27 +00:00
|
|
|
LPNMHDR pnmh;
|
|
|
|
NMLVDISPINFO* pnmdi;
|
|
|
|
LPNMHEADER pnmhdr;
|
|
|
|
ULONG Index;
|
|
|
|
ULONG ColumnIndex;
|
2009-06-27 19:16:29 +00:00
|
|
|
LPPROCESS_PAGE_LIST_ITEM pData;
|
2004-01-10 02:14:13 +00:00
|
|
|
|
|
|
|
pnmh = (LPNMHDR) lParam;
|
|
|
|
pnmdi = (NMLVDISPINFO*) lParam;
|
|
|
|
pnmhdr = (LPNMHEADER) lParam;
|
|
|
|
|
|
|
|
if (pnmh->hwndFrom == hProcessPageListCtrl)
|
|
|
|
{
|
|
|
|
switch (pnmh->code)
|
|
|
|
{
|
|
|
|
case LVN_ITEMCHANGED:
|
|
|
|
ProcessPageUpdate();
|
|
|
|
break;
|
|
|
|
case LVN_GETDISPINFO:
|
|
|
|
if (!(pnmdi->item.mask & LVIF_TEXT))
|
|
|
|
break;
|
2009-06-27 19:16:29 +00:00
|
|
|
pData = (LPPROCESS_PAGE_LIST_ITEM)pnmdi->item.lParam;
|
2010-04-10 12:49:41 +00:00
|
|
|
Index = PerfDataGetProcessIndex(pData->ProcessId);
|
2004-01-10 02:14:13 +00:00
|
|
|
ColumnIndex = pnmdi->item.iSubItem;
|
2014-11-23 20:10:15 +00:00
|
|
|
PerfDataGetText(Index, ColumnIndex, pnmdi->item.pszText, (ULONG)pnmdi->item.cchTextMax);
|
2004-01-10 02:14:13 +00:00
|
|
|
break;
|
|
|
|
case NM_RCLICK:
|
2009-06-28 14:22:09 +00:00
|
|
|
ProcessPageShowContextMenu(GetSelectedProcessId());
|
2004-01-10 02:14:13 +00:00
|
|
|
break;
|
2010-12-05 10:27:45 +00:00
|
|
|
case LVN_KEYDOWN:
|
|
|
|
if (((LPNMLVKEYDOWN)lParam)->wVKey == VK_DELETE)
|
|
|
|
ProcessPage_OnEndProcess();
|
|
|
|
break;
|
2004-01-10 02:14:13 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (pnmh->hwndFrom == hProcessPageHeaderCtrl)
|
|
|
|
{
|
|
|
|
switch (pnmh->code)
|
|
|
|
{
|
|
|
|
case HDN_ITEMCLICK:
|
2009-06-28 14:22:09 +00:00
|
|
|
TaskManagerSettings.SortColumn = ColumnDataHints[pnmhdr->iItem];
|
|
|
|
TaskManagerSettings.SortAscending = !TaskManagerSettings.SortAscending;
|
2009-06-27 19:16:29 +00:00
|
|
|
(void)ListView_SortItems(hProcessPageListCtrl, ProcessPageCompareFunc, NULL);
|
2004-01-10 02:14:13 +00:00
|
|
|
break;
|
|
|
|
case HDN_ITEMCHANGED:
|
|
|
|
UpdateColumnDataHints();
|
|
|
|
break;
|
|
|
|
case HDN_ENDDRAG:
|
|
|
|
UpdateColumnDataHints();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-11-23 20:10:15 +00:00
|
|
|
void CommaSeparateNumberString(LPWSTR strNumber, ULONG nMaxCount)
|
2004-01-10 02:14:13 +00:00
|
|
|
{
|
2007-10-31 23:26:27 +00:00
|
|
|
WCHAR temp[260];
|
|
|
|
UINT i, j, k;
|
2004-01-10 02:14:13 +00:00
|
|
|
|
2007-10-31 23:26:27 +00:00
|
|
|
for (i=0,j=0; i<(wcslen(strNumber) % 3); i++, j++)
|
2004-01-10 02:14:13 +00:00
|
|
|
temp[j] = strNumber[i];
|
2007-10-31 23:26:27 +00:00
|
|
|
for (k=0; i<wcslen(strNumber); i++,j++,k++) {
|
2004-01-10 02:14:13 +00:00
|
|
|
if ((k % 3 == 0) && (j > 0))
|
2007-10-31 23:26:27 +00:00
|
|
|
temp[j++] = L',';
|
2004-01-10 02:14:13 +00:00
|
|
|
temp[j] = strNumber[i];
|
|
|
|
}
|
2007-10-31 23:26:27 +00:00
|
|
|
temp[j] = L'\0';
|
|
|
|
wcsncpy(strNumber, temp, nMaxCount);
|
2004-01-10 02:14:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void ProcessPageShowContextMenu(DWORD dwProcessId)
|
|
|
|
{
|
|
|
|
HMENU hMenu;
|
|
|
|
HMENU hSubMenu;
|
|
|
|
HMENU hPriorityMenu;
|
|
|
|
POINT pt;
|
2007-10-31 23:26:27 +00:00
|
|
|
SYSTEM_INFO si;
|
|
|
|
HANDLE hProcess;
|
2004-01-10 02:14:13 +00:00
|
|
|
DWORD dwProcessPriorityClass;
|
2007-10-31 23:26:27 +00:00
|
|
|
WCHAR strDebugger[260];
|
2004-01-10 02:14:13 +00:00
|
|
|
DWORD dwDebuggerSize;
|
2007-10-31 23:26:27 +00:00
|
|
|
HKEY hKey;
|
2004-01-10 02:14:13 +00:00
|
|
|
|
[0.4.7][TASKMGR] Backport many fixes and improvements
Some commits I do port back all the way down till releases/0.4.7:
partially 0.4.15-dev-6768-g 63eaf2bd529f5bf94cde65afc26944e98b47850b [TASKMGR] *.rc Deduplicate dynamic menu strings (#5772) (I left out the FIXME-comments)
0.4.15-dev-6712-g 46b4b5581d1fc4c1b50cfc0ee8b82b77be182dc6 [TASKMGR] Favor _countof(), no functional change intended (#5757)
0.4.15-dev-6703-g 6528ab8fcb41eb47ee17cf738760126e6758af94 [TASKMGR] de-DE.rc Update part 3
0.4.15-dev-6702-g 65ce20896afa19032612871506dd5d1e8eb73119 [TASKMGR] *.rc Strip unused IDD_DEBUG_CHANNELS_DIALOG
0.4.15-dev-6700-g e15d68ba5d9906674b363cf8362ed08494e53a76 [TASKMGR] de-DE German Update & bug-fixes
partially 0.4.15-dev-6447-g 016acd170dd75a7a24af235339a5321e2c24bf5a [TASKMGR] Do not free shared icon for ShellAbout() calls (I picked just the taskmgr part) (was part of larger PR5519)
0.4.15-dev-6297-g 831288fe691ec311c5b910f05d9b833b4b952261 [TASKMGR] Fix text truncation for fr-FR.rc (#5380) CORE-18523
0.4.15-dev-6127-g c706222f3f1b2a63e8cc969ee756c8be92527853 [TASKMGR] Fix the license. Turns out it's LGPL-2.1-or-later from the texts.
0.4.15-dev-6124-g 9927163455b83fea29c6420a688535b8e233bff6 [TASKMGR] Reorder page controls to have natural TAB-ordering.
0.4.15-dev-6122-g d5707eefe2f08d230c07ab4693ac0bd59e809f85 [TASKMGR] High speed update is twice per second, and not every second.
0.4.15-dev-6121-g 2da0506f2a9fc02acede7d7ff479399013830fad [TASKMGR] Remove more dead code.
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code. (I left out using the strsafe.h-dependent stuff, as this is safe also in old-style)
0.4.15-dev-6119-g 0b4c8bdd1cb4cf1a50c1076c7ded19ee7e9f9198 [TASKMGR] Clamp the values returned from PerfDataGetProcessorUsage() and PerfDataGetProcessorSystemUsage() inside these functions.
0.4.15-dev-6118-g 7b53126375ee8889cf24615fa2ea646feabee0ae [TASKMGR] Completely reformat perfpage.c, perfpage.h, procpage.h and trayicon.c
partially 0.4.15-dev-6117-g da7dcec6a06c052339120ed4baa3caf24594f163 [TASKMGR] Reformat the files' headers
0.4.15-dev-6115-g 36aea8e56eb6eb9f1cab5fd6ce040b80ef6a302f [TASKMGR] affinity.c: Use _countof instead of sizeof/sizeof (was part of the larger CORE18991)
partially 0.4.15-dev-6109-g 99fb812be4ba86139438bf7961f2030ac9e016be [TASKMGR] Refactor trayicon.c
0.4.15-dev-5404-g c093d4f8038e7ddec1ca193edc573c48e12f12ff [TASKMGR] Prevent context menu on idle process (#4889) CORE-18640
0.4.15-dev-5031-g 46ea5171bdfaba2606486e27821fdd9ee88e551a [TASKMGR] Pixel-perfection for left border (#4680) CORE-18061
0.4.15-dev-4988-g de5af76811bbd318cdef46e193f306833e3fa740 [TASKMGR] Fix overlapping controls (French only) (#4658)
0.4.15-dev-4987-g f8c28b977363444ad31124a6794347c53532b43f [TASKMGR] Fix UI on SwitchTo for multiple application (#4652)
0.4.15-dev-3497-g e8a7e0da2bcbd842f95e4224e72bfb5d748dbd05 [TASKMGR] Make 'Hide When Minimized' non-default (#4169)
0.4.15-dev-3085-g 515e0cf38f8d07e59bb003f930eb08d33dc5f85d [TASKMGR] Handles: Get number only, skip data (#3910)
and a few *.rc improvements that are not explicitly mentioned here,
especially I stripped the menuLoop-statusbar-help-texts within the older branches.
A few improvements are still left to be done in a future commit (mostly around the plotgraphs and the trayicon-handling),
but I need to have a closer look at them and their impact on binary size,
so I do not want to squash them into this bigger backport,
where I concentrated on the safe/obvious and easy things.
Binary size decreases for all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 708.608 -> 696.832 (0.4.15-dev-6768-g63eaf2b)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 660.992 -> 549.888
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 659.968 -> 542.720
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 531.456
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE -> 110.080 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 108.032 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 107.520 Bytes
2023-10-19 15:25:14 +02:00
|
|
|
if (dwProcessId == 0)
|
|
|
|
return;
|
|
|
|
|
2004-01-10 02:14:13 +00:00
|
|
|
memset(&si, 0, sizeof(SYSTEM_INFO));
|
|
|
|
|
|
|
|
GetCursorPos(&pt);
|
|
|
|
GetSystemInfo(&si);
|
|
|
|
|
2007-11-09 15:26:02 +00:00
|
|
|
hMenu = LoadMenuW(hInst, MAKEINTRESOURCEW(IDR_PROCESS_PAGE_CONTEXT));
|
2004-01-10 02:14:13 +00:00
|
|
|
hSubMenu = GetSubMenu(hMenu, 0);
|
|
|
|
hPriorityMenu = GetSubMenu(hSubMenu, 4);
|
|
|
|
|
|
|
|
hProcess = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, dwProcessId);
|
|
|
|
dwProcessPriorityClass = GetPriorityClass(hProcess);
|
|
|
|
CloseHandle(hProcess);
|
|
|
|
|
|
|
|
if (si.dwNumberOfProcessors < 2)
|
|
|
|
RemoveMenu(hSubMenu, ID_PROCESS_PAGE_SETAFFINITY, MF_BYCOMMAND);
|
2005-05-08 04:07:56 +00:00
|
|
|
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
switch (dwProcessPriorityClass) {
|
2004-01-10 02:14:13 +00:00
|
|
|
case REALTIME_PRIORITY_CLASS:
|
|
|
|
CheckMenuRadioItem(hPriorityMenu, ID_PROCESS_PAGE_SETPRIORITY_REALTIME, ID_PROCESS_PAGE_SETPRIORITY_LOW, ID_PROCESS_PAGE_SETPRIORITY_REALTIME, MF_BYCOMMAND);
|
|
|
|
break;
|
|
|
|
case HIGH_PRIORITY_CLASS:
|
|
|
|
CheckMenuRadioItem(hPriorityMenu, ID_PROCESS_PAGE_SETPRIORITY_REALTIME, ID_PROCESS_PAGE_SETPRIORITY_LOW, ID_PROCESS_PAGE_SETPRIORITY_HIGH, MF_BYCOMMAND);
|
|
|
|
break;
|
|
|
|
case ABOVE_NORMAL_PRIORITY_CLASS:
|
|
|
|
CheckMenuRadioItem(hPriorityMenu, ID_PROCESS_PAGE_SETPRIORITY_REALTIME, ID_PROCESS_PAGE_SETPRIORITY_LOW, ID_PROCESS_PAGE_SETPRIORITY_ABOVENORMAL, MF_BYCOMMAND);
|
|
|
|
break;
|
|
|
|
case NORMAL_PRIORITY_CLASS:
|
|
|
|
CheckMenuRadioItem(hPriorityMenu, ID_PROCESS_PAGE_SETPRIORITY_REALTIME, ID_PROCESS_PAGE_SETPRIORITY_LOW, ID_PROCESS_PAGE_SETPRIORITY_NORMAL, MF_BYCOMMAND);
|
|
|
|
break;
|
|
|
|
case BELOW_NORMAL_PRIORITY_CLASS:
|
|
|
|
CheckMenuRadioItem(hPriorityMenu, ID_PROCESS_PAGE_SETPRIORITY_REALTIME, ID_PROCESS_PAGE_SETPRIORITY_LOW, ID_PROCESS_PAGE_SETPRIORITY_BELOWNORMAL, MF_BYCOMMAND);
|
|
|
|
break;
|
|
|
|
case IDLE_PRIORITY_CLASS:
|
|
|
|
CheckMenuRadioItem(hPriorityMenu, ID_PROCESS_PAGE_SETPRIORITY_REALTIME, ID_PROCESS_PAGE_SETPRIORITY_LOW, ID_PROCESS_PAGE_SETPRIORITY_LOW, MF_BYCOMMAND);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2007-11-09 15:26:02 +00:00
|
|
|
if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows NT\\CurrentVersion\\AeDebug", 0, KEY_READ, &hKey) == ERROR_SUCCESS)
|
2004-01-10 02:14:13 +00:00
|
|
|
{
|
2016-10-09 20:58:08 +00:00
|
|
|
dwDebuggerSize = sizeof(strDebugger);
|
2007-11-09 15:26:02 +00:00
|
|
|
if (RegQueryValueExW(hKey, L"Debugger", NULL, NULL, (LPBYTE)strDebugger, &dwDebuggerSize) == ERROR_SUCCESS)
|
2004-01-10 02:14:13 +00:00
|
|
|
{
|
2008-02-15 19:22:55 +00:00
|
|
|
CharUpper(strDebugger);
|
2007-10-31 23:26:27 +00:00
|
|
|
if (wcsstr(strDebugger, L"DRWTSN32"))
|
2004-01-10 02:14:13 +00:00
|
|
|
EnableMenuItem(hSubMenu, ID_PROCESS_PAGE_DEBUG, MF_BYCOMMAND|MF_DISABLED|MF_GRAYED);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
EnableMenuItem(hSubMenu, ID_PROCESS_PAGE_DEBUG, MF_BYCOMMAND|MF_DISABLED|MF_GRAYED);
|
|
|
|
|
|
|
|
RegCloseKey(hKey);
|
|
|
|
} else {
|
|
|
|
EnableMenuItem(hSubMenu, ID_PROCESS_PAGE_DEBUG, MF_BYCOMMAND|MF_DISABLED|MF_GRAYED);
|
|
|
|
}
|
|
|
|
TrackPopupMenu(hSubMenu, TPM_LEFTALIGN|TPM_TOPALIGN|TPM_LEFTBUTTON, pt.x, pt.y, 0, hMainWnd, NULL);
|
|
|
|
DestroyMenu(hMenu);
|
|
|
|
}
|
|
|
|
|
|
|
|
void RefreshProcessPage(void)
|
|
|
|
{
|
2010-08-08 03:41:33 +00:00
|
|
|
#ifdef RUN_PROC_PAGE
|
2004-01-10 02:14:13 +00:00
|
|
|
/* Signal the event so that our refresh thread */
|
|
|
|
/* will wake up and refresh the process page */
|
2010-08-08 03:41:33 +00:00
|
|
|
PostThreadMessage(dwProcessThread, WM_TIMER, 0, 0);
|
|
|
|
#endif
|
2004-01-10 02:14:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
DWORD WINAPI ProcessPageRefreshThread(void *lpParameter)
|
|
|
|
{
|
2010-08-08 03:41:33 +00:00
|
|
|
MSG msg;
|
2004-01-10 02:14:13 +00:00
|
|
|
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
for (;;) {
|
|
|
|
// Wait for an the event or application close
|
2010-08-08 03:41:33 +00:00
|
|
|
if (GetMessage(&msg, NULL, 0, 0) <= 0)
|
2004-01-10 02:14:13 +00:00
|
|
|
return 0;
|
|
|
|
|
2010-08-08 03:41:33 +00:00
|
|
|
if (msg.message == WM_TIMER) {
|
2009-06-27 19:16:29 +00:00
|
|
|
UpdateProcesses();
|
2004-01-10 02:14:13 +00:00
|
|
|
|
|
|
|
if (IsWindowVisible(hProcessPage))
|
|
|
|
InvalidateRect(hProcessPageListCtrl, NULL, FALSE);
|
|
|
|
|
2014-12-15 20:45:38 +00:00
|
|
|
ProcessPageUpdate();
|
2004-01-10 02:14:13 +00:00
|
|
|
}
|
|
|
|
}
|
2007-10-31 23:26:27 +00:00
|
|
|
return 0;
|
2004-01-10 02:14:13 +00:00
|
|
|
}
|
2009-06-27 19:16:29 +00:00
|
|
|
|
|
|
|
void UpdateProcesses()
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
ULONG l;
|
2010-04-10 12:49:41 +00:00
|
|
|
LV_ITEM item;
|
2009-06-27 19:16:29 +00:00
|
|
|
LPPROCESS_PAGE_LIST_ITEM pData;
|
|
|
|
|
2011-04-29 21:49:37 +00:00
|
|
|
SendMessage(hProcessPageListCtrl, WM_SETREDRAW, FALSE, 0);
|
|
|
|
|
2009-06-27 19:16:29 +00:00
|
|
|
/* Remove old processes */
|
|
|
|
for (i = 0; i < ListView_GetItemCount(hProcessPageListCtrl); i++)
|
|
|
|
{
|
|
|
|
memset(&item, 0, sizeof (LV_ITEM));
|
|
|
|
item.mask = LVIF_PARAM;
|
|
|
|
item.iItem = i;
|
|
|
|
(void)ListView_GetItem(hProcessPageListCtrl, &item);
|
|
|
|
pData = (LPPROCESS_PAGE_LIST_ITEM)item.lParam;
|
2009-09-17 16:07:37 +00:00
|
|
|
if (!ProcessRunning(pData->ProcessId))
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-08 22:21:17 +00:00
|
|
|
(void)ListView_DeleteItem(hProcessPageListCtrl, i);
|
2009-06-27 19:16:29 +00:00
|
|
|
HeapFree(GetProcessHeap(), 0, pData);
|
|
|
|
}
|
|
|
|
}
|
2010-04-10 12:49:41 +00:00
|
|
|
|
|
|
|
/* Check for difference in listview process and performance process counts */
|
|
|
|
if (ListView_GetItemCount(hProcessPageListCtrl) != PerfDataGetProcessCount())
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
/* Add new processes by checking against the current items */
|
|
|
|
for (l = 0; l < PerfDataGetProcessCount(); l++)
|
|
|
|
AddProcess(l);
|
2009-06-27 19:16:29 +00:00
|
|
|
}
|
2010-04-10 12:49:41 +00:00
|
|
|
|
2009-06-28 14:22:09 +00:00
|
|
|
if (TaskManagerSettings.SortColumn != -1)
|
2009-06-27 19:16:29 +00:00
|
|
|
(void)ListView_SortItems(hProcessPageListCtrl, ProcessPageCompareFunc, NULL);
|
2011-04-29 21:49:37 +00:00
|
|
|
|
|
|
|
SendMessage(hProcessPageListCtrl, WM_SETREDRAW, TRUE, 0);
|
2014-12-15 20:33:26 +00:00
|
|
|
|
|
|
|
/* Select first item if any */
|
2022-02-27 22:54:28 +01:00
|
|
|
if ((ListView_GetNextItem(hProcessPageListCtrl, -1, LVNI_FOCUSED | LVNI_SELECTED) == -1) &&
|
2014-12-15 20:33:26 +00:00
|
|
|
(ListView_GetItemCount(hProcessPageListCtrl) > 0) && !bProcessPageSelectionMade)
|
|
|
|
{
|
|
|
|
ListView_SetItemState(hProcessPageListCtrl, 0, LVIS_FOCUSED | LVIS_SELECTED, LVIS_FOCUSED | LVIS_SELECTED);
|
|
|
|
bProcessPageSelectionMade = TRUE;
|
|
|
|
}
|
2009-06-27 19:16:29 +00:00
|
|
|
}
|
|
|
|
|
2022-02-27 22:54:28 +01:00
|
|
|
BOOL ProcessRunning(ULONG ProcessId)
|
2009-09-17 16:07:37 +00:00
|
|
|
{
|
2014-01-19 08:52:21 +00:00
|
|
|
HANDLE hProcess;
|
|
|
|
DWORD exitCode;
|
|
|
|
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
if (ProcessId == 0)
|
2014-01-19 08:52:21 +00:00
|
|
|
return TRUE;
|
|
|
|
|
|
|
|
hProcess = OpenProcess(PROCESS_ALL_ACCESS, FALSE, ProcessId);
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
if (hProcess == NULL)
|
2014-01-19 08:52:21 +00:00
|
|
|
return FALSE;
|
|
|
|
|
|
|
|
if (GetExitCodeProcess(hProcess, &exitCode)) {
|
|
|
|
CloseHandle(hProcess);
|
|
|
|
return (exitCode == STILL_ACTIVE);
|
|
|
|
}
|
|
|
|
|
|
|
|
CloseHandle(hProcess);
|
|
|
|
return FALSE;
|
2009-09-17 16:07:37 +00:00
|
|
|
}
|
|
|
|
|
2009-06-27 19:16:29 +00:00
|
|
|
void AddProcess(ULONG Index)
|
|
|
|
{
|
|
|
|
LPPROCESS_PAGE_LIST_ITEM pData;
|
|
|
|
int i;
|
|
|
|
LV_ITEM item;
|
|
|
|
BOOL bAlreadyInList = FALSE;
|
|
|
|
ULONG pid;
|
|
|
|
|
|
|
|
pid = PerfDataGetProcessId(Index);
|
|
|
|
|
|
|
|
/* Check to see if it's already in our list */
|
|
|
|
for (i=0; i<ListView_GetItemCount(hProcessPageListCtrl); i++)
|
|
|
|
{
|
|
|
|
memset(&item, 0, sizeof(LV_ITEM));
|
|
|
|
item.mask = LVIF_PARAM;
|
|
|
|
item.iItem = i;
|
|
|
|
(void)ListView_GetItem(hProcessPageListCtrl, &item);
|
|
|
|
pData = (LPPROCESS_PAGE_LIST_ITEM)item.lParam;
|
2010-04-10 12:49:41 +00:00
|
|
|
if (pData->ProcessId == pid)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
|
|
|
bAlreadyInList = TRUE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!bAlreadyInList) /* Add */
|
|
|
|
{
|
|
|
|
pData = (LPPROCESS_PAGE_LIST_ITEM)HeapAlloc(GetProcessHeap(), 0, sizeof(PROCESS_PAGE_LIST_ITEM));
|
2009-09-17 16:07:37 +00:00
|
|
|
pData->ProcessId = pid;
|
2009-10-27 10:34:16 +00:00
|
|
|
|
2009-06-27 19:16:29 +00:00
|
|
|
/* Add the item to the list */
|
|
|
|
memset(&item, 0, sizeof(LV_ITEM));
|
|
|
|
item.mask = LVIF_TEXT|LVIF_PARAM;
|
|
|
|
item.pszText = LPSTR_TEXTCALLBACK;
|
|
|
|
item.iItem = ListView_GetItemCount(hProcessPageListCtrl);
|
|
|
|
item.lParam = (LPARAM)pData;
|
|
|
|
(void)ListView_InsertItem(hProcessPageListCtrl, &item);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-11-23 20:10:15 +00:00
|
|
|
BOOL PerfDataGetText(ULONG Index, ULONG ColumnIndex, LPTSTR lpText, ULONG nMaxCount)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
[0.4.7][TASKMGR] Backport many fixes and improvements
Some commits I do port back all the way down till releases/0.4.7:
partially 0.4.15-dev-6768-g 63eaf2bd529f5bf94cde65afc26944e98b47850b [TASKMGR] *.rc Deduplicate dynamic menu strings (#5772) (I left out the FIXME-comments)
0.4.15-dev-6712-g 46b4b5581d1fc4c1b50cfc0ee8b82b77be182dc6 [TASKMGR] Favor _countof(), no functional change intended (#5757)
0.4.15-dev-6703-g 6528ab8fcb41eb47ee17cf738760126e6758af94 [TASKMGR] de-DE.rc Update part 3
0.4.15-dev-6702-g 65ce20896afa19032612871506dd5d1e8eb73119 [TASKMGR] *.rc Strip unused IDD_DEBUG_CHANNELS_DIALOG
0.4.15-dev-6700-g e15d68ba5d9906674b363cf8362ed08494e53a76 [TASKMGR] de-DE German Update & bug-fixes
partially 0.4.15-dev-6447-g 016acd170dd75a7a24af235339a5321e2c24bf5a [TASKMGR] Do not free shared icon for ShellAbout() calls (I picked just the taskmgr part) (was part of larger PR5519)
0.4.15-dev-6297-g 831288fe691ec311c5b910f05d9b833b4b952261 [TASKMGR] Fix text truncation for fr-FR.rc (#5380) CORE-18523
0.4.15-dev-6127-g c706222f3f1b2a63e8cc969ee756c8be92527853 [TASKMGR] Fix the license. Turns out it's LGPL-2.1-or-later from the texts.
0.4.15-dev-6124-g 9927163455b83fea29c6420a688535b8e233bff6 [TASKMGR] Reorder page controls to have natural TAB-ordering.
0.4.15-dev-6122-g d5707eefe2f08d230c07ab4693ac0bd59e809f85 [TASKMGR] High speed update is twice per second, and not every second.
0.4.15-dev-6121-g 2da0506f2a9fc02acede7d7ff479399013830fad [TASKMGR] Remove more dead code.
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code. (I left out using the strsafe.h-dependent stuff, as this is safe also in old-style)
0.4.15-dev-6119-g 0b4c8bdd1cb4cf1a50c1076c7ded19ee7e9f9198 [TASKMGR] Clamp the values returned from PerfDataGetProcessorUsage() and PerfDataGetProcessorSystemUsage() inside these functions.
0.4.15-dev-6118-g 7b53126375ee8889cf24615fa2ea646feabee0ae [TASKMGR] Completely reformat perfpage.c, perfpage.h, procpage.h and trayicon.c
partially 0.4.15-dev-6117-g da7dcec6a06c052339120ed4baa3caf24594f163 [TASKMGR] Reformat the files' headers
0.4.15-dev-6115-g 36aea8e56eb6eb9f1cab5fd6ce040b80ef6a302f [TASKMGR] affinity.c: Use _countof instead of sizeof/sizeof (was part of the larger CORE18991)
partially 0.4.15-dev-6109-g 99fb812be4ba86139438bf7961f2030ac9e016be [TASKMGR] Refactor trayicon.c
0.4.15-dev-5404-g c093d4f8038e7ddec1ca193edc573c48e12f12ff [TASKMGR] Prevent context menu on idle process (#4889) CORE-18640
0.4.15-dev-5031-g 46ea5171bdfaba2606486e27821fdd9ee88e551a [TASKMGR] Pixel-perfection for left border (#4680) CORE-18061
0.4.15-dev-4988-g de5af76811bbd318cdef46e193f306833e3fa740 [TASKMGR] Fix overlapping controls (French only) (#4658)
0.4.15-dev-4987-g f8c28b977363444ad31124a6794347c53532b43f [TASKMGR] Fix UI on SwitchTo for multiple application (#4652)
0.4.15-dev-3497-g e8a7e0da2bcbd842f95e4224e72bfb5d748dbd05 [TASKMGR] Make 'Hide When Minimized' non-default (#4169)
0.4.15-dev-3085-g 515e0cf38f8d07e59bb003f930eb08d33dc5f85d [TASKMGR] Handles: Get number only, skip data (#3910)
and a few *.rc improvements that are not explicitly mentioned here,
especially I stripped the menuLoop-statusbar-help-texts within the older branches.
A few improvements are still left to be done in a future commit (mostly around the plotgraphs and the trayicon-handling),
but I need to have a closer look at them and their impact on binary size,
so I do not want to squash them into this bigger backport,
where I concentrated on the safe/obvious and easy things.
Binary size decreases for all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 708.608 -> 696.832 (0.4.15-dev-6768-g63eaf2b)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 660.992 -> 549.888
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 659.968 -> 542.720
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 531.456
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE -> 110.080 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 108.032 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 107.520 Bytes
2023-10-19 15:25:14 +02:00
|
|
|
IO_COUNTERS iocounters;
|
2009-06-27 19:16:29 +00:00
|
|
|
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
switch (ColumnDataHints[ColumnIndex]) {
|
|
|
|
case COLUMN_IMAGENAME:
|
2009-06-27 19:16:29 +00:00
|
|
|
PerfDataGetImageName(Index, lpText, nMaxCount);
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_PID:
|
2013-03-14 17:47:00 +00:00
|
|
|
wsprintfW(lpText, L"%lu", PerfDataGetProcessId(Index));
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_USERNAME:
|
2009-06-27 19:16:29 +00:00
|
|
|
PerfDataGetUserName(Index, lpText, nMaxCount);
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_COMMANDLINE:
|
2014-11-23 20:10:15 +00:00
|
|
|
PerfDataGetCommandLine(Index, lpText, nMaxCount);
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_SESSIONID:
|
2013-03-14 17:47:00 +00:00
|
|
|
wsprintfW(lpText, L"%lu", PerfDataGetSessionId(Index));
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_CPUUSAGE:
|
2013-03-14 17:47:00 +00:00
|
|
|
wsprintfW(lpText, L"%02lu", PerfDataGetCPUUsage(Index));
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_CPUTIME:
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
LARGE_INTEGER time;
|
2009-06-27 19:16:29 +00:00
|
|
|
DWORD dwHours;
|
|
|
|
DWORD dwMinutes;
|
|
|
|
DWORD dwSeconds;
|
|
|
|
|
|
|
|
time = PerfDataGetCPUTime(Index);
|
|
|
|
gethmsfromlargeint(time, &dwHours, &dwMinutes, &dwSeconds);
|
2013-03-14 17:47:00 +00:00
|
|
|
wsprintfW(lpText, L"%lu:%02lu:%02lu", dwHours, dwMinutes, dwSeconds);
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
2009-06-27 19:16:29 +00:00
|
|
|
}
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
case COLUMN_MEMORYUSAGE:
|
2013-03-14 17:47:00 +00:00
|
|
|
wsprintfW(lpText, L"%lu", PerfDataGetWorkingSetSizeBytes(Index) / 1024);
|
2009-06-27 19:16:29 +00:00
|
|
|
CommaSeparateNumberString(lpText, nMaxCount);
|
|
|
|
wcscat(lpText, L" K");
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_PEAKMEMORYUSAGE:
|
2013-03-14 17:47:00 +00:00
|
|
|
wsprintfW(lpText, L"%lu", PerfDataGetPeakWorkingSetSizeBytes(Index) / 1024);
|
2009-06-27 19:16:29 +00:00
|
|
|
CommaSeparateNumberString(lpText, nMaxCount);
|
|
|
|
wcscat(lpText, L" K");
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_MEMORYUSAGEDELTA:
|
2013-03-14 17:47:00 +00:00
|
|
|
wsprintfW(lpText, L"%lu", PerfDataGetWorkingSetSizeDelta(Index) / 1024);
|
2009-06-27 19:16:29 +00:00
|
|
|
CommaSeparateNumberString(lpText, nMaxCount);
|
|
|
|
wcscat(lpText, L" K");
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_PAGEFAULTS:
|
2013-03-14 17:47:00 +00:00
|
|
|
wsprintfW(lpText, L"%lu", PerfDataGetPageFaultCount(Index));
|
2009-06-27 19:16:29 +00:00
|
|
|
CommaSeparateNumberString(lpText, nMaxCount);
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_PAGEFAULTSDELTA:
|
2013-03-14 17:47:00 +00:00
|
|
|
wsprintfW(lpText, L"%lu", PerfDataGetPageFaultCountDelta(Index));
|
2009-06-27 19:16:29 +00:00
|
|
|
CommaSeparateNumberString(lpText, nMaxCount);
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_VIRTUALMEMORYSIZE:
|
2013-03-14 17:47:00 +00:00
|
|
|
wsprintfW(lpText, L"%lu", PerfDataGetVirtualMemorySizeBytes(Index) / 1024);
|
2009-06-27 19:16:29 +00:00
|
|
|
CommaSeparateNumberString(lpText, nMaxCount);
|
|
|
|
wcscat(lpText, L" K");
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_PAGEDPOOL:
|
2013-03-14 17:47:00 +00:00
|
|
|
wsprintfW(lpText, L"%lu", PerfDataGetPagedPoolUsagePages(Index) / 1024);
|
2009-06-27 19:16:29 +00:00
|
|
|
CommaSeparateNumberString(lpText, nMaxCount);
|
|
|
|
wcscat(lpText, L" K");
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_NONPAGEDPOOL:
|
2013-03-14 17:47:00 +00:00
|
|
|
wsprintfW(lpText, L"%lu", PerfDataGetNonPagedPoolUsagePages(Index) / 1024);
|
2009-06-27 19:16:29 +00:00
|
|
|
CommaSeparateNumberString(lpText, nMaxCount);
|
|
|
|
wcscat(lpText, L" K");
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_BASEPRIORITY:
|
2013-03-14 17:47:00 +00:00
|
|
|
wsprintfW(lpText, L"%lu", PerfDataGetBasePriority(Index));
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_HANDLECOUNT:
|
2013-03-14 17:47:00 +00:00
|
|
|
wsprintfW(lpText, L"%lu", PerfDataGetHandleCount(Index));
|
2009-06-27 19:16:29 +00:00
|
|
|
CommaSeparateNumberString(lpText, nMaxCount);
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_THREADCOUNT:
|
2013-03-14 17:47:00 +00:00
|
|
|
wsprintfW(lpText, L"%lu", PerfDataGetThreadCount(Index));
|
2009-06-27 19:16:29 +00:00
|
|
|
CommaSeparateNumberString(lpText, nMaxCount);
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_USEROBJECTS:
|
2013-03-14 17:47:00 +00:00
|
|
|
wsprintfW(lpText, L"%lu", PerfDataGetUSERObjectCount(Index));
|
2009-06-27 19:16:29 +00:00
|
|
|
CommaSeparateNumberString(lpText, nMaxCount);
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_GDIOBJECTS:
|
2013-03-14 17:47:00 +00:00
|
|
|
wsprintfW(lpText, L"%lu", PerfDataGetGDIObjectCount(Index));
|
2009-06-27 19:16:29 +00:00
|
|
|
CommaSeparateNumberString(lpText, nMaxCount);
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_IOREADS:
|
2009-06-27 19:16:29 +00:00
|
|
|
PerfDataGetIOCounters(Index, &iocounters);
|
|
|
|
_ui64tow(iocounters.ReadOperationCount, lpText, 10);
|
|
|
|
CommaSeparateNumberString(lpText, nMaxCount);
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_IOWRITES:
|
2009-06-27 19:16:29 +00:00
|
|
|
PerfDataGetIOCounters(Index, &iocounters);
|
|
|
|
_ui64tow(iocounters.WriteOperationCount, lpText, 10);
|
|
|
|
CommaSeparateNumberString(lpText, nMaxCount);
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_IOOTHER:
|
2009-06-27 19:16:29 +00:00
|
|
|
PerfDataGetIOCounters(Index, &iocounters);
|
|
|
|
_ui64tow(iocounters.OtherOperationCount, lpText, 10);
|
|
|
|
CommaSeparateNumberString(lpText, nMaxCount);
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_IOREADBYTES:
|
2009-06-27 19:16:29 +00:00
|
|
|
PerfDataGetIOCounters(Index, &iocounters);
|
|
|
|
_ui64tow(iocounters.ReadTransferCount, lpText, 10);
|
|
|
|
CommaSeparateNumberString(lpText, nMaxCount);
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_IOWRITEBYTES:
|
2009-06-27 19:16:29 +00:00
|
|
|
PerfDataGetIOCounters(Index, &iocounters);
|
|
|
|
_ui64tow(iocounters.WriteTransferCount, lpText, 10);
|
|
|
|
CommaSeparateNumberString(lpText, nMaxCount);
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
|
|
|
case COLUMN_IOOTHERBYTES:
|
2009-06-27 19:16:29 +00:00
|
|
|
PerfDataGetIOCounters(Index, &iocounters);
|
|
|
|
_ui64tow(iocounters.OtherTransferCount, lpText, 10);
|
|
|
|
CommaSeparateNumberString(lpText, nMaxCount);
|
[0.4.7][TASKMGR] Mainly Graph-stuff backports 2023-10-31
This backports the following commits:
0.4.15-dev-6770-g ddd1d19b3fbf6731eb5339d5834f7f519caeae39 [TASKMGR] Get rid of cplusplus extern c (#5808)
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code
0.4.15-dev-6114-g 9a6c85f68aa0e2ec4595d4673e59f5ade2521a6f [TASKMGR] Fix PerfDataDeallocCommandLineCache, part of CORE-18014 (unresolved still)
0.4.15-dev-6113-g 7989e3f26cafd74c9d8fdeef64deece0da591634 [TASKMGR] GraphCtrl_Dispose: Delete hdcGraph first, part of CORE-18014 (unresolved still)
0.4.15-dev-6112-g dc14a9f6e0d9b6ce3ccc84daba923edb1cc0167f [TASKMGR] GraphCtrl: Use DeleteDC instead of DeleteObject to delete inst->hdcGraph, part of CORE-18014 (unresolved still)
partially 0.4.15-dev-4994-g 15a0f7adb0694107b981bbf6c5292036f1e55d79 picked a tiny part from PR4657 (I picked only the refactoring to switch-statement, no functional changes. Especially NOT the formatting changes which would require the additional winnls.h-include)
0.4.15-dev-3737-g f8faa0b660da189ce00c614e19aa0a47a05d2520 [TASKMGR] Fix a heap corruption bug (#4311), just an addendum to PR4141 which is picked with this backport as well. Older branches were never affected.
partially 0.4.15-dev-3514-g 1c82bf032498d3d107aae7174c5fb179680f0eb5 [TASKMGR] Avoid freezing in getting icons, from (PR4180) CORE17894. I picked only the 1000ms->100ms part and the stripping of WM_QUERYDRAGICON call. Therefore I don't consider CORE17894 as fully covered.
0.4.15-dev-3486-g 545e1190f2caf714ff897d909645adc04178e3a6 [TASKMGR] Avoid hangs as much as possible (#4166) CORE17894
partially 0.4.15-dev-3483-g 403222dd4f73836b38c11a42fa6c3fc1614681d7 [TASKMGR] Preserve graphs history on resizes (#4141). I left aside the structs type renaming and OOM-Handling upon graph creation. Picked all the logical changes though.
0.4.15-dev-3269-g 0ed04e36406fc24b3d08e795a89962c253226f1f [TASKMGR] Make performance graph grid scroll (#3581)
0.4.15-dev-3268-g a4ab9a1e196a21633349496c211756f1e5cdbaf2 [TASKMGR] Formatting only (#3581). Covers the last bits of that PR.
Main motivation was getting the toggling of ShowKernelTimes in the Performance tab
switch on and off in realtime without introducing gaps in the graph.
It also makes the grid scroll together with the data, like on Windows.
Most other parts I picked solely for their binary-shrinking effect.
I decided to strip the ID_HELP_TOPICS from the rc files, as this was not implemented,
and I would never port that back later. So it is one less non-functional-button in the older branches.
I favored memset() over Zeromemory() in this usermode-app everywhere, and favored for (;;) over while(1).
Binary size shrinks slightly on all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 696.832 (0.4.15-dev-6820-gb3194e3)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 549.888 -> 548.864
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 542.720 -> 542.208
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 545.792 -> 543.232
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 532.480 -> 530.432
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 531.456 -> 529.408
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE 110.080 Bytes -> 109.056 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 108.032 Bytes -> 105.984 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US 107.520 Bytes -> 105.472 Bytes
2023-10-31 21:09:58 +01:00
|
|
|
return TRUE;
|
2009-06-27 19:16:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
void gethmsfromlargeint(LARGE_INTEGER largeint, DWORD *dwHours, DWORD *dwMinutes, DWORD *dwSeconds)
|
|
|
|
{
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
*dwHours = (DWORD)(largeint.QuadPart / 36000000000L);
|
|
|
|
*dwMinutes = (DWORD)((largeint.QuadPart % 36000000000L) / 600000000L);
|
|
|
|
*dwSeconds = (DWORD)(((largeint.QuadPart % 36000000000L) % 600000000L) / 10000000L);
|
|
|
|
#else
|
|
|
|
*dwHours = (DWORD)(largeint.QuadPart / 36000000000LL);
|
|
|
|
*dwMinutes = (DWORD)((largeint.QuadPart % 36000000000LL) / 600000000LL);
|
|
|
|
*dwSeconds = (DWORD)(((largeint.QuadPart % 36000000000LL) % 600000000LL) / 10000000LL);
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
int largeintcmp(LARGE_INTEGER l1, LARGE_INTEGER l2)
|
|
|
|
{
|
|
|
|
int ret = 0;
|
|
|
|
DWORD dwHours1;
|
|
|
|
DWORD dwMinutes1;
|
|
|
|
DWORD dwSeconds1;
|
|
|
|
DWORD dwHours2;
|
|
|
|
DWORD dwMinutes2;
|
|
|
|
DWORD dwSeconds2;
|
|
|
|
|
|
|
|
gethmsfromlargeint(l1, &dwHours1, &dwMinutes1, &dwSeconds1);
|
|
|
|
gethmsfromlargeint(l2, &dwHours2, &dwMinutes2, &dwSeconds2);
|
|
|
|
ret = CMP(dwHours1, dwHours2);
|
|
|
|
if (ret == 0)
|
|
|
|
{
|
|
|
|
ret = CMP(dwMinutes1, dwMinutes2);
|
|
|
|
if (ret == 0)
|
|
|
|
ret = CMP(dwSeconds1, dwSeconds2);
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
int CALLBACK ProcessPageCompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
|
|
|
|
{
|
|
|
|
int ret = 0;
|
|
|
|
LPPROCESS_PAGE_LIST_ITEM Param1;
|
|
|
|
LPPROCESS_PAGE_LIST_ITEM Param2;
|
2010-04-10 12:49:41 +00:00
|
|
|
ULONG IndexParam1;
|
|
|
|
ULONG IndexParam2;
|
2009-06-27 19:16:29 +00:00
|
|
|
WCHAR text1[260];
|
|
|
|
WCHAR text2[260];
|
|
|
|
ULONG l1;
|
|
|
|
ULONG l2;
|
|
|
|
LARGE_INTEGER time1;
|
|
|
|
LARGE_INTEGER time2;
|
|
|
|
IO_COUNTERS iocounters1;
|
|
|
|
IO_COUNTERS iocounters2;
|
|
|
|
ULONGLONG ull1;
|
|
|
|
ULONGLONG ull2;
|
|
|
|
|
2009-06-28 14:22:09 +00:00
|
|
|
if (TaskManagerSettings.SortAscending) {
|
2009-06-27 19:16:29 +00:00
|
|
|
Param1 = (LPPROCESS_PAGE_LIST_ITEM)lParam1;
|
|
|
|
Param2 = (LPPROCESS_PAGE_LIST_ITEM)lParam2;
|
|
|
|
} else {
|
|
|
|
Param1 = (LPPROCESS_PAGE_LIST_ITEM)lParam2;
|
|
|
|
Param2 = (LPPROCESS_PAGE_LIST_ITEM)lParam1;
|
|
|
|
}
|
2010-04-10 12:49:41 +00:00
|
|
|
IndexParam1 = PerfDataGetProcessIndex(Param1->ProcessId);
|
|
|
|
IndexParam2 = PerfDataGetProcessIndex(Param2->ProcessId);
|
2009-06-27 19:16:29 +00:00
|
|
|
|
2009-06-28 14:22:09 +00:00
|
|
|
if (TaskManagerSettings.SortColumn == COLUMN_IMAGENAME)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
[0.4.7][TASKMGR] Backport many fixes and improvements
Some commits I do port back all the way down till releases/0.4.7:
partially 0.4.15-dev-6768-g 63eaf2bd529f5bf94cde65afc26944e98b47850b [TASKMGR] *.rc Deduplicate dynamic menu strings (#5772) (I left out the FIXME-comments)
0.4.15-dev-6712-g 46b4b5581d1fc4c1b50cfc0ee8b82b77be182dc6 [TASKMGR] Favor _countof(), no functional change intended (#5757)
0.4.15-dev-6703-g 6528ab8fcb41eb47ee17cf738760126e6758af94 [TASKMGR] de-DE.rc Update part 3
0.4.15-dev-6702-g 65ce20896afa19032612871506dd5d1e8eb73119 [TASKMGR] *.rc Strip unused IDD_DEBUG_CHANNELS_DIALOG
0.4.15-dev-6700-g e15d68ba5d9906674b363cf8362ed08494e53a76 [TASKMGR] de-DE German Update & bug-fixes
partially 0.4.15-dev-6447-g 016acd170dd75a7a24af235339a5321e2c24bf5a [TASKMGR] Do not free shared icon for ShellAbout() calls (I picked just the taskmgr part) (was part of larger PR5519)
0.4.15-dev-6297-g 831288fe691ec311c5b910f05d9b833b4b952261 [TASKMGR] Fix text truncation for fr-FR.rc (#5380) CORE-18523
0.4.15-dev-6127-g c706222f3f1b2a63e8cc969ee756c8be92527853 [TASKMGR] Fix the license. Turns out it's LGPL-2.1-or-later from the texts.
0.4.15-dev-6124-g 9927163455b83fea29c6420a688535b8e233bff6 [TASKMGR] Reorder page controls to have natural TAB-ordering.
0.4.15-dev-6122-g d5707eefe2f08d230c07ab4693ac0bd59e809f85 [TASKMGR] High speed update is twice per second, and not every second.
0.4.15-dev-6121-g 2da0506f2a9fc02acede7d7ff479399013830fad [TASKMGR] Remove more dead code.
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code. (I left out using the strsafe.h-dependent stuff, as this is safe also in old-style)
0.4.15-dev-6119-g 0b4c8bdd1cb4cf1a50c1076c7ded19ee7e9f9198 [TASKMGR] Clamp the values returned from PerfDataGetProcessorUsage() and PerfDataGetProcessorSystemUsage() inside these functions.
0.4.15-dev-6118-g 7b53126375ee8889cf24615fa2ea646feabee0ae [TASKMGR] Completely reformat perfpage.c, perfpage.h, procpage.h and trayicon.c
partially 0.4.15-dev-6117-g da7dcec6a06c052339120ed4baa3caf24594f163 [TASKMGR] Reformat the files' headers
0.4.15-dev-6115-g 36aea8e56eb6eb9f1cab5fd6ce040b80ef6a302f [TASKMGR] affinity.c: Use _countof instead of sizeof/sizeof (was part of the larger CORE18991)
partially 0.4.15-dev-6109-g 99fb812be4ba86139438bf7961f2030ac9e016be [TASKMGR] Refactor trayicon.c
0.4.15-dev-5404-g c093d4f8038e7ddec1ca193edc573c48e12f12ff [TASKMGR] Prevent context menu on idle process (#4889) CORE-18640
0.4.15-dev-5031-g 46ea5171bdfaba2606486e27821fdd9ee88e551a [TASKMGR] Pixel-perfection for left border (#4680) CORE-18061
0.4.15-dev-4988-g de5af76811bbd318cdef46e193f306833e3fa740 [TASKMGR] Fix overlapping controls (French only) (#4658)
0.4.15-dev-4987-g f8c28b977363444ad31124a6794347c53532b43f [TASKMGR] Fix UI on SwitchTo for multiple application (#4652)
0.4.15-dev-3497-g e8a7e0da2bcbd842f95e4224e72bfb5d748dbd05 [TASKMGR] Make 'Hide When Minimized' non-default (#4169)
0.4.15-dev-3085-g 515e0cf38f8d07e59bb003f930eb08d33dc5f85d [TASKMGR] Handles: Get number only, skip data (#3910)
and a few *.rc improvements that are not explicitly mentioned here,
especially I stripped the menuLoop-statusbar-help-texts within the older branches.
A few improvements are still left to be done in a future commit (mostly around the plotgraphs and the trayicon-handling),
but I need to have a closer look at them and their impact on binary size,
so I do not want to squash them into this bigger backport,
where I concentrated on the safe/obvious and easy things.
Binary size decreases for all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 708.608 -> 696.832 (0.4.15-dev-6768-g63eaf2b)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 660.992 -> 549.888
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 659.968 -> 542.720
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 531.456
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE -> 110.080 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 108.032 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 107.520 Bytes
2023-10-19 15:25:14 +02:00
|
|
|
PerfDataGetImageName(IndexParam1, text1, _countof(text1));
|
|
|
|
PerfDataGetImageName(IndexParam2, text2, _countof(text2));
|
2009-06-27 19:16:29 +00:00
|
|
|
ret = _wcsicmp(text1, text2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_PID)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
l1 = Param1->ProcessId;
|
|
|
|
l2 = Param2->ProcessId;
|
2009-06-27 19:16:29 +00:00
|
|
|
ret = CMP(l1, l2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_USERNAME)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
[0.4.7][TASKMGR] Backport many fixes and improvements
Some commits I do port back all the way down till releases/0.4.7:
partially 0.4.15-dev-6768-g 63eaf2bd529f5bf94cde65afc26944e98b47850b [TASKMGR] *.rc Deduplicate dynamic menu strings (#5772) (I left out the FIXME-comments)
0.4.15-dev-6712-g 46b4b5581d1fc4c1b50cfc0ee8b82b77be182dc6 [TASKMGR] Favor _countof(), no functional change intended (#5757)
0.4.15-dev-6703-g 6528ab8fcb41eb47ee17cf738760126e6758af94 [TASKMGR] de-DE.rc Update part 3
0.4.15-dev-6702-g 65ce20896afa19032612871506dd5d1e8eb73119 [TASKMGR] *.rc Strip unused IDD_DEBUG_CHANNELS_DIALOG
0.4.15-dev-6700-g e15d68ba5d9906674b363cf8362ed08494e53a76 [TASKMGR] de-DE German Update & bug-fixes
partially 0.4.15-dev-6447-g 016acd170dd75a7a24af235339a5321e2c24bf5a [TASKMGR] Do not free shared icon for ShellAbout() calls (I picked just the taskmgr part) (was part of larger PR5519)
0.4.15-dev-6297-g 831288fe691ec311c5b910f05d9b833b4b952261 [TASKMGR] Fix text truncation for fr-FR.rc (#5380) CORE-18523
0.4.15-dev-6127-g c706222f3f1b2a63e8cc969ee756c8be92527853 [TASKMGR] Fix the license. Turns out it's LGPL-2.1-or-later from the texts.
0.4.15-dev-6124-g 9927163455b83fea29c6420a688535b8e233bff6 [TASKMGR] Reorder page controls to have natural TAB-ordering.
0.4.15-dev-6122-g d5707eefe2f08d230c07ab4693ac0bd59e809f85 [TASKMGR] High speed update is twice per second, and not every second.
0.4.15-dev-6121-g 2da0506f2a9fc02acede7d7ff479399013830fad [TASKMGR] Remove more dead code.
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code. (I left out using the strsafe.h-dependent stuff, as this is safe also in old-style)
0.4.15-dev-6119-g 0b4c8bdd1cb4cf1a50c1076c7ded19ee7e9f9198 [TASKMGR] Clamp the values returned from PerfDataGetProcessorUsage() and PerfDataGetProcessorSystemUsage() inside these functions.
0.4.15-dev-6118-g 7b53126375ee8889cf24615fa2ea646feabee0ae [TASKMGR] Completely reformat perfpage.c, perfpage.h, procpage.h and trayicon.c
partially 0.4.15-dev-6117-g da7dcec6a06c052339120ed4baa3caf24594f163 [TASKMGR] Reformat the files' headers
0.4.15-dev-6115-g 36aea8e56eb6eb9f1cab5fd6ce040b80ef6a302f [TASKMGR] affinity.c: Use _countof instead of sizeof/sizeof (was part of the larger CORE18991)
partially 0.4.15-dev-6109-g 99fb812be4ba86139438bf7961f2030ac9e016be [TASKMGR] Refactor trayicon.c
0.4.15-dev-5404-g c093d4f8038e7ddec1ca193edc573c48e12f12ff [TASKMGR] Prevent context menu on idle process (#4889) CORE-18640
0.4.15-dev-5031-g 46ea5171bdfaba2606486e27821fdd9ee88e551a [TASKMGR] Pixel-perfection for left border (#4680) CORE-18061
0.4.15-dev-4988-g de5af76811bbd318cdef46e193f306833e3fa740 [TASKMGR] Fix overlapping controls (French only) (#4658)
0.4.15-dev-4987-g f8c28b977363444ad31124a6794347c53532b43f [TASKMGR] Fix UI on SwitchTo for multiple application (#4652)
0.4.15-dev-3497-g e8a7e0da2bcbd842f95e4224e72bfb5d748dbd05 [TASKMGR] Make 'Hide When Minimized' non-default (#4169)
0.4.15-dev-3085-g 515e0cf38f8d07e59bb003f930eb08d33dc5f85d [TASKMGR] Handles: Get number only, skip data (#3910)
and a few *.rc improvements that are not explicitly mentioned here,
especially I stripped the menuLoop-statusbar-help-texts within the older branches.
A few improvements are still left to be done in a future commit (mostly around the plotgraphs and the trayicon-handling),
but I need to have a closer look at them and their impact on binary size,
so I do not want to squash them into this bigger backport,
where I concentrated on the safe/obvious and easy things.
Binary size decreases for all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 708.608 -> 696.832 (0.4.15-dev-6768-g63eaf2b)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 660.992 -> 549.888
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 659.968 -> 542.720
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 531.456
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE -> 110.080 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 108.032 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 107.520 Bytes
2023-10-19 15:25:14 +02:00
|
|
|
PerfDataGetUserName(IndexParam1, text1, _countof(text1));
|
|
|
|
PerfDataGetUserName(IndexParam2, text2, _countof(text2));
|
2009-06-27 19:16:29 +00:00
|
|
|
ret = _wcsicmp(text1, text2);
|
|
|
|
}
|
2014-11-23 20:10:15 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_COMMANDLINE)
|
|
|
|
{
|
[0.4.7][TASKMGR] Backport many fixes and improvements
Some commits I do port back all the way down till releases/0.4.7:
partially 0.4.15-dev-6768-g 63eaf2bd529f5bf94cde65afc26944e98b47850b [TASKMGR] *.rc Deduplicate dynamic menu strings (#5772) (I left out the FIXME-comments)
0.4.15-dev-6712-g 46b4b5581d1fc4c1b50cfc0ee8b82b77be182dc6 [TASKMGR] Favor _countof(), no functional change intended (#5757)
0.4.15-dev-6703-g 6528ab8fcb41eb47ee17cf738760126e6758af94 [TASKMGR] de-DE.rc Update part 3
0.4.15-dev-6702-g 65ce20896afa19032612871506dd5d1e8eb73119 [TASKMGR] *.rc Strip unused IDD_DEBUG_CHANNELS_DIALOG
0.4.15-dev-6700-g e15d68ba5d9906674b363cf8362ed08494e53a76 [TASKMGR] de-DE German Update & bug-fixes
partially 0.4.15-dev-6447-g 016acd170dd75a7a24af235339a5321e2c24bf5a [TASKMGR] Do not free shared icon for ShellAbout() calls (I picked just the taskmgr part) (was part of larger PR5519)
0.4.15-dev-6297-g 831288fe691ec311c5b910f05d9b833b4b952261 [TASKMGR] Fix text truncation for fr-FR.rc (#5380) CORE-18523
0.4.15-dev-6127-g c706222f3f1b2a63e8cc969ee756c8be92527853 [TASKMGR] Fix the license. Turns out it's LGPL-2.1-or-later from the texts.
0.4.15-dev-6124-g 9927163455b83fea29c6420a688535b8e233bff6 [TASKMGR] Reorder page controls to have natural TAB-ordering.
0.4.15-dev-6122-g d5707eefe2f08d230c07ab4693ac0bd59e809f85 [TASKMGR] High speed update is twice per second, and not every second.
0.4.15-dev-6121-g 2da0506f2a9fc02acede7d7ff479399013830fad [TASKMGR] Remove more dead code.
partially 0.4.15-dev-6120-g 6e77747b305add73133faa2049b8bd34e3e2534e [TASKMGR] Simplify tray icon code. (I left out using the strsafe.h-dependent stuff, as this is safe also in old-style)
0.4.15-dev-6119-g 0b4c8bdd1cb4cf1a50c1076c7ded19ee7e9f9198 [TASKMGR] Clamp the values returned from PerfDataGetProcessorUsage() and PerfDataGetProcessorSystemUsage() inside these functions.
0.4.15-dev-6118-g 7b53126375ee8889cf24615fa2ea646feabee0ae [TASKMGR] Completely reformat perfpage.c, perfpage.h, procpage.h and trayicon.c
partially 0.4.15-dev-6117-g da7dcec6a06c052339120ed4baa3caf24594f163 [TASKMGR] Reformat the files' headers
0.4.15-dev-6115-g 36aea8e56eb6eb9f1cab5fd6ce040b80ef6a302f [TASKMGR] affinity.c: Use _countof instead of sizeof/sizeof (was part of the larger CORE18991)
partially 0.4.15-dev-6109-g 99fb812be4ba86139438bf7961f2030ac9e016be [TASKMGR] Refactor trayicon.c
0.4.15-dev-5404-g c093d4f8038e7ddec1ca193edc573c48e12f12ff [TASKMGR] Prevent context menu on idle process (#4889) CORE-18640
0.4.15-dev-5031-g 46ea5171bdfaba2606486e27821fdd9ee88e551a [TASKMGR] Pixel-perfection for left border (#4680) CORE-18061
0.4.15-dev-4988-g de5af76811bbd318cdef46e193f306833e3fa740 [TASKMGR] Fix overlapping controls (French only) (#4658)
0.4.15-dev-4987-g f8c28b977363444ad31124a6794347c53532b43f [TASKMGR] Fix UI on SwitchTo for multiple application (#4652)
0.4.15-dev-3497-g e8a7e0da2bcbd842f95e4224e72bfb5d748dbd05 [TASKMGR] Make 'Hide When Minimized' non-default (#4169)
0.4.15-dev-3085-g 515e0cf38f8d07e59bb003f930eb08d33dc5f85d [TASKMGR] Handles: Get number only, skip data (#3910)
and a few *.rc improvements that are not explicitly mentioned here,
especially I stripped the menuLoop-statusbar-help-texts within the older branches.
A few improvements are still left to be done in a future commit (mostly around the plotgraphs and the trayicon-handling),
but I need to have a closer look at them and their impact on binary size,
so I do not want to squash them into this bigger backport,
where I concentrated on the safe/obvious and easy things.
Binary size decreases for all branches:
master taskmgr.exe RosBEWin2.2.2 GCC8.4.0dbg 708.608 -> 696.832 (0.4.15-dev-6768-g63eaf2b)
0.4.14 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 660.992 -> 549.888
0.4.13 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 659.968 -> 542.720
0.4.12 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.11 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 662.016 -> 545.792
0.4.10 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 9 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 8 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 532.480
0.4. 7 taskmgr.exe RosBEWin2.1.6 GCC4.7.2dbg 645.120 -> 531.456
taskmgr.exe MS XPSP3 german 140.800 Bytes
0.4.14 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=de-DE -> 110.080 Bytes (my current taskmgr of choice)
0.4. 8 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 108.032 Bytes
0.4. 7 taskmgr.exe RosBEWin2.1.6 MSVC2010SP1rls I18N=en-US -> 107.520 Bytes
2023-10-19 15:25:14 +02:00
|
|
|
PerfDataGetCommandLine(IndexParam1, text1, _countof(text1));
|
|
|
|
PerfDataGetCommandLine(IndexParam2, text2, _countof(text2));
|
2014-11-23 20:10:15 +00:00
|
|
|
ret = _wcsicmp(text1, text2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_SESSIONID)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
l1 = PerfDataGetSessionId(IndexParam1);
|
|
|
|
l2 = PerfDataGetSessionId(IndexParam2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ret = CMP(l1, l2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_CPUUSAGE)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
l1 = PerfDataGetCPUUsage(IndexParam1);
|
|
|
|
l2 = PerfDataGetCPUUsage(IndexParam2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ret = CMP(l1, l2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_CPUTIME)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
time1 = PerfDataGetCPUTime(IndexParam1);
|
|
|
|
time2 = PerfDataGetCPUTime(IndexParam2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ret = largeintcmp(time1, time2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_MEMORYUSAGE)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
l1 = PerfDataGetWorkingSetSizeBytes(IndexParam1);
|
|
|
|
l2 = PerfDataGetWorkingSetSizeBytes(IndexParam2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ret = CMP(l1, l2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_PEAKMEMORYUSAGE)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
l1 = PerfDataGetPeakWorkingSetSizeBytes(IndexParam1);
|
|
|
|
l2 = PerfDataGetPeakWorkingSetSizeBytes(IndexParam2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ret = CMP(l1, l2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_MEMORYUSAGEDELTA)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
l1 = PerfDataGetWorkingSetSizeDelta(IndexParam1);
|
|
|
|
l2 = PerfDataGetWorkingSetSizeDelta(IndexParam2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ret = CMP(l1, l2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_PAGEFAULTS)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
l1 = PerfDataGetPageFaultCount(IndexParam1);
|
|
|
|
l2 = PerfDataGetPageFaultCount(IndexParam2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ret = CMP(l1, l2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_PAGEFAULTSDELTA)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
l1 = PerfDataGetPageFaultCountDelta(IndexParam1);
|
|
|
|
l2 = PerfDataGetPageFaultCountDelta(IndexParam2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ret = CMP(l1, l2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_VIRTUALMEMORYSIZE)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
l1 = PerfDataGetVirtualMemorySizeBytes(IndexParam1);
|
|
|
|
l2 = PerfDataGetVirtualMemorySizeBytes(IndexParam2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ret = CMP(l1, l2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_PAGEDPOOL)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
l1 = PerfDataGetPagedPoolUsagePages(IndexParam1);
|
|
|
|
l2 = PerfDataGetPagedPoolUsagePages(IndexParam2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ret = CMP(l1, l2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_NONPAGEDPOOL)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
l1 = PerfDataGetNonPagedPoolUsagePages(IndexParam1);
|
|
|
|
l2 = PerfDataGetNonPagedPoolUsagePages(IndexParam2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ret = CMP(l1, l2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_BASEPRIORITY)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
l1 = PerfDataGetBasePriority(IndexParam1);
|
|
|
|
l2 = PerfDataGetBasePriority(IndexParam2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ret = CMP(l1, l2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_HANDLECOUNT)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
l1 = PerfDataGetHandleCount(IndexParam1);
|
|
|
|
l2 = PerfDataGetHandleCount(IndexParam2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ret = CMP(l1, l2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_THREADCOUNT)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
l1 = PerfDataGetThreadCount(IndexParam1);
|
|
|
|
l2 = PerfDataGetThreadCount(IndexParam2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ret = CMP(l1, l2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_USEROBJECTS)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
l1 = PerfDataGetUSERObjectCount(IndexParam1);
|
|
|
|
l2 = PerfDataGetUSERObjectCount(IndexParam2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ret = CMP(l1, l2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_GDIOBJECTS)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
l1 = PerfDataGetGDIObjectCount(IndexParam1);
|
|
|
|
l2 = PerfDataGetGDIObjectCount(IndexParam2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ret = CMP(l1, l2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_IOREADS)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
PerfDataGetIOCounters(IndexParam1, &iocounters1);
|
|
|
|
PerfDataGetIOCounters(IndexParam2, &iocounters2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ull1 = iocounters1.ReadOperationCount;
|
|
|
|
ull2 = iocounters2.ReadOperationCount;
|
|
|
|
ret = CMP(ull1, ull2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_IOWRITES)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
PerfDataGetIOCounters(IndexParam1, &iocounters1);
|
|
|
|
PerfDataGetIOCounters(IndexParam2, &iocounters2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ull1 = iocounters1.WriteOperationCount;
|
|
|
|
ull2 = iocounters2.WriteOperationCount;
|
|
|
|
ret = CMP(ull1, ull2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_IOOTHER)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
PerfDataGetIOCounters(IndexParam1, &iocounters1);
|
|
|
|
PerfDataGetIOCounters(IndexParam2, &iocounters2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ull1 = iocounters1.OtherOperationCount;
|
|
|
|
ull2 = iocounters2.OtherOperationCount;
|
|
|
|
ret = CMP(ull1, ull2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_IOREADBYTES)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
PerfDataGetIOCounters(IndexParam1, &iocounters1);
|
|
|
|
PerfDataGetIOCounters(IndexParam2, &iocounters2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ull1 = iocounters1.ReadTransferCount;
|
|
|
|
ull2 = iocounters2.ReadTransferCount;
|
|
|
|
ret = CMP(ull1, ull2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_IOWRITEBYTES)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
PerfDataGetIOCounters(IndexParam1, &iocounters1);
|
|
|
|
PerfDataGetIOCounters(IndexParam2, &iocounters2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ull1 = iocounters1.WriteTransferCount;
|
|
|
|
ull2 = iocounters2.WriteTransferCount;
|
|
|
|
ret = CMP(ull1, ull2);
|
|
|
|
}
|
2009-06-28 14:22:09 +00:00
|
|
|
else if (TaskManagerSettings.SortColumn == COLUMN_IOOTHERBYTES)
|
2009-06-27 19:16:29 +00:00
|
|
|
{
|
2010-04-10 12:49:41 +00:00
|
|
|
PerfDataGetIOCounters(IndexParam1, &iocounters1);
|
|
|
|
PerfDataGetIOCounters(IndexParam2, &iocounters2);
|
2009-06-27 19:16:29 +00:00
|
|
|
ull1 = iocounters1.OtherTransferCount;
|
|
|
|
ull2 = iocounters2.OtherTransferCount;
|
|
|
|
ret = CMP(ull1, ull2);
|
|
|
|
}
|
|
|
|
return ret;
|
|
|
|
}
|