Quantcast

a couple fixes, are the maintainers interested?

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

a couple fixes, are the maintainers interested?

Robert Randall

Hello,

I've spent some time fixing a few simple problems with the latest version of MFC using the current trunk.  The CFileDialog constructors were being called incorrectly causing reference counting problems with COM.   The COM classes should not have been initialized in the first place.  Because the code was messing with m_bVistaStyle directly (not a good idea) it was causing the COM classes to be created but not destroyed which results in exceptions when running in the debugger and leaks resource when running a release build.

I made these changes using VS 2012 and I don't have the tools to know if the CFileDialog constructor is compatible with previous releases of MFC.  I'm not sure how old a tool set is supported by the project when compiling on Windows.  Which versions of the compiler and MFC are supported?

The constructor in the version of MFC I'm using is:

CFileDialog(
   BOOL bOpenFileDialog,
   LPCTSTR lpszDefExt = NULL,
   LPCTSTR lpszFileName = NULL,
   DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
   LPCTSTR lpszFilter = NULL,
   CWnd* pParentWnd = NULL,
   DWORD dwSize = 0,
   BOOL bVistaStyle = TRUE
);

I found one other minor problem.  When using a file on disk for testing the minimum Maximum Disk Size in sectors MUST be 128 or larger because of the code that IOTargetDisk::Prepare assumes that at least 64Kb will be written to the file.  A smaller value results in a divide by zero exception.  I'm not sure if Prepare should be fixed to handle smaller files or a minimum size should be enforced by the GUI.  Happy to make the fix either way.


Let me know if you would like a patch for these changes.

Best regards,
Robert

--
Robert Randall | [hidden email]

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: a couple fixes, are the maintainers interested?

Robert Randall
I also fixed a problem when running in batch mode.  The destruction sequence of Windows causes an exception.  The cheap fix is implementing a function in CGalileoApp.

Regards,
Robert


On Mon, Jan 13, 2014 at 2:17 PM, Robert Randall <[hidden email]> wrote:

Hello,

I've spent some time fixing a few simple problems with the latest version of MFC using the current trunk.  The CFileDialog constructors were being called incorrectly causing reference counting problems with COM.   The COM classes should not have been initialized in the first place.  Because the code was messing with m_bVistaStyle directly (not a good idea) it was causing the COM classes to be created but not destroyed which results in exceptions when running in the debugger and leaks resource when running a release build.

I made these changes using VS 2012 and I don't have the tools to know if the CFileDialog constructor is compatible with previous releases of MFC.  I'm not sure how old a tool set is supported by the project when compiling on Windows.  Which versions of the compiler and MFC are supported?

The constructor in the version of MFC I'm using is:

CFileDialog(
   BOOL bOpenFileDialog,
   LPCTSTR lpszDefExt = NULL,
   LPCTSTR lpszFileName = NULL,
   DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
   LPCTSTR lpszFilter = NULL,
   CWnd* pParentWnd = NULL,
   DWORD dwSize = 0,
   BOOL bVistaStyle = TRUE
);

I found one other minor problem.  When using a file on disk for testing the minimum Maximum Disk Size in sectors MUST be 128 or larger because of the code that IOTargetDisk::Prepare assumes that at least 64Kb will be written to the file.  A smaller value results in a divide by zero exception.  I'm not sure if Prepare should be fixed to handle smaller files or a minimum size should be enforced by the GUI.  Happy to make the fix either way.


Let me know if you would like a patch for these changes.

Best regards,
Robert

--
Robert Randall | [hidden email]



--
Robert Randall | [hidden email]

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: a couple fixes, are the maintainers interested?

Vedran Degoricija
Hi Robert,
 
Thanks for the feedback. You can blame me for that one...
I recall that a move from MFC 6.x to newer libs in VS 20xx caused a much worse bug to appear where the open and save dialogs were formatted incorrectly. I eventually used the bVistaStyle setting to address it. Are you saying that the reference to m_bVistaStyle indirectly messes with COM reference counting? 
 
Since the move from MFC 6.x, we have not been worried about backwards build compatibility. I will make sure to delete the directories with unsupported build files.
 
If you don't mind sending me the patches (or preferably the whole source files) to all of your fixes and I can take care of the rest.
 
Thanks!
Ved 


On Monday, January 13, 2014 12:45 PM, Robert Randall <[hidden email]> wrote:
I also fixed a problem when running in batch mode.  The destruction sequence of Windows causes an exception.  The cheap fix is implementing a function in CGalileoApp.

Regards,
Robert


On Mon, Jan 13, 2014 at 2:17 PM, Robert Randall <[hidden email]> wrote:

Hello,

I've spent some time fixing a few simple problems with the latest version of MFC using the current trunk.  The CFileDialog constructors were being called incorrectly causing reference counting problems with COM.   The COM classes should not have been initialized in the first place.  Because the code was messing with m_bVistaStyle directly (not a good idea) it was causing the COM classes to be created but not destroyed which results in exceptions when running in the debugger and leaks resource when running a release build.

I made these changes using VS 2012 and I don't have the tools to know if the CFileDialog constructor is compatible with previous releases of MFC.  I'm not sure how old a tool set is supported by the project when compiling on Windows.  Which versions of the compiler and MFC are supported?

The constructor in the version of MFC I'm using is:

CFileDialog(
   BOOL bOpenFileDialog,
   LPCTSTR lpszDefExt = NULL,
   LPCTSTR lpszFileName = NULL,
   DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
   LPCTSTR lpszFilter = NULL,
   CWnd* pParentWnd = NULL,
   DWORD dwSize = 0,
   BOOL bVistaStyle = TRUE
);

I found one other minor problem.  When using a file on disk for testing the minimum Maximum Disk Size in sectors MUST be 128 or larger because of the code that IOTargetDisk::Prepare assumes that at least 64Kb will be written to the file.  A smaller value results in a divide by zero exception.  I'm not sure if Prepare should be fixed to handle smaller files or a minimum size should be enforced by the GUI.  Happy to make the fix either way.


Let me know if you would like a patch for these changes.

Best regards,
Robert

--
Robert Randall | [hidden email]



--
Robert Randall | [hidden email]

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk

_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel



------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Fwd: a couple fixes, are the maintainers interested?

Robert Randall
In reply to this post by Robert Randall
I apologize for not copying the list on this message.  Please review the patch below and let me know if you need another maintainer <grin>.  I've been developing Windows apps since before there was a Windows kernel <my age is showing>.

Best regards,
Robert

---------- Forwarded message ----------
From: Robert Randall <[hidden email]>
Date: Mon, Jan 13, 2014 at 7:04 PM
Subject: Re: [Iometer-devel] a couple fixes, are the maintainers interested?
To: "lefferts, john" <[hidden email]>


Patch is below.  There are still a few issues I should clean up with regard to cleanly including the MFC headers.  I need to investigate one more internal bug report; loading .icf file with multiple managers results in the first manager being created other are not created.


Index: src/GalileoApp.cpp
===================================================================
--- src/GalileoApp.cpp (revision 141)
+++ src/GalileoApp.cpp (working copy)
@@ -122,6 +122,14 @@
  delete login_port;
 }
 
+void CGalileoApp::CloseAllDocuments(BOOL bEndSession) 
+{
+ if (bEndSession)
+   {
+      m_wndStatusBar.DestroyWindow();
+      m_wndToolBar.DestroyWindow();
+   }
+}
 /////////////////////////////////////////////////////////////////////////////
 // The one and only CGalileoApp object
 
@@ -311,6 +319,8 @@
 ///////////////////////////////////////////////////////////////////////////////
 int CGalileoApp::ExitInstance()
 {
+   manager_list.RemoveAllManagers();
+
  delete[]m_pVersionString;
  delete[]m_pVersionStringWithDebug;
 
Index: src/GalileoApp.h
===================================================================
--- src/GalileoApp.h (revision 141)
+++ src/GalileoApp.h (working copy)
@@ -130,6 +130,7 @@
  virtual int ExitInstance();
  virtual BOOL OnIdle(LONG lCount);
  virtual CDocument *OpenDocumentFile(LPCTSTR lpszFileName);
+ virtual void CloseAllDocuments(BOOL bEndSession); 
  //}}AFX_VIRTUAL
 
 // Implementation
Index: src/GalileoView.cpp
===================================================================
--- src/GalileoView.cpp (revision 141)
+++ src/GalileoView.cpp (working copy)
@@ -1180,6 +1180,7 @@
 void CGalileoView::OnFileOpen()
 {
  BOOL flags[NumICFFlags];
+ CICFOpenDialog file_open_box; // open config file dialog box
 
  // Show the custom file open dialog.
  if (file_open_box.DoModal() == IDCANCEL)
@@ -1202,6 +1203,7 @@
 void CGalileoView::OnFileSave()
 {
  BOOL flags[NumICFFlags];
+ CICFSaveDialog file_save_box; // save config file dialog box
 
  // Show the custom file save dialog.
  if (file_save_box.DoModal() == IDCANCEL)
Index: src/GalileoView.h
===================================================================
--- src/GalileoView.h (revision 141)
+++ src/GalileoView.h (working copy)
@@ -182,8 +182,6 @@
  CPropertySheet *m_pPropSheet;
 
       protected:
- CICFOpenDialog file_open_box; // open config file dialog box
- CICFSaveDialog file_save_box; // save config file dialog box
 
  // tracks whether parent frame has already been sized.
  BOOL m_bSizedBefore;
Index: src/ICFOpenDialog.cpp
===================================================================
--- src/ICFOpenDialog.cpp (revision 141)
+++ src/ICFOpenDialog.cpp (working copy)
@@ -87,9 +87,10 @@
 
 /////////////////////////////////////////////////////////////////////////////
 // CICFOpenDialog dialog
-    CICFOpenDialog::CICFOpenDialog()
-:  CFileDialog(TRUE, "icf", "", NULL,
-    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||")
+   CICFOpenDialog::CICFOpenDialog()
+:  CFileDialog(TRUE, "icf", NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, 
+            "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||", 
+               NULL, 0UL, FALSE)
 {
  CString title;
  char *buf;
@@ -104,9 +105,6 @@
 
  m_ofn.lpTemplateName = MAKEINTRESOURCE(IDD_FILEOPEN_OPTS);
 
- // This is key to getting the templates working properly and secondary opens to work at all?!
- m_bVistaStyle = FALSE;
-
  //{{AFX_DATA_INIT(CICFOpenDialog)
  isCkTestSetup = TRUE;
  isCkResultsDisplay = TRUE;
Index: src/ICFSaveDialog.cpp
===================================================================
--- src/ICFSaveDialog.cpp (revision 141)
+++ src/ICFSaveDialog.cpp (working copy)
@@ -88,8 +88,9 @@
 /////////////////////////////////////////////////////////////////////////////
 // CICFSaveDialog dialog
     CICFSaveDialog::CICFSaveDialog()
-:  CFileDialog(FALSE, "icf", "iometer", NULL,
-    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||")
+:  CFileDialog(FALSE, "icf", "iometer",  OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
+    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||",
+        NULL, 0UL, FALSE)
 {
  CString title;
  char *buf;
@@ -104,9 +105,6 @@
 
  m_ofn.lpTemplateName = MAKEINTRESOURCE(IDD_FILESAVE_OPTS);
 
- // This is key to getting the templates working properly and secondary opens to work at all?!
- m_bVistaStyle = FALSE;
-
  //{{AFX_DATA_INIT(CICFSaveDialog)
  isCkTestSetup = TRUE;
  isCkResultsDisplay = TRUE;
Index: src/IOCommon.h
===================================================================
--- src/IOCommon.h (revision 141)
+++ src/IOCommon.h (working copy)
@@ -204,17 +204,21 @@
 #if defined(IOMTR_OSFAMILY_WINDOWS)   // Only first, because it is needed here!
  //#define VC_EXTRALEAN
  //#pragma warning (disable: 4242)
+#include "StdAfx.h"
+//#define WIN32_LEAN_AND_MEAN 1
+//#include <Windows.h>
+//#include <windef.h>  
  #include <process.h>
  #include <io.h>
  #include <direct.h>
- #include <afxwin.h>
- #include <afxext.h>
- #include <afxcmn.h>
- #include <winioctl.h>
+// #include <afxwin.h>
+// #include <afxext.h>
+// #include <afxcmn.h>
  #include <iomanip>
  #include <winperf.h>
  #include <winreg.h>
- #include <afxmt.h>
+ #include <winioctl.h>
+// #include <afxmt.h>
  #include <malloc.h>
 #endif
 // ----------------------------------------------------------------------------
@@ -868,7 +872,7 @@
  struct IOCQ {
  CQ_Element      *element_list;
  struct aiocb64 **aiocb_list;
-#ifdef IOMTR_SETTING_LINUX_LIBAIO
+#ifdef IOMTR_SETTING_LINUX_LIBAIO
  struct iocb **iocb_list;
         io_context_t io_ctx_id;
         struct io_event *events;
Index: src/IOPort.cpp
===================================================================
--- src/IOPort.cpp (revision 141)
+++ src/IOPort.cpp (working copy)
@@ -81,6 +81,7 @@
 /* ######################################################################### */
 
 #if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+#include "StdAfx.h"
 #include "GalileoApp.h"
 #endif
 #include "IOPort.h"
Index: src/IOPortTCP.cpp
===================================================================
--- src/IOPortTCP.cpp (revision 141)
+++ src/IOPortTCP.cpp (working copy)
@@ -89,7 +89,7 @@
 /* ######################################################################### */
 
 #if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
-#include <afx.h>
+#include "StdAfx.h"
 #endif
 
 #include "IOPortTCP.h"
Index: src/IOTarget.cpp
===================================================================
--- src/IOTarget.cpp (revision 141)
+++ src/IOTarget.cpp (working copy)
@@ -109,6 +109,9 @@
 #if defined(IOMTR_OSFAMILY_UNIX) && defined(WORKAROUND_MOD_BUG)
  return ((DWORDLONG)fmodl(spec.random = A * spec.random + B, limit));
 #else
+#ifdef _DEBUG
+ assert(limit > 0);
+#endif
  return (spec.random = A * spec.random + B) % limit;
 #endif
 }
Index: src/IOTargetDisk.cpp
===================================================================
--- src/IOTargetDisk.cpp (revision 141)
+++ src/IOTargetDisk.cpp (working copy)
@@ -1329,10 +1329,14 @@
  // Loop through the I/O queue looking for idle slots.
  for (i = 0; i < PREPARE_QDEPTH; i++) {
  // Check to see if we've reached the end of the disk
- if (spec.disk_info.maximum_size &&
+ // Windows debuggers lie when decoding spec.disk_info pushing
+ // values into local vars
+            int dd_sector_size = spec.disk_info.sector_size;
+            ULONGLONG dd_maximum_size = spec.disk_info.maximum_size;
+            ULONGLONG dd_starting_sector = spec.disk_info.starting_sector;
+ if (dd_maximum_size &&
     ((*prepare_offset + bytes) >
-     ((spec.disk_info.starting_sector +
-       (DWORDLONG) spec.disk_info.maximum_size) * spec.disk_info.sector_size))) {
+     ((dd_starting_sector + dd_maximum_size) * dd_sector_size))) {
  // A maximum disk size was specified by the user, and the next write 
  // would go past the specified maximum size.  
 #ifdef _DEBUG
Index: src/IOTime.cpp
===================================================================
--- src/IOTime.cpp (revision 141)
+++ src/IOTime.cpp (working copy)
@@ -92,6 +92,9 @@
 /* ##                                                                     ## */
 /* ######################################################################### */
 
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+#include "StdAfx.h"
+#endif
 #include "IOCommon.h"
 
 #if defined(IOMTR_OS_LINUX)
Index: src/StdAfx.h
===================================================================
--- src/StdAfx.h (revision 141)
+++ src/StdAfx.h (working copy)
@@ -58,11 +58,61 @@
 /* ##                                                                     ## */
 /* ######################################################################### */
 
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
+//#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
 
-#include <afxwin.h> // MFC core and standard components
+//#include <afxwin.h> // MFC core and standard components
 //#include <afxext.h>         // MFC extensions
+//#ifndef _AFX_NO_AFXCMN_SUPPORT
+//#include <afxcmn.h> // MFC support for Windows Common Controls
+//#endif // _AFX_NO_AFXCMN_SUPPORT
+//#include <afxtempl.h>
+
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently,
+// but are changed infrequently
+
+#pragma once
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN            // Exclude rarely-used stuff from Windows headers
+#endif
+
+#include "targetver.h"
+
+//#define _AFX_NO_OLE_SUPPORT 1
+#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS      // some CString constructors will be explicit
+
+// turns off MFC's hiding of some common and often safely ignored warning messages
+#define _AFX_ALL_WARNINGS
+
+#include <afxwin.h>         // MFC core and standard components
+#include <afxext.h>         // MFC extensions
+
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxdtctl.h>           // MFC support for Internet Explorer 4 Common Controls
+#endif
 #ifndef _AFX_NO_AFXCMN_SUPPORT
-#include <afxcmn.h> // MFC support for Windows Common Controls
-#endif // _AFX_NO_AFXCMN_SUPPORT
-//#include <afxtempl.h>
+#include <afxcmn.h>             // MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+#include <afxcontrolbars.h>     // MFC support for ribbons and control bars
+
+
+
+
+
+
+
+
+
+#ifdef _UNICODE
+#if defined _M_IX86
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#elif defined _M_X64
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#else
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#endif
+#endif
+
+



On Mon, Jan 13, 2014 at 3:10 PM, lefferts, john <[hidden email]> wrote:

I appreciate you valuable efforts.

I think the developers would be better able to evaluate the technical merit of your changes if you take the extra time to construct a patch.

Even a simple diff stream would be useful for a review.

 

I have co-workers who complain about “crashes” when shutting-down a performance run—I wonder if you have addressed their issues.

 

The SLN file under src/msvc9 says it was created with VS2008 (version 10) and I am using that.

It has the same constructor.

 

The developers have a comment that seems to indicate open-exclusive issues on reopen without prompt destruction of heap objects:

 

      // This is key to getting the templates working properly and secondary opens to work at all?!

      m_bVistaStyle = FALSE;

 

I am interested in seeing your changes.

 

 

From: Robert Randall [mailto:[hidden email]]
Sent: Monday, January 13, 2014 3:44 PM
To: [hidden email]
Subject: Re: [Iometer-devel] a couple fixes, are the maintainers interested?

 

I also fixed a problem when running in batch mode.  The destruction sequence of Windows causes an exception.  The cheap fix is implementing a function in CGalileoApp.

 

Regards,

Robert

 

On Mon, Jan 13, 2014 at 2:17 PM, Robert Randall <[hidden email]> wrote:

 

Hello,

 

I've spent some time fixing a few simple problems with the latest version of MFC using the current trunk.  The CFileDialog constructors were being called incorrectly causing reference counting problems with COM.   The COM classes should not have been initialized in the first place.  Because the code was messing with m_bVistaStyle directly (not a good idea) it was causing the COM classes to be created but not destroyed which results in exceptions when running in the debugger and leaks resource when running a release build.

 

I made these changes using VS 2012 and I don't have the tools to know if the CFileDialog constructor is compatible with previous releases of MFC.  I'm not sure how old a tool set is supported by the project when compiling on Windows.  Which versions of the compiler and MFC are supported?

 

The constructor in the version of MFC I'm using is:

 

CFileDialog(
   BOOL bOpenFileDialog,
   LPCTSTR lpszDefExt = NULL,
   LPCTSTR lpszFileName = NULL,
   DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
   LPCTSTR lpszFilter = NULL,
   CWnd* pParentWnd = NULL,
   DWORD dwSize = 0,
   BOOL bVistaStyle = TRUE
);

 

I found one other minor problem.  When using a file on disk for testing the minimum Maximum Disk Size in sectors MUST be 128 or larger because of the code that IOTargetDisk::Prepare assumes that at least 64Kb will be written to the file.  A smaller value results in a divide by zero exception.  I'm not sure if Prepare should be fixed to handle smaller files or a minimum size should be enforced by the GUI.  Happy to make the fix either way.

 

 

Let me know if you would like a patch for these changes.

 

Best regards,

Robert

 

--
Robert Randall | [hidden email]



 

--
Robert Randall | [hidden email]




--
Robert Randall | [hidden email]



--
Robert Randall | [hidden email]

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: a couple fixes, are the maintainers interested?

Vedran Degoricija
Thanks Robert. Let me review these.
 
As far as only a single manager opening, I might have a fix. I'll need to recall what it is I actually fixed in this area-- it was about a year ago.
 
Your offer for help is welcome. We've certainly been stagnant lately. Is there something in particular  that you are interested in?
 
Thanks,
Ved
 
 


On Tuesday, January 14, 2014 5:06 AM, Robert Randall <[hidden email]> wrote:
I apologize for not copying the list on this message.  Please review the patch below and let me know if you need another maintainer <grin>.  I've been developing Windows apps since before there was a Windows kernel <my age is showing>.

Best regards,
Robert

---------- Forwarded message ----------
From: Robert Randall <[hidden email]>
Date: Mon, Jan 13, 2014 at 7:04 PM
Subject: Re: [Iometer-devel] a couple fixes, are the maintainers interested?
To: "lefferts, john" <[hidden email]>


Patch is below.  There are still a few issues I should clean up with regard to cleanly including the MFC headers.  I need to investigate one more internal bug report; loading .icf file with multiple managers results in the first manager being created other are not created.


Index: src/GalileoApp.cpp
===================================================================
--- src/GalileoApp.cpp (revision 141)
+++ src/GalileoApp.cpp (working copy)
@@ -122,6 +122,14 @@
  delete login_port;
 }
 
+void CGalileoApp::CloseAllDocuments(BOOL bEndSession) 
+{
+ if (bEndSession)
+   {
+      m_wndStatusBar.DestroyWindow();
+      m_wndToolBar.DestroyWindow();
+   }
+}
 /////////////////////////////////////////////////////////////////////////////
 // The one and only CGalileoApp object
 
@@ -311,6 +319,8 @@
 ///////////////////////////////////////////////////////////////////////////////
 int CGalileoApp::ExitInstance()
 {
+   manager_list.RemoveAllManagers();
+
  delete[]m_pVersionString;
  delete[]m_pVersionStringWithDebug;
 
Index: src/GalileoApp.h
===================================================================
--- src/GalileoApp.h (revision 141)
+++ src/GalileoApp.h (working copy)
@@ -130,6 +130,7 @@
  virtual int ExitInstance();
  virtual BOOL OnIdle(LONG lCount);
  virtual CDocument *OpenDocumentFile(LPCTSTR lpszFileName);
+ virtual void CloseAllDocuments(BOOL bEndSession); 
  //}}AFX_VIRTUAL
 
 // Implementation
Index: src/GalileoView.cpp
===================================================================
--- src/GalileoView.cpp (revision 141)
+++ src/GalileoView.cpp (working copy)
@@ -1180,6 +1180,7 @@
 void CGalileoView::OnFileOpen()
 {
  BOOL flags[NumICFFlags];
+ CICFOpenDialog file_open_box; // open config file dialog box
 
  // Show the custom file open dialog.
  if (file_open_box.DoModal() == IDCANCEL)
@@ -1202,6 +1203,7 @@
 void CGalileoView::OnFileSave()
 {
  BOOL flags[NumICFFlags];
+ CICFSaveDialog file_save_box; // save config file dialog box
 
  // Show the custom file save dialog.
  if (file_save_box.DoModal() == IDCANCEL)
Index: src/GalileoView.h
===================================================================
--- src/GalileoView.h (revision 141)
+++ src/GalileoView.h (working copy)
@@ -182,8 +182,6 @@
  CPropertySheet *m_pPropSheet;
 
       protected:
- CICFOpenDialog file_open_box; // open config file dialog box
- CICFSaveDialog file_save_box; // save config file dialog box
 
  // tracks whether parent frame has already been sized.
  BOOL m_bSizedBefore;
Index: src/ICFOpenDialog.cpp
===================================================================
--- src/ICFOpenDialog.cpp (revision 141)
+++ src/ICFOpenDialog.cpp (working copy)
@@ -87,9 +87,10 @@
 
 /////////////////////////////////////////////////////////////////////////////
 // CICFOpenDialog dialog
-    CICFOpenDialog::CICFOpenDialog()
-:  CFileDialog(TRUE, "icf", "", NULL,
-    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||")
+   CICFOpenDialog::CICFOpenDialog()
+:  CFileDialog(TRUE, "icf", NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, 
+            "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||", 
+               NULL, 0UL, FALSE)
 {
  CString title;
  char *buf;
@@ -104,9 +105,6 @@
 
  m_ofn.lpTemplateName = MAKEINTRESOURCE(IDD_FILEOPEN_OPTS);
 
- // This is key to getting the templates working properly and secondary opens to work at all?!
- m_bVistaStyle = FALSE;
-
  //{{AFX_DATA_INIT(CICFOpenDialog)
  isCkTestSetup = TRUE;
  isCkResultsDisplay = TRUE;
Index: src/ICFSaveDialog.cpp
===================================================================
--- src/ICFSaveDialog.cpp (revision 141)
+++ src/ICFSaveDialog.cpp (working copy)
@@ -88,8 +88,9 @@
 /////////////////////////////////////////////////////////////////////////////
 // CICFSaveDialog dialog
     CICFSaveDialog::CICFSaveDialog()
-:  CFileDialog(FALSE, "icf", "iometer", NULL,
-    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||")
+:  CFileDialog(FALSE, "icf", "iometer",  OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
+    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||",
+        NULL, 0UL, FALSE)
 {
  CString title;
  char *buf;
@@ -104,9 +105,6 @@
 
  m_ofn.lpTemplateName = MAKEINTRESOURCE(IDD_FILESAVE_OPTS);
 
- // This is key to getting the templates working properly and secondary opens to work at all?!
- m_bVistaStyle = FALSE;
-
  //{{AFX_DATA_INIT(CICFSaveDialog)
  isCkTestSetup = TRUE;
  isCkResultsDisplay = TRUE;
Index: src/IOCommon.h
===================================================================
--- src/IOCommon.h (revision 141)
+++ src/IOCommon.h (working copy)
@@ -204,17 +204,21 @@
 #if defined(IOMTR_OSFAMILY_WINDOWS)   // Only first, because it is needed here!
  //#define VC_EXTRALEAN
  //#pragma warning (disable: 4242)
+#include "StdAfx.h"
+//#define WIN32_LEAN_AND_MEAN 1
+//#include <Windows.h>
+//#include <windef.h>  
  #include <process.h>
  #include <io.h>
  #include <direct.h>
- #include <afxwin.h>
- #include <afxext.h>
- #include <afxcmn.h>
- #include <winioctl.h>
+// #include <afxwin.h>
+// #include <afxext.h>
+// #include <afxcmn.h>
  #include <iomanip>
  #include <winperf.h>
  #include <winreg.h>
- #include <afxmt.h>
+ #include <winioctl.h>
+// #include <afxmt.h>
  #include <malloc.h>
 #endif
 // ----------------------------------------------------------------------------
@@ -868,7 +872,7 @@
  struct IOCQ {
  CQ_Element      *element_list;
  struct aiocb64 **aiocb_list;
-#ifdef IOMTR_SETTING_LINUX_LIBAIO
+#ifdef IOMTR_SETTING_LINUX_LIBAIO
  struct iocb **iocb_list;
         io_context_t io_ctx_id;
         struct io_event *events;
Index: src/IOPort.cpp
===================================================================
--- src/IOPort.cpp (revision 141)
+++ src/IOPort.cpp (working copy)
@@ -81,6 +81,7 @@
 /* ######################################################################### */
 
 #if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+#include "StdAfx.h"
 #include "GalileoApp.h"
 #endif
 #include "IOPort.h"
Index: src/IOPortTCP.cpp
===================================================================
--- src/IOPortTCP.cpp (revision 141)
+++ src/IOPortTCP.cpp (working copy)
@@ -89,7 +89,7 @@
 /* ######################################################################### */
 
 #if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
-#include <afx.h>
+#include "StdAfx.h"
 #endif
 
 #include "IOPortTCP.h"
Index: src/IOTarget.cpp
===================================================================
--- src/IOTarget.cpp (revision 141)
+++ src/IOTarget.cpp (working copy)
@@ -109,6 +109,9 @@
 #if defined(IOMTR_OSFAMILY_UNIX) && defined(WORKAROUND_MOD_BUG)
  return ((DWORDLONG)fmodl(spec.random = A * spec.random + B, limit));
 #else
+#ifdef _DEBUG
+ assert(limit > 0);
+#endif
  return (spec.random = A * spec.random + B) % limit;
 #endif
 }
Index: src/IOTargetDisk.cpp
===================================================================
--- src/IOTargetDisk.cpp (revision 141)
+++ src/IOTargetDisk.cpp (working copy)
@@ -1329,10 +1329,14 @@
  // Loop through the I/O queue looking for idle slots.
  for (i = 0; i < PREPARE_QDEPTH; i++) {
  // Check to see if we've reached the end of the disk
- if (spec.disk_info.maximum_size &&
+ // Windows debuggers lie when decoding spec.disk_info pushing
+ // values into local vars
+            int dd_sector_size = spec.disk_info.sector_size;
+            ULONGLONG dd_maximum_size = spec.disk_info.maximum_size;
+            ULONGLONG dd_starting_sector = spec.disk_info.starting_sector;
+ if (dd_maximum_size &&
     ((*prepare_offset + bytes) >
-     ((spec.disk_info.starting_sector +
-       (DWORDLONG) spec.disk_info.maximum_size) * spec.disk_info.sector_size))) {
+     ((dd_starting_sector + dd_maximum_size) * dd_sector_size))) {
  // A maximum disk size was specified by the user, and the next write 
  // would go past the specified maximum size.  
 #ifdef _DEBUG
Index: src/IOTime.cpp
===================================================================
--- src/IOTime.cpp (revision 141)
+++ src/IOTime.cpp (working copy)
@@ -92,6 +92,9 @@
 /* ##                                                                     ## */
 /* ######################################################################### */
 
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+#include "StdAfx.h"
+#endif
 #include "IOCommon.h"
 
 #if defined(IOMTR_OS_LINUX)
Index: src/StdAfx.h
===================================================================
--- src/StdAfx.h (revision 141)
+++ src/StdAfx.h (working copy)
@@ -58,11 +58,61 @@
 /* ##                                                                     ## */
 /* ######################################################################### */
 
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
+//#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
 
-#include <afxwin.h> // MFC core and standard components
+//#include <afxwin.h> // MFC core and standard components
 //#include <afxext.h>         // MFC extensions
+//#ifndef _AFX_NO_AFXCMN_SUPPORT
+//#include <afxcmn.h> // MFC support for Windows Common Controls
+//#endif // _AFX_NO_AFXCMN_SUPPORT
+//#include <afxtempl.h>
+
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently,
+// but are changed infrequently
+
+#pragma once
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN            // Exclude rarely-used stuff from Windows headers
+#endif
+
+#include "targetver.h"
+
+//#define _AFX_NO_OLE_SUPPORT 1
+#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS      // some CString constructors will be explicit
+
+// turns off MFC's hiding of some common and often safely ignored warning messages
+#define _AFX_ALL_WARNINGS
+
+#include <afxwin.h>         // MFC core and standard components
+#include <afxext.h>         // MFC extensions
+
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxdtctl.h>           // MFC support for Internet Explorer 4 Common Controls
+#endif
 #ifndef _AFX_NO_AFXCMN_SUPPORT
-#include <afxcmn.h> // MFC support for Windows Common Controls
-#endif // _AFX_NO_AFXCMN_SUPPORT
-//#include <afxtempl.h>
+#include <afxcmn.h>             // MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+#include <afxcontrolbars.h>     // MFC support for ribbons and control bars
+
+
+
+
+
+
+
+
+
+#ifdef _UNICODE
+#if defined _M_IX86
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#elif defined _M_X64
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#else
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#endif
+#endif
+
+



On Mon, Jan 13, 2014 at 3:10 PM, lefferts, john <[hidden email]> wrote:
I appreciate you valuable efforts.
I think the developers would be better able to evaluate the technical merit of your changes if you take the extra time to construct a patch.
Even a simple diff stream would be useful for a review.
 
I have co-workers who complain about “crashes” when shutting-down a performance run—I wonder if you have addressed their issues.
 
The SLN file under src/msvc9 says it was created with VS2008 (version 10) and I am using that.
It has the same constructor.
 
The developers have a comment that seems to indicate open-exclusive issues on reopen without prompt destruction of heap objects:
 
      // This is key to getting the templates working properly and secondary opens to work at all?!
      m_bVistaStyle = FALSE;
 
I am interested in seeing your changes.
 
 
From: Robert Randall [mailto:[hidden email]]
Sent: Monday, January 13, 2014 3:44 PM
To: [hidden email]
Subject: Re: [Iometer-devel] a couple fixes, are the maintainers interested?
 
I also fixed a problem when running in batch mode.  The destruction sequence of Windows causes an exception.  The cheap fix is implementing a function in CGalileoApp.
 
Regards,
Robert
 
On Mon, Jan 13, 2014 at 2:17 PM, Robert Randall <[hidden email]> wrote:
 
Hello,
 
I've spent some time fixing a few simple problems with the latest version of MFC using the current trunk.  The CFileDialog constructors were being called incorrectly causing reference counting problems with COM.   The COM classes should not have been initialized in the first place.  Because the code was messing with m_bVistaStyle directly (not a good idea) it was causing the COM classes to be created but not destroyed which results in exceptions when running in the debugger and leaks resource when running a release build.
 
I made these changes using VS 2012 and I don't have the tools to know if the CFileDialog constructor is compatible with previous releases of MFC.  I'm not sure how old a tool set is supported by the project when compiling on Windows.  Which versions of the compiler and MFC are supported?
 
The constructor in the version of MFC I'm using is:
 
CFileDialog(
   BOOL bOpenFileDialog,
   LPCTSTR lpszDefExt = NULL,
   LPCTSTR lpszFileName = NULL,
   DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
   LPCTSTR lpszFilter = NULL,
   CWnd* pParentWnd = NULL,
   DWORD dwSize = 0,
   BOOL bVistaStyle = TRUE
);
 
I found one other minor problem.  When using a file on disk for testing the minimum Maximum Disk Size in sectors MUST be 128 or larger because of the code that IOTargetDisk::Prepare assumes that at least 64Kb will be written to the file.  A smaller value results in a divide by zero exception.  I'm not sure if Prepare should be fixed to handle smaller files or a minimum size should be enforced by the GUI.  Happy to make the fix either way.
 
 
Let me know if you would like a patch for these changes.
 
Best regards,
Robert
 
--
Robert Randall | [hidden email]


 
--
Robert Randall | [hidden email]



--
Robert Randall | [hidden email]



--
Robert Randall | [hidden email]

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel



------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: a couple fixes, are the maintainers interested?

Robert Randall
Hi Ved,

Well, for Windows, there is a bit of code cleanup that could occur just to make both the GUI and Dynamo a bit safer.  The include uses for MFC are a bit messy which can create unexpected crashes, etc.  We get pushed to use FIO but our customers do not use FIO they use IOMeter so we stick to that.  I've not had time to review the IO and measurement code on Windows but it feels like that is old enough to perhaps warrant a review for updates and/or weak spots.  It would be best if the data collected by IOMeter on Windows matched what xperf collects.  The very knowledgeable customers use their own IO generation utilities which mimic the traffic of their apps and they rely on xperf for measurement.  Demonstrating that the two match or nearly match feel like it would be beneficial.

Past that, the entire GUI of IOMeter is a bit out of date and a bit confusing to the disk io tester.  Have you thought about a new GUI?  Might even be cross platform GUI, something like wxWidgets.  That would give Linux and Mac OS users a GUI.

Just my $0.02.

Best regards,
Robert


On Tue, Jan 14, 2014 at 10:10 AM, Vedran Degoricija <[hidden email]> wrote:
Thanks Robert. Let me review these.
 
As far as only a single manager opening, I might have a fix. I'll need to recall what it is I actually fixed in this area-- it was about a year ago.
 
Your offer for help is welcome. We've certainly been stagnant lately. Is there something in particular  that you are interested in?
 
Thanks,
Ved
 
 


On Tuesday, January 14, 2014 5:06 AM, Robert Randall <[hidden email]> wrote:
I apologize for not copying the list on this message.  Please review the patch below and let me know if you need another maintainer <grin>.  I've been developing Windows apps since before there was a Windows kernel <my age is showing>.

Best regards,
Robert

---------- Forwarded message ----------
From: Robert Randall <[hidden email]>
Date: Mon, Jan 13, 2014 at 7:04 PM
Subject: Re: [Iometer-devel] a couple fixes, are the maintainers interested?
To: "lefferts, john" <[hidden email]>


Patch is below.  There are still a few issues I should clean up with regard to cleanly including the MFC headers.  I need to investigate one more internal bug report; loading .icf file with multiple managers results in the first manager being created other are not created.


Index: src/GalileoApp.cpp
===================================================================
--- src/GalileoApp.cpp (revision 141)
+++ src/GalileoApp.cpp (working copy)
@@ -122,6 +122,14 @@
  delete login_port;
 }
 
+void CGalileoApp::CloseAllDocuments(BOOL bEndSession) 
+{
+ if (bEndSession)
+   {
+      m_wndStatusBar.DestroyWindow();
+      m_wndToolBar.DestroyWindow();
+   }
+}
 /////////////////////////////////////////////////////////////////////////////
 // The one and only CGalileoApp object
 
@@ -311,6 +319,8 @@
 ///////////////////////////////////////////////////////////////////////////////
 int CGalileoApp::ExitInstance()
 {
+   manager_list.RemoveAllManagers();
+
  delete[]m_pVersionString;
  delete[]m_pVersionStringWithDebug;
 
Index: src/GalileoApp.h
===================================================================
--- src/GalileoApp.h (revision 141)
+++ src/GalileoApp.h (working copy)
@@ -130,6 +130,7 @@
  virtual int ExitInstance();
  virtual BOOL OnIdle(LONG lCount);
  virtual CDocument *OpenDocumentFile(LPCTSTR lpszFileName);
+ virtual void CloseAllDocuments(BOOL bEndSession); 
  //}}AFX_VIRTUAL
 
 // Implementation
Index: src/GalileoView.cpp
===================================================================
--- src/GalileoView.cpp (revision 141)
+++ src/GalileoView.cpp (working copy)
@@ -1180,6 +1180,7 @@
 void CGalileoView::OnFileOpen()
 {
  BOOL flags[NumICFFlags];
+ CICFOpenDialog file_open_box; // open config file dialog box
 
  // Show the custom file open dialog.
  if (file_open_box.DoModal() == IDCANCEL)
@@ -1202,6 +1203,7 @@
 void CGalileoView::OnFileSave()
 {
  BOOL flags[NumICFFlags];
+ CICFSaveDialog file_save_box; // save config file dialog box
 
  // Show the custom file save dialog.
  if (file_save_box.DoModal() == IDCANCEL)
Index: src/GalileoView.h
===================================================================
--- src/GalileoView.h (revision 141)
+++ src/GalileoView.h (working copy)
@@ -182,8 +182,6 @@
  CPropertySheet *m_pPropSheet;
 
       protected:
- CICFOpenDialog file_open_box; // open config file dialog box
- CICFSaveDialog file_save_box; // save config file dialog box
 
  // tracks whether parent frame has already been sized.
  BOOL m_bSizedBefore;
Index: src/ICFOpenDialog.cpp
===================================================================
--- src/ICFOpenDialog.cpp (revision 141)
+++ src/ICFOpenDialog.cpp (working copy)
@@ -87,9 +87,10 @@
 
 /////////////////////////////////////////////////////////////////////////////
 // CICFOpenDialog dialog
-    CICFOpenDialog::CICFOpenDialog()
-:  CFileDialog(TRUE, "icf", "", NULL,
-    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||")
+   CICFOpenDialog::CICFOpenDialog()
+:  CFileDialog(TRUE, "icf", NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, 
+            "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||", 
+               NULL, 0UL, FALSE)
 {
  CString title;
  char *buf;
@@ -104,9 +105,6 @@
 
  m_ofn.lpTemplateName = MAKEINTRESOURCE(IDD_FILEOPEN_OPTS);
 
- // This is key to getting the templates working properly and secondary opens to work at all?!
- m_bVistaStyle = FALSE;
-
  //{{AFX_DATA_INIT(CICFOpenDialog)
  isCkTestSetup = TRUE;
  isCkResultsDisplay = TRUE;
Index: src/ICFSaveDialog.cpp
===================================================================
--- src/ICFSaveDialog.cpp (revision 141)
+++ src/ICFSaveDialog.cpp (working copy)
@@ -88,8 +88,9 @@
 /////////////////////////////////////////////////////////////////////////////
 // CICFSaveDialog dialog
     CICFSaveDialog::CICFSaveDialog()
-:  CFileDialog(FALSE, "icf", "iometer", NULL,
-    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||")
+:  CFileDialog(FALSE, "icf", "iometer",  OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
+    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||",
+        NULL, 0UL, FALSE)
 {
  CString title;
  char *buf;
@@ -104,9 +105,6 @@
 
  m_ofn.lpTemplateName = MAKEINTRESOURCE(IDD_FILESAVE_OPTS);
 
- // This is key to getting the templates working properly and secondary opens to work at all?!
- m_bVistaStyle = FALSE;
-
  //{{AFX_DATA_INIT(CICFSaveDialog)
  isCkTestSetup = TRUE;
  isCkResultsDisplay = TRUE;
Index: src/IOCommon.h
===================================================================
--- src/IOCommon.h (revision 141)
+++ src/IOCommon.h (working copy)
@@ -204,17 +204,21 @@
 #if defined(IOMTR_OSFAMILY_WINDOWS)   // Only first, because it is needed here!
  //#define VC_EXTRALEAN
  //#pragma warning (disable: 4242)
+#include "StdAfx.h"
+//#define WIN32_LEAN_AND_MEAN 1
+//#include <Windows.h>
+//#include <windef.h>  
  #include <process.h>
  #include <io.h>
  #include <direct.h>
- #include <afxwin.h>
- #include <afxext.h>
- #include <afxcmn.h>
- #include <winioctl.h>
+// #include <afxwin.h>
+// #include <afxext.h>
+// #include <afxcmn.h>
  #include <iomanip>
  #include <winperf.h>
  #include <winreg.h>
- #include <afxmt.h>
+ #include <winioctl.h>
+// #include <afxmt.h>
  #include <malloc.h>
 #endif
 // ----------------------------------------------------------------------------
@@ -868,7 +872,7 @@
  struct IOCQ {
  CQ_Element      *element_list;
  struct aiocb64 **aiocb_list;
-#ifdef IOMTR_SETTING_LINUX_LIBAIO
+#ifdef IOMTR_SETTING_LINUX_LIBAIO
  struct iocb **iocb_list;
         io_context_t io_ctx_id;
         struct io_event *events;
Index: src/IOPort.cpp
===================================================================
--- src/IOPort.cpp (revision 141)
+++ src/IOPort.cpp (working copy)
@@ -81,6 +81,7 @@
 /* ######################################################################### */
 
 #if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+#include "StdAfx.h"
 #include "GalileoApp.h"
 #endif
 #include "IOPort.h"
Index: src/IOPortTCP.cpp
===================================================================
--- src/IOPortTCP.cpp (revision 141)
+++ src/IOPortTCP.cpp (working copy)
@@ -89,7 +89,7 @@
 /* ######################################################################### */
 
 #if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
-#include <afx.h>
+#include "StdAfx.h"
 #endif
 
 #include "IOPortTCP.h"
Index: src/IOTarget.cpp
===================================================================
--- src/IOTarget.cpp (revision 141)
+++ src/IOTarget.cpp (working copy)
@@ -109,6 +109,9 @@
 #if defined(IOMTR_OSFAMILY_UNIX) && defined(WORKAROUND_MOD_BUG)
  return ((DWORDLONG)fmodl(spec.random = A * spec.random + B, limit));
 #else
+#ifdef _DEBUG
+ assert(limit > 0);
+#endif
  return (spec.random = A * spec.random + B) % limit;
 #endif
 }
Index: src/IOTargetDisk.cpp
===================================================================
--- src/IOTargetDisk.cpp (revision 141)
+++ src/IOTargetDisk.cpp (working copy)
@@ -1329,10 +1329,14 @@
  // Loop through the I/O queue looking for idle slots.
  for (i = 0; i < PREPARE_QDEPTH; i++) {
  // Check to see if we've reached the end of the disk
- if (spec.disk_info.maximum_size &&
+ // Windows debuggers lie when decoding spec.disk_info pushing
+ // values into local vars
+            int dd_sector_size = spec.disk_info.sector_size;
+            ULONGLONG dd_maximum_size = spec.disk_info.maximum_size;
+            ULONGLONG dd_starting_sector = spec.disk_info.starting_sector;
+ if (dd_maximum_size &&
     ((*prepare_offset + bytes) >
-     ((spec.disk_info.starting_sector +
-       (DWORDLONG) spec.disk_info.maximum_size) * spec.disk_info.sector_size))) {
+     ((dd_starting_sector + dd_maximum_size) * dd_sector_size))) {
  // A maximum disk size was specified by the user, and the next write 
  // would go past the specified maximum size.  
 #ifdef _DEBUG
Index: src/IOTime.cpp
===================================================================
--- src/IOTime.cpp (revision 141)
+++ src/IOTime.cpp (working copy)
@@ -92,6 +92,9 @@
 /* ##                                                                     ## */
 /* ######################################################################### */
 
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+#include "StdAfx.h"
+#endif
 #include "IOCommon.h"
 
 #if defined(IOMTR_OS_LINUX)
Index: src/StdAfx.h
===================================================================
--- src/StdAfx.h (revision 141)
+++ src/StdAfx.h (working copy)
@@ -58,11 +58,61 @@
 /* ##                                                                     ## */
 /* ######################################################################### */
 
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
+//#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
 
-#include <afxwin.h> // MFC core and standard components
+//#include <afxwin.h> // MFC core and standard components
 //#include <afxext.h>         // MFC extensions
+//#ifndef _AFX_NO_AFXCMN_SUPPORT
+//#include <afxcmn.h> // MFC support for Windows Common Controls
+//#endif // _AFX_NO_AFXCMN_SUPPORT
+//#include <afxtempl.h>
+
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently,
+// but are changed infrequently
+
+#pragma once
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN            // Exclude rarely-used stuff from Windows headers
+#endif
+
+#include "targetver.h"
+
+//#define _AFX_NO_OLE_SUPPORT 1
+#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS      // some CString constructors will be explicit
+
+// turns off MFC's hiding of some common and often safely ignored warning messages
+#define _AFX_ALL_WARNINGS
+
+#include <afxwin.h>         // MFC core and standard components
+#include <afxext.h>         // MFC extensions
+
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxdtctl.h>           // MFC support for Internet Explorer 4 Common Controls
+#endif
 #ifndef _AFX_NO_AFXCMN_SUPPORT
-#include <afxcmn.h> // MFC support for Windows Common Controls
-#endif // _AFX_NO_AFXCMN_SUPPORT
-//#include <afxtempl.h>
+#include <afxcmn.h>             // MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+#include <afxcontrolbars.h>     // MFC support for ribbons and control bars
+
+
+
+
+
+
+
+
+
+#ifdef _UNICODE
+#if defined _M_IX86
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#elif defined _M_X64
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#else
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#endif
+#endif
+
+



On Mon, Jan 13, 2014 at 3:10 PM, lefferts, john <[hidden email]> wrote:
I appreciate you valuable efforts.
I think the developers would be better able to evaluate the technical merit of your changes if you take the extra time to construct a patch.
Even a simple diff stream would be useful for a review.
 
I have co-workers who complain about “crashes” when shutting-down a performance run—I wonder if you have addressed their issues.
 
The SLN file under src/msvc9 says it was created with VS2008 (version 10) and I am using that.
It has the same constructor.
 
The developers have a comment that seems to indicate open-exclusive issues on reopen without prompt destruction of heap objects:
 
      // This is key to getting the templates working properly and secondary opens to work at all?!
      m_bVistaStyle = FALSE;
 
I am interested in seeing your changes.
 
 
From: Robert Randall [mailto:[hidden email]]
Sent: Monday, January 13, 2014 3:44 PM
To: [hidden email]
Subject: Re: [Iometer-devel] a couple fixes, are the maintainers interested?
 
I also fixed a problem when running in batch mode.  The destruction sequence of Windows causes an exception.  The cheap fix is implementing a function in CGalileoApp.
 
Regards,
Robert
 
On Mon, Jan 13, 2014 at 2:17 PM, Robert Randall <[hidden email]> wrote:
 
Hello,
 
I've spent some time fixing a few simple problems with the latest version of MFC using the current trunk.  The CFileDialog constructors were being called incorrectly causing reference counting problems with COM.   The COM classes should not have been initialized in the first place.  Because the code was messing with m_bVistaStyle directly (not a good idea) it was causing the COM classes to be created but not destroyed which results in exceptions when running in the debugger and leaks resource when running a release build.
 
I made these changes using VS 2012 and I don't have the tools to know if the CFileDialog constructor is compatible with previous releases of MFC.  I'm not sure how old a tool set is supported by the project when compiling on Windows.  Which versions of the compiler and MFC are supported?
 
The constructor in the version of MFC I'm using is:
 
CFileDialog(
   BOOL bOpenFileDialog,
   LPCTSTR lpszDefExt = NULL,
   LPCTSTR lpszFileName = NULL,
   DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
   LPCTSTR lpszFilter = NULL,
   CWnd* pParentWnd = NULL,
   DWORD dwSize = 0,
   BOOL bVistaStyle = TRUE
);
 
I found one other minor problem.  When using a file on disk for testing the minimum Maximum Disk Size in sectors MUST be 128 or larger because of the code that IOTargetDisk::Prepare assumes that at least 64Kb will be written to the file.  A smaller value results in a divide by zero exception.  I'm not sure if Prepare should be fixed to handle smaller files or a minimum size should be enforced by the GUI.  Happy to make the fix either way.
 
 
Let me know if you would like a patch for these changes.
 
Best regards,
Robert
 
--
Robert Randall | [hidden email]


 
--
Robert Randall | [hidden email]



--
Robert Randall | [hidden email]



--
Robert Randall | [hidden email]

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel





--
Robert Randall | [hidden email]

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: a couple fixes, are the maintainers interested?

Robert Randall
In reply to this post by Vedran Degoricija
I did confirm that the multiple manager problem still exists.  When IOMeter opens a configuration file with multiple managers it spawns the first manager on the local host but does not spawn any additional managers and times out waiting for the additional managers to become available; i.e. connect to the IOMeter TCP port.

Regards,
Robert


On Tue, Jan 14, 2014 at 10:10 AM, Vedran Degoricija <[hidden email]> wrote:
Thanks Robert. Let me review these.
 
As far as only a single manager opening, I might have a fix. I'll need to recall what it is I actually fixed in this area-- it was about a year ago.
 
Your offer for help is welcome. We've certainly been stagnant lately. Is there something in particular  that you are interested in?
 
Thanks,
Ved
 
 


On Tuesday, January 14, 2014 5:06 AM, Robert Randall <[hidden email]> wrote:
I apologize for not copying the list on this message.  Please review the patch below and let me know if you need another maintainer <grin>.  I've been developing Windows apps since before there was a Windows kernel <my age is showing>.

Best regards,
Robert

---------- Forwarded message ----------
From: Robert Randall <[hidden email]>
Date: Mon, Jan 13, 2014 at 7:04 PM
Subject: Re: [Iometer-devel] a couple fixes, are the maintainers interested?
To: "lefferts, john" <[hidden email]>


Patch is below.  There are still a few issues I should clean up with regard to cleanly including the MFC headers.  I need to investigate one more internal bug report; loading .icf file with multiple managers results in the first manager being created other are not created.


Index: src/GalileoApp.cpp
===================================================================
--- src/GalileoApp.cpp (revision 141)
+++ src/GalileoApp.cpp (working copy)
@@ -122,6 +122,14 @@
  delete login_port;
 }
 
+void CGalileoApp::CloseAllDocuments(BOOL bEndSession) 
+{
+ if (bEndSession)
+   {
+      m_wndStatusBar.DestroyWindow();
+      m_wndToolBar.DestroyWindow();
+   }
+}
 /////////////////////////////////////////////////////////////////////////////
 // The one and only CGalileoApp object
 
@@ -311,6 +319,8 @@
 ///////////////////////////////////////////////////////////////////////////////
 int CGalileoApp::ExitInstance()
 {
+   manager_list.RemoveAllManagers();
+
  delete[]m_pVersionString;
  delete[]m_pVersionStringWithDebug;
 
Index: src/GalileoApp.h
===================================================================
--- src/GalileoApp.h (revision 141)
+++ src/GalileoApp.h (working copy)
@@ -130,6 +130,7 @@
  virtual int ExitInstance();
  virtual BOOL OnIdle(LONG lCount);
  virtual CDocument *OpenDocumentFile(LPCTSTR lpszFileName);
+ virtual void CloseAllDocuments(BOOL bEndSession); 
  //}}AFX_VIRTUAL
 
 // Implementation
Index: src/GalileoView.cpp
===================================================================
--- src/GalileoView.cpp (revision 141)
+++ src/GalileoView.cpp (working copy)
@@ -1180,6 +1180,7 @@
 void CGalileoView::OnFileOpen()
 {
  BOOL flags[NumICFFlags];
+ CICFOpenDialog file_open_box; // open config file dialog box
 
  // Show the custom file open dialog.
  if (file_open_box.DoModal() == IDCANCEL)
@@ -1202,6 +1203,7 @@
 void CGalileoView::OnFileSave()
 {
  BOOL flags[NumICFFlags];
+ CICFSaveDialog file_save_box; // save config file dialog box
 
  // Show the custom file save dialog.
  if (file_save_box.DoModal() == IDCANCEL)
Index: src/GalileoView.h
===================================================================
--- src/GalileoView.h (revision 141)
+++ src/GalileoView.h (working copy)
@@ -182,8 +182,6 @@
  CPropertySheet *m_pPropSheet;
 
       protected:
- CICFOpenDialog file_open_box; // open config file dialog box
- CICFSaveDialog file_save_box; // save config file dialog box
 
  // tracks whether parent frame has already been sized.
  BOOL m_bSizedBefore;
Index: src/ICFOpenDialog.cpp
===================================================================
--- src/ICFOpenDialog.cpp (revision 141)
+++ src/ICFOpenDialog.cpp (working copy)
@@ -87,9 +87,10 @@
 
 /////////////////////////////////////////////////////////////////////////////
 // CICFOpenDialog dialog
-    CICFOpenDialog::CICFOpenDialog()
-:  CFileDialog(TRUE, "icf", "", NULL,
-    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||")
+   CICFOpenDialog::CICFOpenDialog()
+:  CFileDialog(TRUE, "icf", NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, 
+            "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||", 
+               NULL, 0UL, FALSE)
 {
  CString title;
  char *buf;
@@ -104,9 +105,6 @@
 
  m_ofn.lpTemplateName = MAKEINTRESOURCE(IDD_FILEOPEN_OPTS);
 
- // This is key to getting the templates working properly and secondary opens to work at all?!
- m_bVistaStyle = FALSE;
-
  //{{AFX_DATA_INIT(CICFOpenDialog)
  isCkTestSetup = TRUE;
  isCkResultsDisplay = TRUE;
Index: src/ICFSaveDialog.cpp
===================================================================
--- src/ICFSaveDialog.cpp (revision 141)
+++ src/ICFSaveDialog.cpp (working copy)
@@ -88,8 +88,9 @@
 /////////////////////////////////////////////////////////////////////////////
 // CICFSaveDialog dialog
     CICFSaveDialog::CICFSaveDialog()
-:  CFileDialog(FALSE, "icf", "iometer", NULL,
-    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||")
+:  CFileDialog(FALSE, "icf", "iometer",  OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
+    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||",
+        NULL, 0UL, FALSE)
 {
  CString title;
  char *buf;
@@ -104,9 +105,6 @@
 
  m_ofn.lpTemplateName = MAKEINTRESOURCE(IDD_FILESAVE_OPTS);
 
- // This is key to getting the templates working properly and secondary opens to work at all?!
- m_bVistaStyle = FALSE;
-
  //{{AFX_DATA_INIT(CICFSaveDialog)
  isCkTestSetup = TRUE;
  isCkResultsDisplay = TRUE;
Index: src/IOCommon.h
===================================================================
--- src/IOCommon.h (revision 141)
+++ src/IOCommon.h (working copy)
@@ -204,17 +204,21 @@
 #if defined(IOMTR_OSFAMILY_WINDOWS)   // Only first, because it is needed here!
  //#define VC_EXTRALEAN
  //#pragma warning (disable: 4242)
+#include "StdAfx.h"
+//#define WIN32_LEAN_AND_MEAN 1
+//#include <Windows.h>
+//#include <windef.h>  
  #include <process.h>
  #include <io.h>
  #include <direct.h>
- #include <afxwin.h>
- #include <afxext.h>
- #include <afxcmn.h>
- #include <winioctl.h>
+// #include <afxwin.h>
+// #include <afxext.h>
+// #include <afxcmn.h>
  #include <iomanip>
  #include <winperf.h>
  #include <winreg.h>
- #include <afxmt.h>
+ #include <winioctl.h>
+// #include <afxmt.h>
  #include <malloc.h>
 #endif
 // ----------------------------------------------------------------------------
@@ -868,7 +872,7 @@
  struct IOCQ {
  CQ_Element      *element_list;
  struct aiocb64 **aiocb_list;
-#ifdef IOMTR_SETTING_LINUX_LIBAIO
+#ifdef IOMTR_SETTING_LINUX_LIBAIO
  struct iocb **iocb_list;
         io_context_t io_ctx_id;
         struct io_event *events;
Index: src/IOPort.cpp
===================================================================
--- src/IOPort.cpp (revision 141)
+++ src/IOPort.cpp (working copy)
@@ -81,6 +81,7 @@
 /* ######################################################################### */
 
 #if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+#include "StdAfx.h"
 #include "GalileoApp.h"
 #endif
 #include "IOPort.h"
Index: src/IOPortTCP.cpp
===================================================================
--- src/IOPortTCP.cpp (revision 141)
+++ src/IOPortTCP.cpp (working copy)
@@ -89,7 +89,7 @@
 /* ######################################################################### */
 
 #if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
-#include <afx.h>
+#include "StdAfx.h"
 #endif
 
 #include "IOPortTCP.h"
Index: src/IOTarget.cpp
===================================================================
--- src/IOTarget.cpp (revision 141)
+++ src/IOTarget.cpp (working copy)
@@ -109,6 +109,9 @@
 #if defined(IOMTR_OSFAMILY_UNIX) && defined(WORKAROUND_MOD_BUG)
  return ((DWORDLONG)fmodl(spec.random = A * spec.random + B, limit));
 #else
+#ifdef _DEBUG
+ assert(limit > 0);
+#endif
  return (spec.random = A * spec.random + B) % limit;
 #endif
 }
Index: src/IOTargetDisk.cpp
===================================================================
--- src/IOTargetDisk.cpp (revision 141)
+++ src/IOTargetDisk.cpp (working copy)
@@ -1329,10 +1329,14 @@
  // Loop through the I/O queue looking for idle slots.
  for (i = 0; i < PREPARE_QDEPTH; i++) {
  // Check to see if we've reached the end of the disk
- if (spec.disk_info.maximum_size &&
+ // Windows debuggers lie when decoding spec.disk_info pushing
+ // values into local vars
+            int dd_sector_size = spec.disk_info.sector_size;
+            ULONGLONG dd_maximum_size = spec.disk_info.maximum_size;
+            ULONGLONG dd_starting_sector = spec.disk_info.starting_sector;
+ if (dd_maximum_size &&
     ((*prepare_offset + bytes) >
-     ((spec.disk_info.starting_sector +
-       (DWORDLONG) spec.disk_info.maximum_size) * spec.disk_info.sector_size))) {
+     ((dd_starting_sector + dd_maximum_size) * dd_sector_size))) {
  // A maximum disk size was specified by the user, and the next write 
  // would go past the specified maximum size.  
 #ifdef _DEBUG
Index: src/IOTime.cpp
===================================================================
--- src/IOTime.cpp (revision 141)
+++ src/IOTime.cpp (working copy)
@@ -92,6 +92,9 @@
 /* ##                                                                     ## */
 /* ######################################################################### */
 
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+#include "StdAfx.h"
+#endif
 #include "IOCommon.h"
 
 #if defined(IOMTR_OS_LINUX)
Index: src/StdAfx.h
===================================================================
--- src/StdAfx.h (revision 141)
+++ src/StdAfx.h (working copy)
@@ -58,11 +58,61 @@
 /* ##                                                                     ## */
 /* ######################################################################### */
 
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
+//#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
 
-#include <afxwin.h> // MFC core and standard components
+//#include <afxwin.h> // MFC core and standard components
 //#include <afxext.h>         // MFC extensions
+//#ifndef _AFX_NO_AFXCMN_SUPPORT
+//#include <afxcmn.h> // MFC support for Windows Common Controls
+//#endif // _AFX_NO_AFXCMN_SUPPORT
+//#include <afxtempl.h>
+
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently,
+// but are changed infrequently
+
+#pragma once
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN            // Exclude rarely-used stuff from Windows headers
+#endif
+
+#include "targetver.h"
+
+//#define _AFX_NO_OLE_SUPPORT 1
+#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS      // some CString constructors will be explicit
+
+// turns off MFC's hiding of some common and often safely ignored warning messages
+#define _AFX_ALL_WARNINGS
+
+#include <afxwin.h>         // MFC core and standard components
+#include <afxext.h>         // MFC extensions
+
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxdtctl.h>           // MFC support for Internet Explorer 4 Common Controls
+#endif
 #ifndef _AFX_NO_AFXCMN_SUPPORT
-#include <afxcmn.h> // MFC support for Windows Common Controls
-#endif // _AFX_NO_AFXCMN_SUPPORT
-//#include <afxtempl.h>
+#include <afxcmn.h>             // MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+#include <afxcontrolbars.h>     // MFC support for ribbons and control bars
+
+
+
+
+
+
+
+
+
+#ifdef _UNICODE
+#if defined _M_IX86
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#elif defined _M_X64
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#else
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#endif
+#endif
+
+



On Mon, Jan 13, 2014 at 3:10 PM, lefferts, john <[hidden email]> wrote:
I appreciate you valuable efforts.
I think the developers would be better able to evaluate the technical merit of your changes if you take the extra time to construct a patch.
Even a simple diff stream would be useful for a review.
 
I have co-workers who complain about “crashes” when shutting-down a performance run—I wonder if you have addressed their issues.
 
The SLN file under src/msvc9 says it was created with VS2008 (version 10) and I am using that.
It has the same constructor.
 
The developers have a comment that seems to indicate open-exclusive issues on reopen without prompt destruction of heap objects:
 
      // This is key to getting the templates working properly and secondary opens to work at all?!
      m_bVistaStyle = FALSE;
 
I am interested in seeing your changes.
 
 
From: Robert Randall [mailto:[hidden email]]
Sent: Monday, January 13, 2014 3:44 PM
To: [hidden email]
Subject: Re: [Iometer-devel] a couple fixes, are the maintainers interested?
 
I also fixed a problem when running in batch mode.  The destruction sequence of Windows causes an exception.  The cheap fix is implementing a function in CGalileoApp.
 
Regards,
Robert
 
On Mon, Jan 13, 2014 at 2:17 PM, Robert Randall <[hidden email]> wrote:
 
Hello,
 
I've spent some time fixing a few simple problems with the latest version of MFC using the current trunk.  The CFileDialog constructors were being called incorrectly causing reference counting problems with COM.   The COM classes should not have been initialized in the first place.  Because the code was messing with m_bVistaStyle directly (not a good idea) it was causing the COM classes to be created but not destroyed which results in exceptions when running in the debugger and leaks resource when running a release build.
 
I made these changes using VS 2012 and I don't have the tools to know if the CFileDialog constructor is compatible with previous releases of MFC.  I'm not sure how old a tool set is supported by the project when compiling on Windows.  Which versions of the compiler and MFC are supported?
 
The constructor in the version of MFC I'm using is:
 
CFileDialog(
   BOOL bOpenFileDialog,
   LPCTSTR lpszDefExt = NULL,
   LPCTSTR lpszFileName = NULL,
   DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
   LPCTSTR lpszFilter = NULL,
   CWnd* pParentWnd = NULL,
   DWORD dwSize = 0,
   BOOL bVistaStyle = TRUE
);
 
I found one other minor problem.  When using a file on disk for testing the minimum Maximum Disk Size in sectors MUST be 128 or larger because of the code that IOTargetDisk::Prepare assumes that at least 64Kb will be written to the file.  A smaller value results in a divide by zero exception.  I'm not sure if Prepare should be fixed to handle smaller files or a minimum size should be enforced by the GUI.  Happy to make the fix either way.
 
 
Let me know if you would like a patch for these changes.
 
Best regards,
Robert
 
--
Robert Randall | [hidden email]


 
--
Robert Randall | [hidden email]



--
Robert Randall | [hidden email]



--
Robert Randall | [hidden email]

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel





--
Robert Randall | [hidden email]

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: a couple fixes, are the maintainers interested?

Vedran Degoricija
Hi Randall,

No arguments from me. Is there data that shows discrepancies between IOmeter and xperf today? And how do the FIO numbers compare?

Cleanup of the MFC usage is welcome. I will safely speak for myself when I say I am no expert.

The GUI re-write is a topic that has been discussed in the past. This opens up a big can of worms, but I am interested in going there. I'd let other folks comment.

Thanks,
Ved


On Tuesday, January 14, 2014 10:42 AM, Robert Randall <[hidden email]> wrote:
I did confirm that the multiple manager problem still exists.  When IOMeter opens a configuration file with multiple managers it spawns the first manager on the local host but does not spawn any additional managers and times out waiting for the additional managers to become available; i.e. connect to the IOMeter TCP port.

Regards,
Robert


On Tue, Jan 14, 2014 at 10:10 AM, Vedran Degoricija <[hidden email]> wrote:
Thanks Robert. Let me review these.
 
As far as only a single manager opening, I might have a fix. I'll need to recall what it is I actually fixed in this area-- it was about a year ago.
 
Your offer for help is welcome. We've certainly been stagnant lately. Is there something in particular  that you are interested in?
 
Thanks,
Ved
 
 


On Tuesday, January 14, 2014 5:06 AM, Robert Randall <[hidden email]> wrote:
I apologize for not copying the list on this message.  Please review the patch below and let me know if you need another maintainer <grin>.  I've been developing Windows apps since before there was a Windows kernel <my age is showing>.

Best regards,
Robert

---------- Forwarded message ----------
From: Robert Randall <[hidden email]>
Date: Mon, Jan 13, 2014 at 7:04 PM
Subject: Re: [Iometer-devel] a couple fixes, are the maintainers interested?
To: "lefferts, john" <[hidden email]>


Patch is below.  There are still a few issues I should clean up with regard to cleanly including the MFC headers.  I need to investigate one more internal bug report; loading .icf file with multiple managers results in the first manager being created other are not created.


Index: src/GalileoApp.cpp
===================================================================
--- src/GalileoApp.cpp (revision 141)
+++ src/GalileoApp.cpp (working copy)
@@ -122,6 +122,14 @@
  delete login_port;
 }
 
+void CGalileoApp::CloseAllDocuments(BOOL bEndSession) 
+{
+ if (bEndSession)
+   {
+      m_wndStatusBar.DestroyWindow();
+      m_wndToolBar.DestroyWindow();
+   }
+}
 /////////////////////////////////////////////////////////////////////////////
 // The one and only CGalileoApp object
 
@@ -311,6 +319,8 @@
 ///////////////////////////////////////////////////////////////////////////////
 int CGalileoApp::ExitInstance()
 {
+   manager_list.RemoveAllManagers();
+
  delete[]m_pVersionString;
  delete[]m_pVersionStringWithDebug;
 
Index: src/GalileoApp.h
===================================================================
--- src/GalileoApp.h (revision 141)
+++ src/GalileoApp.h (working copy)
@@ -130,6 +130,7 @@
  virtual int ExitInstance();
  virtual BOOL OnIdle(LONG lCount);
  virtual CDocument *OpenDocumentFile(LPCTSTR lpszFileName);
+ virtual void CloseAllDocuments(BOOL bEndSession); 
  //}}AFX_VIRTUAL
 
 // Implementation
Index: src/GalileoView.cpp
===================================================================
--- src/GalileoView.cpp (revision 141)
+++ src/GalileoView.cpp (working copy)
@@ -1180,6 +1180,7 @@
 void CGalileoView::OnFileOpen()
 {
  BOOL flags[NumICFFlags];
+ CICFOpenDialog file_open_box; // open config file dialog box
 
  // Show the custom file open dialog.
  if (file_open_box.DoModal() == IDCANCEL)
@@ -1202,6 +1203,7 @@
 void CGalileoView::OnFileSave()
 {
  BOOL flags[NumICFFlags];
+ CICFSaveDialog file_save_box; // save config file dialog box
 
  // Show the custom file save dialog.
  if (file_save_box.DoModal() == IDCANCEL)
Index: src/GalileoView.h
===================================================================
--- src/GalileoView.h (revision 141)
+++ src/GalileoView.h (working copy)
@@ -182,8 +182,6 @@
  CPropertySheet *m_pPropSheet;
 
       protected:
- CICFOpenDialog file_open_box; // open config file dialog box
- CICFSaveDialog file_save_box; // save config file dialog box
 
  // tracks whether parent frame has already been sized.
  BOOL m_bSizedBefore;
Index: src/ICFOpenDialog.cpp
===================================================================
--- src/ICFOpenDialog.cpp (revision 141)
+++ src/ICFOpenDialog.cpp (working copy)
@@ -87,9 +87,10 @@
 
 /////////////////////////////////////////////////////////////////////////////
 // CICFOpenDialog dialog
-    CICFOpenDialog::CICFOpenDialog()
-:  CFileDialog(TRUE, "icf", "", NULL,
-    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||")
+   CICFOpenDialog::CICFOpenDialog()
+:  CFileDialog(TRUE, "icf", NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, 
+            "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||", 
+               NULL, 0UL, FALSE)
 {
  CString title;
  char *buf;
@@ -104,9 +105,6 @@
 
  m_ofn.lpTemplateName = MAKEINTRESOURCE(IDD_FILEOPEN_OPTS);
 
- // This is key to getting the templates working properly and secondary opens to work at all?!
- m_bVistaStyle = FALSE;
-
  //{{AFX_DATA_INIT(CICFOpenDialog)
  isCkTestSetup = TRUE;
  isCkResultsDisplay = TRUE;
Index: src/ICFSaveDialog.cpp
===================================================================
--- src/ICFSaveDialog.cpp (revision 141)
+++ src/ICFSaveDialog.cpp (working copy)
@@ -88,8 +88,9 @@
 /////////////////////////////////////////////////////////////////////////////
 // CICFSaveDialog dialog
     CICFSaveDialog::CICFSaveDialog()
-:  CFileDialog(FALSE, "icf", "iometer", NULL,
-    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||")
+:  CFileDialog(FALSE, "icf", "iometer",  OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
+    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||",
+        NULL, 0UL, FALSE)
 {
  CString title;
  char *buf;
@@ -104,9 +105,6 @@
 
  m_ofn.lpTemplateName = MAKEINTRESOURCE(IDD_FILESAVE_OPTS);
 
- // This is key to getting the templates working properly and secondary opens to work at all?!
- m_bVistaStyle = FALSE;
-
  //{{AFX_DATA_INIT(CICFSaveDialog)
  isCkTestSetup = TRUE;
  isCkResultsDisplay = TRUE;
Index: src/IOCommon.h
===================================================================
--- src/IOCommon.h (revision 141)
+++ src/IOCommon.h (working copy)
@@ -204,17 +204,21 @@
 #if defined(IOMTR_OSFAMILY_WINDOWS)   // Only first, because it is needed here!
  //#define VC_EXTRALEAN
  //#pragma warning (disable: 4242)
+#include "StdAfx.h"
+//#define WIN32_LEAN_AND_MEAN 1
+//#include <Windows.h>
+//#include <windef.h>  
  #include <process.h>
  #include <io.h>
  #include <direct.h>
- #include <afxwin.h>
- #include <afxext.h>
- #include <afxcmn.h>
- #include <winioctl.h>
+// #include <afxwin.h>
+// #include <afxext.h>
+// #include <afxcmn.h>
  #include <iomanip>
  #include <winperf.h>
  #include <winreg.h>
- #include <afxmt.h>
+ #include <winioctl.h>
+// #include <afxmt.h>
  #include <malloc.h>
 #endif
 // ----------------------------------------------------------------------------
@@ -868,7 +872,7 @@
  struct IOCQ {
  CQ_Element      *element_list;
  struct aiocb64 **aiocb_list;
-#ifdef IOMTR_SETTING_LINUX_LIBAIO
+#ifdef IOMTR_SETTING_LINUX_LIBAIO
  struct iocb **iocb_list;
         io_context_t io_ctx_id;
         struct io_event *events;
Index: src/IOPort.cpp
===================================================================
--- src/IOPort.cpp (revision 141)
+++ src/IOPort.cpp (working copy)
@@ -81,6 +81,7 @@
 /* ######################################################################### */
 
 #if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+#include "StdAfx.h"
 #include "GalileoApp.h"
 #endif
 #include "IOPort.h"
Index: src/IOPortTCP.cpp
===================================================================
--- src/IOPortTCP.cpp (revision 141)
+++ src/IOPortTCP.cpp (working copy)
@@ -89,7 +89,7 @@
 /* ######################################################################### */
 
 #if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
-#include <afx.h>
+#include "StdAfx.h"
 #endif
 
 #include "IOPortTCP.h"
Index: src/IOTarget.cpp
===================================================================
--- src/IOTarget.cpp (revision 141)
+++ src/IOTarget.cpp (working copy)
@@ -109,6 +109,9 @@
 #if defined(IOMTR_OSFAMILY_UNIX) && defined(WORKAROUND_MOD_BUG)
  return ((DWORDLONG)fmodl(spec.random = A * spec.random + B, limit));
 #else
+#ifdef _DEBUG
+ assert(limit > 0);
+#endif
  return (spec.random = A * spec.random + B) % limit;
 #endif
 }
Index: src/IOTargetDisk.cpp
===================================================================
--- src/IOTargetDisk.cpp (revision 141)
+++ src/IOTargetDisk.cpp (working copy)
@@ -1329,10 +1329,14 @@
  // Loop through the I/O queue looking for idle slots.
  for (i = 0; i < PREPARE_QDEPTH; i++) {
  // Check to see if we've reached the end of the disk
- if (spec.disk_info.maximum_size &&
+ // Windows debuggers lie when decoding spec.disk_info pushing
+ // values into local vars
+            int dd_sector_size = spec.disk_info.sector_size;
+            ULONGLONG dd_maximum_size = spec.disk_info.maximum_size;
+            ULONGLONG dd_starting_sector = spec.disk_info.starting_sector;
+ if (dd_maximum_size &&
     ((*prepare_offset + bytes) >
-     ((spec.disk_info.starting_sector +
-       (DWORDLONG) spec.disk_info.maximum_size) * spec.disk_info.sector_size))) {
+     ((dd_starting_sector + dd_maximum_size) * dd_sector_size))) {
  // A maximum disk size was specified by the user, and the next write 
  // would go past the specified maximum size.  
 #ifdef _DEBUG
Index: src/IOTime.cpp
===================================================================
--- src/IOTime.cpp (revision 141)
+++ src/IOTime.cpp (working copy)
@@ -92,6 +92,9 @@
 /* ##                                                                     ## */
 /* ######################################################################### */
 
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+#include "StdAfx.h"
+#endif
 #include "IOCommon.h"
 
 #if defined(IOMTR_OS_LINUX)
Index: src/StdAfx.h
===================================================================
--- src/StdAfx.h (revision 141)
+++ src/StdAfx.h (working copy)
@@ -58,11 +58,61 @@
 /* ##                                                                     ## */
 /* ######################################################################### */
 
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
+//#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
 
-#include <afxwin.h> // MFC core and standard components
+//#include <afxwin.h> // MFC core and standard components
 //#include <afxext.h>         // MFC extensions
+//#ifndef _AFX_NO_AFXCMN_SUPPORT
+//#include <afxcmn.h> // MFC support for Windows Common Controls
+//#endif // _AFX_NO_AFXCMN_SUPPORT
+//#include <afxtempl.h>
+
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently,
+// but are changed infrequently
+
+#pragma once
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN            // Exclude rarely-used stuff from Windows headers
+#endif
+
+#include "targetver.h"
+
+//#define _AFX_NO_OLE_SUPPORT 1
+#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS      // some CString constructors will be explicit
+
+// turns off MFC's hiding of some common and often safely ignored warning messages
+#define _AFX_ALL_WARNINGS
+
+#include <afxwin.h>         // MFC core and standard components
+#include <afxext.h>         // MFC extensions
+
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxdtctl.h>           // MFC support for Internet Explorer 4 Common Controls
+#endif
 #ifndef _AFX_NO_AFXCMN_SUPPORT
-#include <afxcmn.h> // MFC support for Windows Common Controls
-#endif // _AFX_NO_AFXCMN_SUPPORT
-//#include <afxtempl.h>
+#include <afxcmn.h>             // MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+#include <afxcontrolbars.h>     // MFC support for ribbons and control bars
+
+
+
+
+
+
+
+
+
+#ifdef _UNICODE
+#if defined _M_IX86
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#elif defined _M_X64
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#else
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#endif
+#endif
+
+



On Mon, Jan 13, 2014 at 3:10 PM, lefferts, john <[hidden email]> wrote:
I appreciate you valuable efforts.
I think the developers would be better able to evaluate the technical merit of your changes if you take the extra time to construct a patch.
Even a simple diff stream would be useful for a review.
 
I have co-workers who complain about “crashes” when shutting-down a performance run—I wonder if you have addressed their issues.
 
The SLN file under src/msvc9 says it was created with VS2008 (version 10) and I am using that.
It has the same constructor.
 
The developers have a comment that seems to indicate open-exclusive issues on reopen without prompt destruction of heap objects:
 
      // This is key to getting the templates working properly and secondary opens to work at all?!
      m_bVistaStyle = FALSE;
 
I am interested in seeing your changes.
 
 
From: Robert Randall [mailto:[hidden email]]
Sent: Monday, January 13, 2014 3:44 PM
To: [hidden email]
Subject: Re: [Iometer-devel] a couple fixes, are the maintainers interested?
 
I also fixed a problem when running in batch mode.  The destruction sequence of Windows causes an exception.  The cheap fix is implementing a function in CGalileoApp.
 
Regards,
Robert
 
On Mon, Jan 13, 2014 at 2:17 PM, Robert Randall <[hidden email]> wrote:
 
Hello,
 
I've spent some time fixing a few simple problems with the latest version of MFC using the current trunk.  The CFileDialog constructors were being called incorrectly causing reference counting problems with COM.   The COM classes should not have been initialized in the first place.  Because the code was messing with m_bVistaStyle directly (not a good idea) it was causing the COM classes to be created but not destroyed which results in exceptions when running in the debugger and leaks resource when running a release build.
 
I made these changes using VS 2012 and I don't have the tools to know if the CFileDialog constructor is compatible with previous releases of MFC.  I'm not sure how old a tool set is supported by the project when compiling on Windows.  Which versions of the compiler and MFC are supported?
 
The constructor in the version of MFC I'm using is:
 
CFileDialog(
   BOOL bOpenFileDialog,
   LPCTSTR lpszDefExt = NULL,
   LPCTSTR lpszFileName = NULL,
   DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
   LPCTSTR lpszFilter = NULL,
   CWnd* pParentWnd = NULL,
   DWORD dwSize = 0,
   BOOL bVistaStyle = TRUE
);
 
I found one other minor problem.  When using a file on disk for testing the minimum Maximum Disk Size in sectors MUST be 128 or larger because of the code that IOTargetDisk::Prepare assumes that at least 64Kb will be written to the file.  A smaller value results in a divide by zero exception.  I'm not sure if Prepare should be fixed to handle smaller files or a minimum size should be enforced by the GUI.  Happy to make the fix either way.
 
 
Let me know if you would like a patch for these changes.
 
Best regards,
Robert
 
--
Robert Randall | [hidden email]


 
--
Robert Randall | [hidden email]



--
Robert Randall | [hidden email]



--
Robert Randall | [hidden email]

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel





--
Robert Randall | [hidden email]



------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: a couple fixes, are the maintainers interested?

Robert Randall
FIO is all over the place.  The last time I reviewed their code they were using the cygwin DLL as a shim for IO traffic (really bad idea).  The latest versions use native calls.  I've not executed any 'bake off' number in several months so I would have to collect some data and post it.

Customers have informed me about the xperf vs. IOMeter discrepancies.  I have not had time to collect independent data and confirm.  However, given all of the changes introduced in Windows performance telemetry I don't find this surprising.

BR,
Robert

On Tue, Jan 14, 2014 at 2:22 PM, Vedran Degoricija <[hidden email]> wrote:
Hi Randall,

No arguments from me. Is there data that shows discrepancies between IOmeter and xperf today? And how do the FIO numbers compare?

Cleanup of the MFC usage is welcome. I will safely speak for myself when I say I am no expert.

The GUI re-write is a topic that has been discussed in the past. This opens up a big can of worms, but I am interested in going there. I'd let other folks comment.

Thanks,
Ved


On Tuesday, January 14, 2014 10:42 AM, Robert Randall <[hidden email]> wrote:
I did confirm that the multiple manager problem still exists.  When IOMeter opens a configuration file with multiple managers it spawns the first manager on the local host but does not spawn any additional managers and times out waiting for the additional managers to become available; i.e. connect to the IOMeter TCP port.

Regards,
Robert


On Tue, Jan 14, 2014 at 10:10 AM, Vedran Degoricija <[hidden email]> wrote:
Thanks Robert. Let me review these.
 
As far as only a single manager opening, I might have a fix. I'll need to recall what it is I actually fixed in this area-- it was about a year ago.
 
Your offer for help is welcome. We've certainly been stagnant lately. Is there something in particular  that you are interested in?
 
Thanks,
Ved
 
 


On Tuesday, January 14, 2014 5:06 AM, Robert Randall <[hidden email]> wrote:
I apologize for not copying the list on this message.  Please review the patch below and let me know if you need another maintainer <grin>.  I've been developing Windows apps since before there was a Windows kernel <my age is showing>.

Best regards,
Robert

---------- Forwarded message ----------
From: Robert Randall <[hidden email]>
Date: Mon, Jan 13, 2014 at 7:04 PM
Subject: Re: [Iometer-devel] a couple fixes, are the maintainers interested?
To: "lefferts, john" <[hidden email]>


Patch is below.  There are still a few issues I should clean up with regard to cleanly including the MFC headers.  I need to investigate one more internal bug report; loading .icf file with multiple managers results in the first manager being created other are not created.


Index: src/GalileoApp.cpp
===================================================================
--- src/GalileoApp.cpp (revision 141)
+++ src/GalileoApp.cpp (working copy)
@@ -122,6 +122,14 @@
  delete login_port;
 }
 
+void CGalileoApp::CloseAllDocuments(BOOL bEndSession) 
+{
+ if (bEndSession)
+   {
+      m_wndStatusBar.DestroyWindow();
+      m_wndToolBar.DestroyWindow();
+   }
+}
 /////////////////////////////////////////////////////////////////////////////
 // The one and only CGalileoApp object
 
@@ -311,6 +319,8 @@
 ///////////////////////////////////////////////////////////////////////////////
 int CGalileoApp::ExitInstance()
 {
+   manager_list.RemoveAllManagers();
+
  delete[]m_pVersionString;
  delete[]m_pVersionStringWithDebug;
 
Index: src/GalileoApp.h
===================================================================
--- src/GalileoApp.h (revision 141)
+++ src/GalileoApp.h (working copy)
@@ -130,6 +130,7 @@
  virtual int ExitInstance();
  virtual BOOL OnIdle(LONG lCount);
  virtual CDocument *OpenDocumentFile(LPCTSTR lpszFileName);
+ virtual void CloseAllDocuments(BOOL bEndSession); 
  //}}AFX_VIRTUAL
 
 // Implementation
Index: src/GalileoView.cpp
===================================================================
--- src/GalileoView.cpp (revision 141)
+++ src/GalileoView.cpp (working copy)
@@ -1180,6 +1180,7 @@
 void CGalileoView::OnFileOpen()
 {
  BOOL flags[NumICFFlags];
+ CICFOpenDialog file_open_box; // open config file dialog box
 
  // Show the custom file open dialog.
  if (file_open_box.DoModal() == IDCANCEL)
@@ -1202,6 +1203,7 @@
 void CGalileoView::OnFileSave()
 {
  BOOL flags[NumICFFlags];
+ CICFSaveDialog file_save_box; // save config file dialog box
 
  // Show the custom file save dialog.
  if (file_save_box.DoModal() == IDCANCEL)
Index: src/GalileoView.h
===================================================================
--- src/GalileoView.h (revision 141)
+++ src/GalileoView.h (working copy)
@@ -182,8 +182,6 @@
  CPropertySheet *m_pPropSheet;
 
       protected:
- CICFOpenDialog file_open_box; // open config file dialog box
- CICFSaveDialog file_save_box; // save config file dialog box
 
  // tracks whether parent frame has already been sized.
  BOOL m_bSizedBefore;
Index: src/ICFOpenDialog.cpp
===================================================================
--- src/ICFOpenDialog.cpp (revision 141)
+++ src/ICFOpenDialog.cpp (working copy)
@@ -87,9 +87,10 @@
 
 /////////////////////////////////////////////////////////////////////////////
 // CICFOpenDialog dialog
-    CICFOpenDialog::CICFOpenDialog()
-:  CFileDialog(TRUE, "icf", "", NULL,
-    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||")
+   CICFOpenDialog::CICFOpenDialog()
+:  CFileDialog(TRUE, "icf", NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, 
+            "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||", 
+               NULL, 0UL, FALSE)
 {
  CString title;
  char *buf;
@@ -104,9 +105,6 @@
 
  m_ofn.lpTemplateName = MAKEINTRESOURCE(IDD_FILEOPEN_OPTS);
 
- // This is key to getting the templates working properly and secondary opens to work at all?!
- m_bVistaStyle = FALSE;
-
  //{{AFX_DATA_INIT(CICFOpenDialog)
  isCkTestSetup = TRUE;
  isCkResultsDisplay = TRUE;
Index: src/ICFSaveDialog.cpp
===================================================================
--- src/ICFSaveDialog.cpp (revision 141)
+++ src/ICFSaveDialog.cpp (working copy)
@@ -88,8 +88,9 @@
 /////////////////////////////////////////////////////////////////////////////
 // CICFSaveDialog dialog
     CICFSaveDialog::CICFSaveDialog()
-:  CFileDialog(FALSE, "icf", "iometer", NULL,
-    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||")
+:  CFileDialog(FALSE, "icf", "iometer",  OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
+    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||",
+        NULL, 0UL, FALSE)
 {
  CString title;
  char *buf;
@@ -104,9 +105,6 @@
 
  m_ofn.lpTemplateName = MAKEINTRESOURCE(IDD_FILESAVE_OPTS);
 
- // This is key to getting the templates working properly and secondary opens to work at all?!
- m_bVistaStyle = FALSE;
-
  //{{AFX_DATA_INIT(CICFSaveDialog)
  isCkTestSetup = TRUE;
  isCkResultsDisplay = TRUE;
Index: src/IOCommon.h
===================================================================
--- src/IOCommon.h (revision 141)
+++ src/IOCommon.h (working copy)
@@ -204,17 +204,21 @@
 #if defined(IOMTR_OSFAMILY_WINDOWS)   // Only first, because it is needed here!
  //#define VC_EXTRALEAN
  //#pragma warning (disable: 4242)
+#include "StdAfx.h"
+//#define WIN32_LEAN_AND_MEAN 1
+//#include <Windows.h>
+//#include <windef.h>  
  #include <process.h>
  #include <io.h>
  #include <direct.h>
- #include <afxwin.h>
- #include <afxext.h>
- #include <afxcmn.h>
- #include <winioctl.h>
+// #include <afxwin.h>
+// #include <afxext.h>
+// #include <afxcmn.h>
  #include <iomanip>
  #include <winperf.h>
  #include <winreg.h>
- #include <afxmt.h>
+ #include <winioctl.h>
+// #include <afxmt.h>
  #include <malloc.h>
 #endif
 // ----------------------------------------------------------------------------
@@ -868,7 +872,7 @@
  struct IOCQ {
  CQ_Element      *element_list;
  struct aiocb64 **aiocb_list;
-#ifdef IOMTR_SETTING_LINUX_LIBAIO
+#ifdef IOMTR_SETTING_LINUX_LIBAIO
  struct iocb **iocb_list;
         io_context_t io_ctx_id;
         struct io_event *events;
Index: src/IOPort.cpp
===================================================================
--- src/IOPort.cpp (revision 141)
+++ src/IOPort.cpp (working copy)
@@ -81,6 +81,7 @@
 /* ######################################################################### */
 
 #if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+#include "StdAfx.h"
 #include "GalileoApp.h"
 #endif
 #include "IOPort.h"
Index: src/IOPortTCP.cpp
===================================================================
--- src/IOPortTCP.cpp (revision 141)
+++ src/IOPortTCP.cpp (working copy)
@@ -89,7 +89,7 @@
 /* ######################################################################### */
 
 #if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
-#include <afx.h>
+#include "StdAfx.h"
 #endif
 
 #include "IOPortTCP.h"
Index: src/IOTarget.cpp
===================================================================
--- src/IOTarget.cpp (revision 141)
+++ src/IOTarget.cpp (working copy)
@@ -109,6 +109,9 @@
 #if defined(IOMTR_OSFAMILY_UNIX) && defined(WORKAROUND_MOD_BUG)
  return ((DWORDLONG)fmodl(spec.random = A * spec.random + B, limit));
 #else
+#ifdef _DEBUG
+ assert(limit > 0);
+#endif
  return (spec.random = A * spec.random + B) % limit;
 #endif
 }
Index: src/IOTargetDisk.cpp
===================================================================
--- src/IOTargetDisk.cpp (revision 141)
+++ src/IOTargetDisk.cpp (working copy)
@@ -1329,10 +1329,14 @@
  // Loop through the I/O queue looking for idle slots.
  for (i = 0; i < PREPARE_QDEPTH; i++) {
  // Check to see if we've reached the end of the disk
- if (spec.disk_info.maximum_size &&
+ // Windows debuggers lie when decoding spec.disk_info pushing
+ // values into local vars
+            int dd_sector_size = spec.disk_info.sector_size;
+            ULONGLONG dd_maximum_size = spec.disk_info.maximum_size;
+            ULONGLONG dd_starting_sector = spec.disk_info.starting_sector;
+ if (dd_maximum_size &&
     ((*prepare_offset + bytes) >
-     ((spec.disk_info.starting_sector +
-       (DWORDLONG) spec.disk_info.maximum_size) * spec.disk_info.sector_size))) {
+     ((dd_starting_sector + dd_maximum_size) * dd_sector_size))) {
  // A maximum disk size was specified by the user, and the next write 
  // would go past the specified maximum size.  
 #ifdef _DEBUG
Index: src/IOTime.cpp
===================================================================
--- src/IOTime.cpp (revision 141)
+++ src/IOTime.cpp (working copy)
@@ -92,6 +92,9 @@
 /* ##                                                                     ## */
 /* ######################################################################### */
 
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+#include "StdAfx.h"
+#endif
 #include "IOCommon.h"
 
 #if defined(IOMTR_OS_LINUX)
Index: src/StdAfx.h
===================================================================
--- src/StdAfx.h (revision 141)
+++ src/StdAfx.h (working copy)
@@ -58,11 +58,61 @@
 /* ##                                                                     ## */
 /* ######################################################################### */
 
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
+//#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
 
-#include <afxwin.h> // MFC core and standard components
+//#include <afxwin.h> // MFC core and standard components
 //#include <afxext.h>         // MFC extensions
+//#ifndef _AFX_NO_AFXCMN_SUPPORT
+//#include <afxcmn.h> // MFC support for Windows Common Controls
+//#endif // _AFX_NO_AFXCMN_SUPPORT
+//#include <afxtempl.h>
+
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently,
+// but are changed infrequently
+
+#pragma once
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN            // Exclude rarely-used stuff from Windows headers
+#endif
+
+#include "targetver.h"
+
+//#define _AFX_NO_OLE_SUPPORT 1
+#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS      // some CString constructors will be explicit
+
+// turns off MFC's hiding of some common and often safely ignored warning messages
+#define _AFX_ALL_WARNINGS
+
+#include <afxwin.h>         // MFC core and standard components
+#include <afxext.h>         // MFC extensions
+
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxdtctl.h>           // MFC support for Internet Explorer 4 Common Controls
+#endif
 #ifndef _AFX_NO_AFXCMN_SUPPORT
-#include <afxcmn.h> // MFC support for Windows Common Controls
-#endif // _AFX_NO_AFXCMN_SUPPORT
-//#include <afxtempl.h>
+#include <afxcmn.h>             // MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+#include <afxcontrolbars.h>     // MFC support for ribbons and control bars
+
+
+
+
+
+
+
+
+
+#ifdef _UNICODE
+#if defined _M_IX86
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#elif defined _M_X64
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#else
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#endif
+#endif
+
+



On Mon, Jan 13, 2014 at 3:10 PM, lefferts, john <[hidden email]> wrote:
I appreciate you valuable efforts.
I think the developers would be better able to evaluate the technical merit of your changes if you take the extra time to construct a patch.
Even a simple diff stream would be useful for a review.
 
I have co-workers who complain about “crashes” when shutting-down a performance run—I wonder if you have addressed their issues.
 
The SLN file under src/msvc9 says it was created with VS2008 (version 10) and I am using that.
It has the same constructor.
 
The developers have a comment that seems to indicate open-exclusive issues on reopen without prompt destruction of heap objects:
 
      // This is key to getting the templates working properly and secondary opens to work at all?!
      m_bVistaStyle = FALSE;
 
I am interested in seeing your changes.
 
 
From: Robert Randall [mailto:[hidden email]]
Sent: Monday, January 13, 2014 3:44 PM
To: [hidden email]
Subject: Re: [Iometer-devel] a couple fixes, are the maintainers interested?
 
I also fixed a problem when running in batch mode.  The destruction sequence of Windows causes an exception.  The cheap fix is implementing a function in CGalileoApp.
 
Regards,
Robert
 
On Mon, Jan 13, 2014 at 2:17 PM, Robert Randall <[hidden email]> wrote:
 
Hello,
 
I've spent some time fixing a few simple problems with the latest version of MFC using the current trunk.  The CFileDialog constructors were being called incorrectly causing reference counting problems with COM.   The COM classes should not have been initialized in the first place.  Because the code was messing with m_bVistaStyle directly (not a good idea) it was causing the COM classes to be created but not destroyed which results in exceptions when running in the debugger and leaks resource when running a release build.
 
I made these changes using VS 2012 and I don't have the tools to know if the CFileDialog constructor is compatible with previous releases of MFC.  I'm not sure how old a tool set is supported by the project when compiling on Windows.  Which versions of the compiler and MFC are supported?
 
The constructor in the version of MFC I'm using is:
 
CFileDialog(
   BOOL bOpenFileDialog,
   LPCTSTR lpszDefExt = NULL,
   LPCTSTR lpszFileName = NULL,
   DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
   LPCTSTR lpszFilter = NULL,
   CWnd* pParentWnd = NULL,
   DWORD dwSize = 0,
   BOOL bVistaStyle = TRUE
);
 
I found one other minor problem.  When using a file on disk for testing the minimum Maximum Disk Size in sectors MUST be 128 or larger because of the code that IOTargetDisk::Prepare assumes that at least 64Kb will be written to the file.  A smaller value results in a divide by zero exception.  I'm not sure if Prepare should be fixed to handle smaller files or a minimum size should be enforced by the GUI.  Happy to make the fix either way.
 
 
Let me know if you would like a patch for these changes.
 
Best regards,
Robert
 
--
Robert Randall | [hidden email]


 
--
Robert Randall | [hidden email]



--
Robert Randall | [hidden email]



--
Robert Randall | [hidden email]

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel





--
Robert Randall | [hidden email]





--
Robert Randall | [hidden email]

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: a couple fixes, are the maintainers interested?

Carl Zwanzig-2
In reply to this post by Robert Randall

Hi,

 

Maybe  8 months ago I tried linux fio vs windows fio and the numbers tracked quite closely (same version of fio, on a dual-boot system). At this point, we really only use iometer if it’s demanded, otherwise we’re using fio, iozone, or filebench. iometer was a good tool, but has suffered from very deferred maintenance. The lack of automate-ability doesn’t help, either.

 

z!

 

From: Robert Randall [mailto:[hidden email]]
Sent: Tuesday, January 14, 2014 12:57 PM
To: Vedran Degoricija
Cc: [hidden email]
Subject: Re: [Iometer-devel] Fwd: a couple fixes, are the maintainers interested?

 

FIO is all over the place.  The last time I reviewed their code they were using the cygwin DLL as a shim for IO traffic (really bad idea).  The latest versions use native calls.  I've not executed any 'bake off' number in several months so I would have to collect some data and post it.

 

Customers have informed me about the xperf vs. IOMeter discrepancies.  I have not had time to collect independent data and confirm.  However, given all of the changes introduced in Windows performance telemetry I don't find this surprising.


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: a couple fixes, are the maintainers interested?

Robert Randall
So IOMeter is old and dead?  We automate our IOMeter runs exclusively so I'm not sure what mean by lack of automate-ability.  IOMeter can be executed from a command line without user intervention.  In that case it feels a bit unnecessary to display a GUI at all.  It might be nice if it had a 'silent' mode to avoid the painting overhead.

BR,
Robert


On Tue, Jan 14, 2014 at 3:28 PM, Carl Zwanzig <[hidden email]> wrote:

Hi,

 

Maybe  8 months ago I tried linux fio vs windows fio and the numbers tracked quite closely (same version of fio, on a dual-boot system). At this point, we really only use iometer if it’s demanded, otherwise we’re using fio, iozone, or filebench. iometer was a good tool, but has suffered from very deferred maintenance. The lack of automate-ability doesn’t help, either.

 

z!

 

From: Robert Randall [mailto:[hidden email]]
Sent: Tuesday, January 14, 2014 12:57 PM
To: Vedran Degoricija
Cc: [hidden email]
Subject: Re: [Iometer-devel] Fwd: a couple fixes, are the maintainers interested?

 

FIO is all over the place.  The last time I reviewed their code they were using the cygwin DLL as a shim for IO traffic (really bad idea).  The latest versions use native calls.  I've not executed any 'bake off' number in several months so I would have to collect some data and post it.

 

Customers have informed me about the xperf vs. IOMeter discrepancies.  I have not had time to collect independent data and confirm.  However, given all of the changes introduced in Windows performance telemetry I don't find this surprising.




--
Robert Randall | [hidden email]

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: a couple fixes, are the maintainers interested?

Joe Eiler
As someone who hasn't been actively involved with iometer (or storage  
benchmarking/testing) for a while I know that there are several  
comments that I have heard over and over again.

1) Cross platform GUI - Daniel started looking at a java version  
several years ago but never followed up.  I have had luck running  
under wine in the past and was never interested in Mac.

2) performance degradation - The numbers that iometer was reporting  
dropped off a little compared to previous versions. I was never able  
to get hard numbers or revision numbers from anyone but this really  
points out a need for automated regressions on known hardware with  
multiple iometer versions.  I had these running in my lab for a while  
back in 2000/2001, but my last intel contact moved on and I drifted  
away and gave up my hardware empire ;-)

3) Tradeshow folks love the speedometer look, it is really one of the  
defining features and if we did another GUI it should be replicated.

Thanks to all of those who have continued development and it is nice  
to hear there are still people interested in helping out.

Joe


Quoting Robert Randall <[hidden email]>:

> So IOMeter is old and dead?  We automate our IOMeter runs exclusively so
> I'm not sure what mean by lack of automate-ability.  IOMeter can be
> executed from a command line without user intervention.  In that case it
> feels a bit unnecessary to display a GUI at all.  It might be nice if it
> had a 'silent' mode to avoid the painting overhead.
>
> BR,
> Robert
>
>
> On Tue, Jan 14, 2014 at 3:28 PM, Carl Zwanzig <[hidden email]> wrote:
>
>>  Hi,
>>
>>
>>
>> Maybe  8 months ago I tried linux fio vs windows fio and the numbers
>> tracked quite closely (same version of fio, on a dual-boot system). At this
>> point, we really only use iometer if it?s demanded, otherwise we?re using
>> fio, iozone, or filebench. iometer was a good tool, but has suffered from
>> very deferred maintenance. The lack of automate-ability doesn?t help,
>> either.
>>
>>
>>
>> z!
>>
>>
>>
>> *From:* Robert Randall [mailto:[hidden email]]
>> *Sent:* Tuesday, January 14, 2014 12:57 PM
>> *To:* Vedran Degoricija
>> *Cc:* [hidden email]
>> *Subject:* Re: [Iometer-devel] Fwd: a couple fixes, are the maintainers
>> interested?
>>
>>
>>
>> FIO is all over the place.  The last time I reviewed their code they were
>> using the cygwin DLL as a shim for IO traffic (really bad idea).  The
>> latest versions use native calls.  I've not executed any 'bake off' number
>> in several months so I would have to collect some data and post it.
>>
>>
>>
>> Customers have informed me about the xperf vs. IOMeter discrepancies.  I
>> have not had time to collect independent data and confirm.  However, given
>> all of the changes introduced in Windows performance telemetry I don't find
>> this surprising.
>>
>> | [hidden email]
>>
>
>
>
> --
> Robert Randall | [hidden email]
>




------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: a couple fixes, are the maintainers interested?

Vedran Degoricija
On performance degradation. I believe this was introduced with the data pattern generation feature. The current default setting (repeating bytes) does increase overheads, so selecting the pseudo random option gets you back to the original implementation. I don't recall what was the rationale behind not making the default match prior versions, but I am sure there was a good reason. :) And at the time, we did perform regression tests. So, if you still see issues with the pseudo random option, I'd like to know.
 
Thanks,
Ved


On Tuesday, January 14, 2014 5:42 PM, "[hidden email]" <[hidden email]> wrote:
As someone who hasn't been actively involved with iometer (or storage 
benchmarking/testing) for a while I know that there are several 
comments that I have heard over and over again.

1) Cross platform GUI - Daniel started looking at a java version 
several years ago but never followed up.  I have had luck running 
under wine in the past and was never interested in Mac.

2) performance degradation - The numbers that iometer was reporting 
dropped off a little compared to previous versions. I was never able 
to get hard numbers or revision numbers from anyone but this really 
points out a need for automated regressions on known hardware with 
multiple iometer versions.  I had these running in my lab for a while 
back in 2000/2001, but my last intel contact moved on and I drifted 
away and gave up my hardware empire ;-)

3) Tradeshow folks love the speedometer look, it is really one of the 
defining features and if we did another GUI it should be replicated.

Thanks to all of those who have continued development and it is nice 
to hear there are still people interested in helping out.

Joe


Quoting Robert Randall <[hidden email]>:

> So IOMeter is old and dead?  We automate our IOMeter runs exclusively so
> I'm not sure what mean by lack of automate-ability.  IOMeter can be
> executed from a command line without user intervention.  In that case it
> feels a bit unnecessary to display a GUI at all.  It might be nice if it
> had a 'silent' mode to avoid the painting overhead.
>
> BR,
> Robert
>
>
> On Tue, Jan 14, 2014 at 3:28 PM, Carl Zwanzig <[hidden email]> wrote:
>
>>  Hi,
>>
>>
>>
>> Maybe  8 months ago I tried linux fio vs windows fio and the numbers
>> tracked quite closely (same version of fio, on a dual-boot system). At this
>> point, we really only use iometer if it?s demanded, otherwise we?re using
>> fio, iozone, or filebench. iometer was a good tool, but has suffered from
>> very deferred maintenance. The lack of automate-ability doesn?t help,
>> either.
>>
>>
>>
>> z!
>>
>>
>>
>> *From:* Robert Randall [mailto:[hidden email]]
>> *Sent:* Tuesday, January 14, 2014 12:57 PM
>> *To:* Vedran Degoricija
>> *Cc:* [hidden email]
>> *Subject:* Re: [Iometer-devel] Fwd: a couple fixes, are the maintainers
>> interested?
>>
>>
>>
>> FIO is all over the place.  The last time I reviewed their code they were
>> using the cygwin DLL as a shim for IO traffic (really bad idea).  The
>> latest versions use native calls.  I've not executed any 'bake off' number
>> in several months so I would have to collect some data and post it.
>>
>>
>>
>> Customers have informed me about the xperf vs. IOMeter discrepancies.  I
>> have not had time to collect independent data and confirm.  However, given
>> all of the changes introduced in Windows performance telemetry I don't find
>> this surprising.
>>
>> | [hidden email]
>>
>
>
>
> --
> Robert Randall | [hidden email]

>




------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel




------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: a couple fixes, are the maintainers interested?

Allen, Wayne

As Ved indicated we do have a defined test plan that we run against releases, so I too would be interested to know if there’s a scenario where a change in performance reporting has been observed between releases using the same workload.

 

Best Regards,

 

Wayne

 

From: Vedran Degoricija [mailto:[hidden email]]
Sent: Tuesday, January 14, 2014 10:24 PM
To: [hidden email]; [hidden email]
Subject: Re: [Iometer-devel] Fwd: a couple fixes, are the maintainers interested?

 

On performance degradation. I believe this was introduced with the data pattern generation feature. The current default setting (repeating bytes) does increase overheads, so selecting the pseudo random option gets you back to the original implementation. I don't recall what was the rationale behind not making the default match prior versions, but I am sure there was a good reason. :) And at the time, we did perform regression tests. So, if you still see issues with the pseudo random option, I'd like to know.

 

Thanks,

Ved

 

On Tuesday, January 14, 2014 5:42 PM, "[hidden email]" <[hidden email]> wrote:

As someone who hasn't been actively involved with iometer (or storage 
benchmarking/testing) for a while I know that there are several 
comments that I have heard over and over again.

1) Cross platform GUI - Daniel started looking at a java version 
several years ago but never followed up.  I have had luck running 
under wine in the past and was never interested in Mac.

2) performance degradation - The numbers that iometer was reporting 
dropped off a little compared to previous versions. I was never able 
to get hard numbers or revision numbers from anyone but this really 
points out a need for automated regressions on known hardware with 
multiple iometer versions.  I had these running in my lab for a while 
back in 2000/2001, but my last intel contact moved on and I drifted 
away and gave up my hardware empire ;-)

3) Tradeshow folks love the speedometer look, it is really one of the 
defining features and if we did another GUI it should be replicated.

Thanks to all of those who have continued development and it is nice 
to hear there are still people interested in helping out.

Joe


Quoting Robert Randall <[hidden email]>:

> So IOMeter is old and dead?  We automate our IOMeter runs exclusively so
> I'm not sure what mean by lack of automate-ability.  IOMeter can be
> executed from a command line without user intervention.  In that case it
> feels a bit unnecessary to display a GUI at all.  It might be nice if it
> had a 'silent' mode to avoid the painting overhead.
>
> BR,
> Robert
>
>
> On Tue, Jan 14, 2014 at 3:28 PM, Carl Zwanzig <[hidden email]> wrote:
>
>>  Hi,
>>
>>
>>
>> Maybe  8 months ago I tried linux fio vs windows fio and the numbers
>> tracked quite closely (same version of fio, on a dual-boot system). At this
>> point, we really only use iometer if it?s demanded, otherwise we?re using
>> fio, iozone, or filebench. iometer was a good tool, but has suffered from
>> very deferred maintenance. The lack of automate-ability doesn?t help,
>> either.
>>
>>
>>
>> z!
>>
>>
>>
>> *From:* Robert Randall [mailto:[hidden email]]
>> *Sent:* Tuesday, January 14, 2014 12:57 PM
>> *To:* Vedran Degoricija
>> *Cc:* [hidden email]
>> *Subject:* Re: [Iometer-devel] Fwd: a couple fixes, are the maintainers
>> interested?
>>
>>
>>
>> FIO is all over the place.  The last time I reviewed their code they were
>> using the cygwin DLL as a shim for IO traffic (really bad idea).  The
>> latest versions use native calls.  I've not executed any 'bake off' number
>> in several months so I would have to collect some data and post it.
>>
>>
>>
>> Customers have informed me about the xperf vs. IOMeter discrepancies.  I
>> have not had time to collect independent data and confirm.  However, given
>> all of the changes introduced in Windows performance telemetry I don't find
>> this surprising.
>>
>> | [hidden email]
>>
>
>
>
> --
> Robert Randall | [hidden email]


>




------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel

 

 


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: a couple fixes, are the maintainers interested?

Robert Randall
In reply to this post by Robert Randall
Hi Ved,

Did you get a chance to merge my changes into the SVN trunk?  Did you want me to fix the multiple workers problem?

Best,
Robert


On Fri, Jan 17, 2014 at 7:24 AM, Robert Randall <[hidden email]> wrote:
Hi Ved,

Please let me know when you've committed the changes to the trunk of the repository so I may update my local copy.  

The problem is simple to reproduce.  Start IOMeter and create a configuration with two managers and save the configuration file.  Restart IOMeter and load the configuration file.  One manager will start automatically and IOmeter will wait for the second manager but it is never started.  If you would like me to fix this just let me know.

If you would like me to join the maintainers of IOMeter I am happy to do so.  I'm an very interested in improving the marketplace perception of IOMeter.  It feels like updating the GUI and authoring documentation on how IOMeter performs the its IO under each OS implementation of Dynamo to better inform users of the capabilities and sophistication of the application might be quite helpful to improving the perception of IOMeter.

We need an evangelist for IOMeter.  It is good stuff but it has suffered from a lack of attention and that is sad.  I've used it for longer than I care to admit for both network and storage performance testing.

Best regards,
Robert.


On Thu, Jan 16, 2014 at 7:45 PM, Vedran Degoricija <[hidden email]> wrote:
Hi Robert,
 
Thank you. For the most part, it seems that the bVistaStyle piece addresses the assert on exit under the debugger. Thanks for the catch!  I also included most of your changes having to do stdafx cleanup.  Vistual Studio analyzer also caught a couple of interesting deletes that were missing the [] notation. I don't know if these would have been evident at runtime.
 
Lastly, you mentioned and issue with loading multiple workers. Can you clarify that one please? I vaguely recall something about that, but it would help me to have all of the info.
 
Thanks,
Ved


On Wednesday, January 15, 2014 6:13 AM, Robert Randall <[hidden email]> wrote:
Hi Ved,

Zip file of my source tree is attached.  Please feel free to ask questions.

BR,
Robert


On Wed, Jan 15, 2014 at 1:31 AM, Vedran Degoricija <[hidden email]> wrote:
Hi Robert,
 
(Apologies for calling you Randall earlier.)
 
I am having trouble merging the patch.  Patch.exe is only doing a partial job, so I am not sure what's wrong. It's as if the unified flag is not sticking.
 
Could send me the complete affected files by any chance in a zip archive?
 
Thanks,
Ved


On Tuesday, January 14, 2014 5:06 AM, Robert Randall <[hidden email]> wrote:
I apologize for not copying the list on this message.  Please review the patch below and let me know if you need another maintainer <grin>.  I've been developing Windows apps since before there was a Windows kernel <my age is showing>.

Best regards,
Robert

---------- Forwarded message ----------
From: Robert Randall <[hidden email]>
Date: Mon, Jan 13, 2014 at 7:04 PM
Subject: Re: [Iometer-devel] a couple fixes, are the maintainers interested?
To: "lefferts, john" <[hidden email]>


Patch is below.  There are still a few issues I should clean up with regard to cleanly including the MFC headers.  I need to investigate one more internal bug report; loading .icf file with multiple managers results in the first manager being created other are not created.


Index: src/GalileoApp.cpp
===================================================================
--- src/GalileoApp.cpp (revision 141)
+++ src/GalileoApp.cpp (working copy)
@@ -122,6 +122,14 @@
  delete login_port;
 }
 
+void CGalileoApp::CloseAllDocuments(BOOL bEndSession) 
+{
+ if (bEndSession)
+   {
+      m_wndStatusBar.DestroyWindow();
+      m_wndToolBar.DestroyWindow();
+   }
+}
 /////////////////////////////////////////////////////////////////////////////
 // The one and only CGalileoApp object
 
@@ -311,6 +319,8 @@
 ///////////////////////////////////////////////////////////////////////////////
 int CGalileoApp::ExitInstance()
 {
+   manager_list.RemoveAllManagers();
+
  delete[]m_pVersionString;
  delete[]m_pVersionStringWithDebug;
 
Index: src/GalileoApp.h
===================================================================
--- src/GalileoApp.h (revision 141)
+++ src/GalileoApp.h (working copy)
@@ -130,6 +130,7 @@
  virtual int ExitInstance();
  virtual BOOL OnIdle(LONG lCount);
  virtual CDocument *OpenDocumentFile(LPCTSTR lpszFileName);
+ virtual void CloseAllDocuments(BOOL bEndSession); 
  //}}AFX_VIRTUAL
 
 // Implementation
Index: src/GalileoView.cpp
===================================================================
--- src/GalileoView.cpp (revision 141)
+++ src/GalileoView.cpp (working copy)
@@ -1180,6 +1180,7 @@
 void CGalileoView::OnFileOpen()
 {
  BOOL flags[NumICFFlags];
+ CICFOpenDialog file_open_box; // open config file dialog box
 
  // Show the custom file open dialog.
  if (file_open_box.DoModal() == IDCANCEL)
@@ -1202,6 +1203,7 @@
 void CGalileoView::OnFileSave()
 {
  BOOL flags[NumICFFlags];
+ CICFSaveDialog file_save_box; // save config file dialog box
 
  // Show the custom file save dialog.
  if (file_save_box.DoModal() == IDCANCEL)
Index: src/GalileoView.h
===================================================================
--- src/GalileoView.h (revision 141)
+++ src/GalileoView.h (working copy)
@@ -182,8 +182,6 @@
  CPropertySheet *m_pPropSheet;
 
       protected:
- CICFOpenDialog file_open_box; // open config file dialog box
- CICFSaveDialog file_save_box; // save config file dialog box
 
  // tracks whether parent frame has already been sized.
  BOOL m_bSizedBefore;
Index: src/ICFOpenDialog.cpp
===================================================================
--- src/ICFOpenDialog.cpp (revision 141)
+++ src/ICFOpenDialog.cpp (working copy)
@@ -87,9 +87,10 @@
 
 /////////////////////////////////////////////////////////////////////////////
 // CICFOpenDialog dialog
-    CICFOpenDialog::CICFOpenDialog()
-:  CFileDialog(TRUE, "icf", "", NULL,
-    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||")
+   CICFOpenDialog::CICFOpenDialog()
+:  CFileDialog(TRUE, "icf", NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, 
+            "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||", 
+               NULL, 0UL, FALSE)
 {
  CString title;
  char *buf;
@@ -104,9 +105,6 @@
 
  m_ofn.lpTemplateName = MAKEINTRESOURCE(IDD_FILEOPEN_OPTS);
 
- // This is key to getting the templates working properly and secondary opens to work at all?!
- m_bVistaStyle = FALSE;
-
  //{{AFX_DATA_INIT(CICFOpenDialog)
  isCkTestSetup = TRUE;
  isCkResultsDisplay = TRUE;
Index: src/ICFSaveDialog.cpp
===================================================================
--- src/ICFSaveDialog.cpp (revision 141)
+++ src/ICFSaveDialog.cpp (working copy)
@@ -88,8 +88,9 @@
 /////////////////////////////////////////////////////////////////////////////
 // CICFSaveDialog dialog
     CICFSaveDialog::CICFSaveDialog()
-:  CFileDialog(FALSE, "icf", "iometer", NULL,
-    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||")
+:  CFileDialog(FALSE, "icf", "iometer",  OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
+    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||",
+        NULL, 0UL, FALSE)
 {
  CString title;
  char *buf;
@@ -104,9 +105,6 @@
 
  m_ofn.lpTemplateName = MAKEINTRESOURCE(IDD_FILESAVE_OPTS);
 
- // This is key to getting the templates working properly and secondary opens to work at all?!
- m_bVistaStyle = FALSE;
-
  //{{AFX_DATA_INIT(CICFSaveDialog)
  isCkTestSetup = TRUE;
  isCkResultsDisplay = TRUE;
Index: src/IOCommon.h
===================================================================
--- src/IOCommon.h (revision 141)
+++ src/IOCommon.h (working copy)
@@ -204,17 +204,21 @@
 #if defined(IOMTR_OSFAMILY_WINDOWS)   // Only first, because it is needed here!
  //#define VC_EXTRALEAN
  //#pragma warning (disable: 4242)
+#include "StdAfx.h"
+//#define WIN32_LEAN_AND_MEAN 1
+//#include <Windows.h>
+//#include <windef.h>  
  #include <process.h>
  #include <io.h>
  #include <direct.h>
- #include <afxwin.h>
- #include <afxext.h>
- #include <afxcmn.h>
- #include <winioctl.h>
+// #include <afxwin.h>
+// #include <afxext.h>
+// #include <afxcmn.h>
  #include <iomanip>
  #include <winperf.h>
  #include <winreg.h>
- #include <afxmt.h>
+ #include <winioctl.h>
+// #include <afxmt.h>
  #include <malloc.h>
 #endif
 // ----------------------------------------------------------------------------
@@ -868,7 +872,7 @@
  struct IOCQ {
  CQ_Element      *element_list;
  struct aiocb64 **aiocb_list;
-#ifdef IOMTR_SETTING_LINUX_LIBAIO
+#ifdef IOMTR_SETTING_LINUX_LIBAIO
  struct iocb **iocb_list;
         io_context_t io_ctx_id;
         struct io_event *events;
Index: src/IOPort.cpp
===================================================================
--- src/IOPort.cpp (revision 141)
+++ src/IOPort.cpp (working copy)
@@ -81,6 +81,7 @@
 /* ######################################################################### */
 
 #if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+#include "StdAfx.h"
 #include "GalileoApp.h"
 #endif
 #include "IOPort.h"
Index: src/IOPortTCP.cpp
===================================================================
--- src/IOPortTCP.cpp (revision 141)
+++ src/IOPortTCP.cpp (working copy)
@@ -89,7 +89,7 @@
 /* ######################################################################### */
 
 #if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
-#include <afx.h>
+#include "StdAfx.h"
 #endif
 
 #include "IOPortTCP.h"
Index: src/IOTarget.cpp
===================================================================
--- src/IOTarget.cpp (revision 141)
+++ src/IOTarget.cpp (working copy)
@@ -109,6 +109,9 @@
 #if defined(IOMTR_OSFAMILY_UNIX) && defined(WORKAROUND_MOD_BUG)
  return ((DWORDLONG)fmodl(spec.random = A * spec.random + B, limit));
 #else
+#ifdef _DEBUG
+ assert(limit > 0);
+#endif
  return (spec.random = A * spec.random + B) % limit;
 #endif
 }
Index: src/IOTargetDisk.cpp
===================================================================
--- src/IOTargetDisk.cpp (revision 141)
+++ src/IOTargetDisk.cpp (working copy)
@@ -1329,10 +1329,14 @@
  // Loop through the I/O queue looking for idle slots.
  for (i = 0; i < PREPARE_QDEPTH; i++) {
  // Check to see if we've reached the end of the disk
- if (spec.disk_info.maximum_size &&
+ // Windows debuggers lie when decoding spec.disk_info pushing
+ // values into local vars
+            int dd_sector_size = spec.disk_info.sector_size;
+            ULONGLONG dd_maximum_size = spec.disk_info.maximum_size;
+            ULONGLONG dd_starting_sector = spec.disk_info.starting_sector;
+ if (dd_maximum_size &&
     ((*prepare_offset + bytes) >
-     ((spec.disk_info.starting_sector +
-       (DWORDLONG) spec.disk_info.maximum_size) * spec.disk_info.sector_size))) {
+     ((dd_starting_sector + dd_maximum_size) * dd_sector_size))) {
  // A maximum disk size was specified by the user, and the next write 
  // would go past the specified maximum size.  
 #ifdef _DEBUG
Index: src/IOTime.cpp
===================================================================
--- src/IOTime.cpp (revision 141)
+++ src/IOTime.cpp (working copy)
@@ -92,6 +92,9 @@
 /* ##                                                                     ## */
 /* ######################################################################### */
 
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+#include "StdAfx.h"
+#endif
 #include "IOCommon.h"
 
 #if defined(IOMTR_OS_LINUX)
Index: src/StdAfx.h
===================================================================
--- src/StdAfx.h (revision 141)
+++ src/StdAfx.h (working copy)
@@ -58,11 +58,61 @@
 /* ##                                                                     ## */
 /* ######################################################################### */
 
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
+//#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
 
-#include <afxwin.h> // MFC core and standard components
+//#include <afxwin.h> // MFC core and standard components
 //#include <afxext.h>         // MFC extensions
+//#ifndef _AFX_NO_AFXCMN_SUPPORT
+//#include <afxcmn.h> // MFC support for Windows Common Controls
+//#endif // _AFX_NO_AFXCMN_SUPPORT
+//#include <afxtempl.h>
+
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently,
+// but are changed infrequently
+
+#pragma once
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN            // Exclude rarely-used stuff from Windows headers
+#endif
+
+#include "targetver.h"
+
+//#define _AFX_NO_OLE_SUPPORT 1
+#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS      // some CString constructors will be explicit
+
+// turns off MFC's hiding of some common and often safely ignored warning messages
+#define _AFX_ALL_WARNINGS
+
+#include <afxwin.h>         // MFC core and standard components
+#include <afxext.h>         // MFC extensions
+
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxdtctl.h>           // MFC support for Internet Explorer 4 Common Controls
+#endif
 #ifndef _AFX_NO_AFXCMN_SUPPORT
-#include <afxcmn.h> // MFC support for Windows Common Controls
-#endif // _AFX_NO_AFXCMN_SUPPORT
-//#include <afxtempl.h>
+#include <afxcmn.h>             // MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+#include <afxcontrolbars.h>     // MFC support for ribbons and control bars
+
+
+
+
+
+
+
+
+
+#ifdef _UNICODE
+#if defined _M_IX86
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#elif defined _M_X64
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#else
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#endif
+#endif
+
+



On Mon, Jan 13, 2014 at 3:10 PM, lefferts, john <[hidden email]> wrote:
I appreciate you valuable efforts.
I think the developers would be better able to evaluate the technical merit of your changes if you take the extra time to construct a patch.
Even a simple diff stream would be useful for a review.
 
I have co-workers who complain about “crashes” when shutting-down a performance run—I wonder if you have addressed their issues.
 
The SLN file under src/msvc9 says it was created with VS2008 (version 10) and I am using that.
It has the same constructor.
 
The developers have a comment that seems to indicate open-exclusive issues on reopen without prompt destruction of heap objects:
 
      // This is key to getting the templates working properly and secondary opens to work at all?!
      m_bVistaStyle = FALSE;
 
I am interested in seeing your changes.
 
 
From: Robert Randall [mailto:[hidden email]]
Sent: Monday, January 13, 2014 3:44 PM
To: [hidden email]
Subject: Re: [Iometer-devel] a couple fixes, are the maintainers interested?
 
I also fixed a problem when running in batch mode.  The destruction sequence of Windows causes an exception.  The cheap fix is implementing a function in CGalileoApp.
 
Regards,
Robert
 
On Mon, Jan 13, 2014 at 2:17 PM, Robert Randall <[hidden email]> wrote:
 
Hello,
 
I've spent some time fixing a few simple problems with the latest version of MFC using the current trunk.  The CFileDialog constructors were being called incorrectly causing reference counting problems with COM.   The COM classes should not have been initialized in the first place.  Because the code was messing with m_bVistaStyle directly (not a good idea) it was causing the COM classes to be created but not destroyed which results in exceptions when running in the debugger and leaks resource when running a release build.
 
I made these changes using VS 2012 and I don't have the tools to know if the CFileDialog constructor is compatible with previous releases of MFC.  I'm not sure how old a tool set is supported by the project when compiling on Windows.  Which versions of the compiler and MFC are supported?
 
The constructor in the version of MFC I'm using is:
 
CFileDialog(
   BOOL bOpenFileDialog,
   LPCTSTR lpszDefExt = NULL,
   LPCTSTR lpszFileName = NULL,
   DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
   LPCTSTR lpszFilter = NULL,
   CWnd* pParentWnd = NULL,
   DWORD dwSize = 0,
   BOOL bVistaStyle = TRUE
);
 
I found one other minor problem.  When using a file on disk for testing the minimum Maximum Disk Size in sectors MUST be 128 or larger because of the code that IOTargetDisk::Prepare assumes that at least 64Kb will be written to the file.  A smaller value results in a divide by zero exception.  I'm not sure if Prepare should be fixed to handle smaller files or a minimum size should be enforced by the GUI.  Happy to make the fix either way.
 
 
Let me know if you would like a patch for these changes.
 
Best regards,
Robert
 
--
Robert Randall | [hidden email]


 
--
Robert Randall | [hidden email]



--
Robert Randall | [hidden email]



--
Robert Randall | [hidden email]

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel





--
Robert Randall | [hidden email]





--
Robert Randall | [hidden email]



--
Robert Randall | [hidden email]

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Fwd: a couple fixes, are the maintainers interested?

Vedran Degoricija
Hi Robert,
 
I checked in my changes. The fix for the ICF loading is also there, see ManagerMap::SpawnLocalManagers() and please provide feedback.
 
Regards,
Ved


On Tuesday, January 21, 2014 6:04 AM, Robert Randall <[hidden email]> wrote:
Hi Ved,

Did you get a chance to merge my changes into the SVN trunk?  Did you want me to fix the multiple workers problem?

Best,
Robert


On Fri, Jan 17, 2014 at 7:24 AM, Robert Randall <[hidden email]> wrote:
Hi Ved,

Please let me know when you've committed the changes to the trunk of the repository so I may update my local copy.  

The problem is simple to reproduce.  Start IOMeter and create a configuration with two managers and save the configuration file.  Restart IOMeter and load the configuration file.  One manager will start automatically and IOmeter will wait for the second manager but it is never started.  If you would like me to fix this just let me know.

If you would like me to join the maintainers of IOMeter I am happy to do so.  I'm an very interested in improving the marketplace perception of IOMeter.  It feels like updating the GUI and authoring documentation on how IOMeter performs the its IO under each OS implementation of Dynamo to better inform users of the capabilities and sophistication of the application might be quite helpful to improving the perception of IOMeter.

We need an evangelist for IOMeter.  It is good stuff but it has suffered from a lack of attention and that is sad.  I've used it for longer than I care to admit for both network and storage performance testing.

Best regards,
Robert.


On Thu, Jan 16, 2014 at 7:45 PM, Vedran Degoricija <[hidden email]> wrote:
Hi Robert,
 
Thank you. For the most part, it seems that the bVistaStyle piece addresses the assert on exit under the debugger. Thanks for the catch!  I also included most of your changes having to do stdafx cleanup.  Vistual Studio analyzer also caught a couple of interesting deletes that were missing the [] notation. I don't know if these would have been evident at runtime.
 
Lastly, you mentioned and issue with loading multiple workers. Can you clarify that one please? I vaguely recall something about that, but it would help me to have all of the info.
 
Thanks,
Ved


On Wednesday, January 15, 2014 6:13 AM, Robert Randall <[hidden email]> wrote:
Hi Ved,

Zip file of my source tree is attached.  Please feel free to ask questions.

BR,
Robert


On Wed, Jan 15, 2014 at 1:31 AM, Vedran Degoricija <[hidden email]> wrote:
Hi Robert,
 
(Apologies for calling you Randall earlier.)
 
I am having trouble merging the patch.  Patch.exe is only doing a partial job, so I am not sure what's wrong. It's as if the unified flag is not sticking.
 
Could send me the complete affected files by any chance in a zip archive?
 
Thanks,
Ved


On Tuesday, January 14, 2014 5:06 AM, Robert Randall <[hidden email]> wrote:
I apologize for not copying the list on this message.  Please review the patch below and let me know if you need another maintainer <grin>.  I've been developing Windows apps since before there was a Windows kernel <my age is showing>.

Best regards,
Robert

---------- Forwarded message ----------
From: Robert Randall <[hidden email]>
Date: Mon, Jan 13, 2014 at 7:04 PM
Subject: Re: [Iometer-devel] a couple fixes, are the maintainers interested?
To: "lefferts, john" <[hidden email]>


Patch is below.  There are still a few issues I should clean up with regard to cleanly including the MFC headers.  I need to investigate one more internal bug report; loading .icf file with multiple managers results in the first manager being created other are not created.


Index: src/GalileoApp.cpp
===================================================================
--- src/GalileoApp.cpp (revision 141)
+++ src/GalileoApp.cpp (working copy)
@@ -122,6 +122,14 @@
  delete login_port;
 }
 
+void CGalileoApp::CloseAllDocuments(BOOL bEndSession) 
+{
+ if (bEndSession)
+   {
+      m_wndStatusBar.DestroyWindow();
+      m_wndToolBar.DestroyWindow();
+   }
+}
 /////////////////////////////////////////////////////////////////////////////
 // The one and only CGalileoApp object
 
@@ -311,6 +319,8 @@
 ///////////////////////////////////////////////////////////////////////////////
 int CGalileoApp::ExitInstance()
 {
+   manager_list.RemoveAllManagers();
+
  delete[]m_pVersionString;
  delete[]m_pVersionStringWithDebug;
 
Index: src/GalileoApp.h
===================================================================
--- src/GalileoApp.h (revision 141)
+++ src/GalileoApp.h (working copy)
@@ -130,6 +130,7 @@
  virtual int ExitInstance();
  virtual BOOL OnIdle(LONG lCount);
  virtual CDocument *OpenDocumentFile(LPCTSTR lpszFileName);
+ virtual void CloseAllDocuments(BOOL bEndSession); 
  //}}AFX_VIRTUAL
 
 // Implementation
Index: src/GalileoView.cpp
===================================================================
--- src/GalileoView.cpp (revision 141)
+++ src/GalileoView.cpp (working copy)
@@ -1180,6 +1180,7 @@
 void CGalileoView::OnFileOpen()
 {
  BOOL flags[NumICFFlags];
+ CICFOpenDialog file_open_box; // open config file dialog box
 
  // Show the custom file open dialog.
  if (file_open_box.DoModal() == IDCANCEL)
@@ -1202,6 +1203,7 @@
 void CGalileoView::OnFileSave()
 {
  BOOL flags[NumICFFlags];
+ CICFSaveDialog file_save_box; // save config file dialog box
 
  // Show the custom file save dialog.
  if (file_save_box.DoModal() == IDCANCEL)
Index: src/GalileoView.h
===================================================================
--- src/GalileoView.h (revision 141)
+++ src/GalileoView.h (working copy)
@@ -182,8 +182,6 @@
  CPropertySheet *m_pPropSheet;
 
       protected:
- CICFOpenDialog file_open_box; // open config file dialog box
- CICFSaveDialog file_save_box; // save config file dialog box
 
  // tracks whether parent frame has already been sized.
  BOOL m_bSizedBefore;
Index: src/ICFOpenDialog.cpp
===================================================================
--- src/ICFOpenDialog.cpp (revision 141)
+++ src/ICFOpenDialog.cpp (working copy)
@@ -87,9 +87,10 @@
 
 /////////////////////////////////////////////////////////////////////////////
 // CICFOpenDialog dialog
-    CICFOpenDialog::CICFOpenDialog()
-:  CFileDialog(TRUE, "icf", "", NULL,
-    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||")
+   CICFOpenDialog::CICFOpenDialog()
+:  CFileDialog(TRUE, "icf", NULL, OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT, 
+            "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||", 
+               NULL, 0UL, FALSE)
 {
  CString title;
  char *buf;
@@ -104,9 +105,6 @@
 
  m_ofn.lpTemplateName = MAKEINTRESOURCE(IDD_FILEOPEN_OPTS);
 
- // This is key to getting the templates working properly and secondary opens to work at all?!
- m_bVistaStyle = FALSE;
-
  //{{AFX_DATA_INIT(CICFOpenDialog)
  isCkTestSetup = TRUE;
  isCkResultsDisplay = TRUE;
Index: src/ICFSaveDialog.cpp
===================================================================
--- src/ICFSaveDialog.cpp (revision 141)
+++ src/ICFSaveDialog.cpp (working copy)
@@ -88,8 +88,9 @@
 /////////////////////////////////////////////////////////////////////////////
 // CICFSaveDialog dialog
     CICFSaveDialog::CICFSaveDialog()
-:  CFileDialog(FALSE, "icf", "iometer", NULL,
-    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||")
+:  CFileDialog(FALSE, "icf", "iometer",  OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
+    "Iometer Configuration Files (*.icf)|*.icf|" "Text Files (*.txt)|*.txt|All Files (*.*)|*.*||",
+        NULL, 0UL, FALSE)
 {
  CString title;
  char *buf;
@@ -104,9 +105,6 @@
 
  m_ofn.lpTemplateName = MAKEINTRESOURCE(IDD_FILESAVE_OPTS);
 
- // This is key to getting the templates working properly and secondary opens to work at all?!
- m_bVistaStyle = FALSE;
-
  //{{AFX_DATA_INIT(CICFSaveDialog)
  isCkTestSetup = TRUE;
  isCkResultsDisplay = TRUE;
Index: src/IOCommon.h
===================================================================
--- src/IOCommon.h (revision 141)
+++ src/IOCommon.h (working copy)
@@ -204,17 +204,21 @@
 #if defined(IOMTR_OSFAMILY_WINDOWS)   // Only first, because it is needed here!
  //#define VC_EXTRALEAN
  //#pragma warning (disable: 4242)
+#include "StdAfx.h"
+//#define WIN32_LEAN_AND_MEAN 1
+//#include <Windows.h>
+//#include <windef.h>  
  #include <process.h>
  #include <io.h>
  #include <direct.h>
- #include <afxwin.h>
- #include <afxext.h>
- #include <afxcmn.h>
- #include <winioctl.h>
+// #include <afxwin.h>
+// #include <afxext.h>
+// #include <afxcmn.h>
  #include <iomanip>
  #include <winperf.h>
  #include <winreg.h>
- #include <afxmt.h>
+ #include <winioctl.h>
+// #include <afxmt.h>
  #include <malloc.h>
 #endif
 // ----------------------------------------------------------------------------
@@ -868,7 +872,7 @@
  struct IOCQ {
  CQ_Element      *element_list;
  struct aiocb64 **aiocb_list;
-#ifdef IOMTR_SETTING_LINUX_LIBAIO
+#ifdef IOMTR_SETTING_LINUX_LIBAIO
  struct iocb **iocb_list;
         io_context_t io_ctx_id;
         struct io_event *events;
Index: src/IOPort.cpp
===================================================================
--- src/IOPort.cpp (revision 141)
+++ src/IOPort.cpp (working copy)
@@ -81,6 +81,7 @@
 /* ######################################################################### */
 
 #if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+#include "StdAfx.h"
 #include "GalileoApp.h"
 #endif
 #include "IOPort.h"
Index: src/IOPortTCP.cpp
===================================================================
--- src/IOPortTCP.cpp (revision 141)
+++ src/IOPortTCP.cpp (working copy)
@@ -89,7 +89,7 @@
 /* ######################################################################### */
 
 #if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
-#include <afx.h>
+#include "StdAfx.h"
 #endif
 
 #include "IOPortTCP.h"
Index: src/IOTarget.cpp
===================================================================
--- src/IOTarget.cpp (revision 141)
+++ src/IOTarget.cpp (working copy)
@@ -109,6 +109,9 @@
 #if defined(IOMTR_OSFAMILY_UNIX) && defined(WORKAROUND_MOD_BUG)
  return ((DWORDLONG)fmodl(spec.random = A * spec.random + B, limit));
 #else
+#ifdef _DEBUG
+ assert(limit > 0);
+#endif
  return (spec.random = A * spec.random + B) % limit;
 #endif
 }
Index: src/IOTargetDisk.cpp
===================================================================
--- src/IOTargetDisk.cpp (revision 141)
+++ src/IOTargetDisk.cpp (working copy)
@@ -1329,10 +1329,14 @@
  // Loop through the I/O queue looking for idle slots.
  for (i = 0; i < PREPARE_QDEPTH; i++) {
  // Check to see if we've reached the end of the disk
- if (spec.disk_info.maximum_size &&
+ // Windows debuggers lie when decoding spec.disk_info pushing
+ // values into local vars
+            int dd_sector_size = spec.disk_info.sector_size;
+            ULONGLONG dd_maximum_size = spec.disk_info.maximum_size;
+            ULONGLONG dd_starting_sector = spec.disk_info.starting_sector;
+ if (dd_maximum_size &&
     ((*prepare_offset + bytes) >
-     ((spec.disk_info.starting_sector +
-       (DWORDLONG) spec.disk_info.maximum_size) * spec.disk_info.sector_size))) {
+     ((dd_starting_sector + dd_maximum_size) * dd_sector_size))) {
  // A maximum disk size was specified by the user, and the next write 
  // would go past the specified maximum size.  
 #ifdef _DEBUG
Index: src/IOTime.cpp
===================================================================
--- src/IOTime.cpp (revision 141)
+++ src/IOTime.cpp (working copy)
@@ -92,6 +92,9 @@
 /* ##                                                                     ## */
 /* ######################################################################### */
 
+#if defined(IOMTR_OS_WIN32) || defined(IOMTR_OS_WIN64)
+#include "StdAfx.h"
+#endif
 #include "IOCommon.h"
 
 #if defined(IOMTR_OS_LINUX)
Index: src/StdAfx.h
===================================================================
--- src/StdAfx.h (revision 141)
+++ src/StdAfx.h (working copy)
@@ -58,11 +58,61 @@
 /* ##                                                                     ## */
 /* ######################################################################### */
 
-#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
+//#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
 
-#include <afxwin.h> // MFC core and standard components
+//#include <afxwin.h> // MFC core and standard components
 //#include <afxext.h>         // MFC extensions
+//#ifndef _AFX_NO_AFXCMN_SUPPORT
+//#include <afxcmn.h> // MFC support for Windows Common Controls
+//#endif // _AFX_NO_AFXCMN_SUPPORT
+//#include <afxtempl.h>
+
+// stdafx.h : include file for standard system include files,
+// or project specific include files that are used frequently,
+// but are changed infrequently
+
+#pragma once
+
+#ifndef VC_EXTRALEAN
+#define VC_EXTRALEAN            // Exclude rarely-used stuff from Windows headers
+#endif
+
+#include "targetver.h"
+
+//#define _AFX_NO_OLE_SUPPORT 1
+#define _ATL_CSTRING_EXPLICIT_CONSTRUCTORS      // some CString constructors will be explicit
+
+// turns off MFC's hiding of some common and often safely ignored warning messages
+#define _AFX_ALL_WARNINGS
+
+#include <afxwin.h>         // MFC core and standard components
+#include <afxext.h>         // MFC extensions
+
+#ifndef _AFX_NO_OLE_SUPPORT
+#include <afxdtctl.h>           // MFC support for Internet Explorer 4 Common Controls
+#endif
 #ifndef _AFX_NO_AFXCMN_SUPPORT
-#include <afxcmn.h> // MFC support for Windows Common Controls
-#endif // _AFX_NO_AFXCMN_SUPPORT
-//#include <afxtempl.h>
+#include <afxcmn.h>             // MFC support for Windows Common Controls
+#endif // _AFX_NO_AFXCMN_SUPPORT
+
+#include <afxcontrolbars.h>     // MFC support for ribbons and control bars
+
+
+
+
+
+
+
+
+
+#ifdef _UNICODE
+#if defined _M_IX86
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#elif defined _M_X64
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#else
+#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
+#endif
+#endif
+
+



On Mon, Jan 13, 2014 at 3:10 PM, lefferts, john <[hidden email]> wrote:
I appreciate you valuable efforts.
I think the developers would be better able to evaluate the technical merit of your changes if you take the extra time to construct a patch.
Even a simple diff stream would be useful for a review.
 
I have co-workers who complain about “crashes” when shutting-down a performance run—I wonder if you have addressed their issues.
 
The SLN file under src/msvc9 says it was created with VS2008 (version 10) and I am using that.
It has the same constructor.
 
The developers have a comment that seems to indicate open-exclusive issues on reopen without prompt destruction of heap objects:
 
      // This is key to getting the templates working properly and secondary opens to work at all?!
      m_bVistaStyle = FALSE;
 
I am interested in seeing your changes.
 
 
From: Robert Randall [mailto:[hidden email]]
Sent: Monday, January 13, 2014 3:44 PM
To: [hidden email]
Subject: Re: [Iometer-devel] a couple fixes, are the maintainers interested?
 
I also fixed a problem when running in batch mode.  The destruction sequence of Windows causes an exception.  The cheap fix is implementing a function in CGalileoApp.
 
Regards,
Robert
 
On Mon, Jan 13, 2014 at 2:17 PM, Robert Randall <[hidden email]> wrote:
 
Hello,
 
I've spent some time fixing a few simple problems with the latest version of MFC using the current trunk.  The CFileDialog constructors were being called incorrectly causing reference counting problems with COM.   The COM classes should not have been initialized in the first place.  Because the code was messing with m_bVistaStyle directly (not a good idea) it was causing the COM classes to be created but not destroyed which results in exceptions when running in the debugger and leaks resource when running a release build.
 
I made these changes using VS 2012 and I don't have the tools to know if the CFileDialog constructor is compatible with previous releases of MFC.  I'm not sure how old a tool set is supported by the project when compiling on Windows.  Which versions of the compiler and MFC are supported?
 
The constructor in the version of MFC I'm using is:
 
CFileDialog(
   BOOL bOpenFileDialog,
   LPCTSTR lpszDefExt = NULL,
   LPCTSTR lpszFileName = NULL,
   DWORD dwFlags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT,
   LPCTSTR lpszFilter = NULL,
   CWnd* pParentWnd = NULL,
   DWORD dwSize = 0,
   BOOL bVistaStyle = TRUE
);
 
I found one other minor problem.  When using a file on disk for testing the minimum Maximum Disk Size in sectors MUST be 128 or larger because of the code that IOTargetDisk::Prepare assumes that at least 64Kb will be written to the file.  A smaller value results in a divide by zero exception.  I'm not sure if Prepare should be fixed to handle smaller files or a minimum size should be enforced by the GUI.  Happy to make the fix either way.
 
 
Let me know if you would like a patch for these changes.
 
Best regards,
Robert
 
--
Robert Randall | [hidden email]


 
--
Robert Randall | [hidden email]



--
Robert Randall | [hidden email]



--
Robert Randall | [hidden email]

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel





--
Robert Randall | [hidden email]





--
Robert Randall | [hidden email]



--
Robert Randall | [hidden email]



------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Iometer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/iometer-devel
Loading...