我应该在64位的Delphi进行测试 [英] What should be tested in 64-bit Delphi

查看:264
本文介绍了我应该在64位的Delphi进行测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

德尔福与64位编译现在是测试版,但只邀请测试-testers将弄到手的这个版本。

Delphi with 64 bit compilation is now in Beta, but only invited beta-testers will get their hands on this version.

我应该被测试者进行测试?

What should be tested by the beta testers?

推荐答案

Embarcadero公司可能会提供一个测试指南的beta测试。但是,这里有一些想法:

Embarcadero will probably provide a tester's guide for the beta testers. But, here are some ideas:

  • 内存分配,调整,堆和栈。 32位可以使用高达4GB的地址空间(当然,3.5),在64位版本的Windows与 / LARGEADDRESSAWARE 开关:Delphi64应该能够使用多得多。尝试分配8,16,32和GB。 (即使你有较少的内存,配置应该工作,因为它是一个虚拟地址空间。)现在读取和写入值到它一定点:检查你的分配和指针进行的所有工作。看一看的应用程序是什么进程资源管理器的报告。检查你的筹码:它运行自上而下,堆不同 - 是什么样子,有什么解决的是使用?什么是16字节对齐是什么样子?是对准保持所有内部Pascal函数,或者只有那些调用外部code?在32位VCL,还有的code某些位的是不安全的地址大于2GB。有那些被修复?当它的分配程序的地址空间,比方说,第53届国标做任何事情打破? (尝试分配数额特别巨大,然后动态地创建表单,控制等 - 他们很可能会具有较高的地址创建的。)做内存管理器的片段?如何快速的存储移动和复制?

  • Memory allocation, alignment, heap and stack. 32-bit could use up to 4GB (well, 3.5) of address space on a 64-bit version of Windows with the /LARGEADDRESSAWARE switch: Delphi64 should be able to use much more. Try allocating 8, 16, and 32 GB. (Even if you have less RAM, the allocation should work since it's a virtual address space.) Now read and write values into it a certain spots: check your allocation and pointers all work. Have a look at what Process Explorer reports for the app. Inspect your stack: it runs top-down, unlike the heap - what does it looks like, what addresses is it using? What does the 16-byte alignment look like? Is that alignment kept for all internal Pascal functions, or only those that call external code? In the 32-bit VCL, there were some bits of code that weren't safe for addresses larger than 2GB. Have those been fixed? Does anything break when it's allocated in, say, the 53rd GB of your program's address space? (Try allocating a huge amount, and then dynamically creating forms, controls etc - they'll probably be created with high addresses.) Does the memory manager fragment? How fast are memory moves and copies?

编译器警告。 (这个是很重要的。)升级您的程序 - 编译它们不改变,看看你得到什么警告/错误;修复所有;然后修复,即使你没有警告发生的错误。你会遇到哪些问题?如果编译器已经警告过你,但没有?不要铸造为整数时截断一个指针,当你得到警告?怎么样更复杂的问题:如果你使用浮点型,会发生什么?警告,或者是静静地重新presented为?如果你在一个参数传递给方法,这是一个不同的大小 - 例如, PostMessage的和你在一个32位大小的值传递给手柄参数 - 将编译器足够聪明猜测,如果大小是错误的,你的code可能是错的,即使它通常有效通过一个较小的类型,以更大的参数?在什么情况下应该这样做呢? (另一件事:如果你通过一个64位的指针,指向一个方法希望指向一个64位型的32位类型 - 类​​型安全应该大声叫喊,但确实是一个用例是在看什么?从一个二进制文件,一些易引起的问题与错误的大小类型的块。)...等。

Compiler warnings. (This one is important.) Upgrade your programs - compile them without changes, and see what warnings / errors you get; fix any; and then fix bugs that occur even though you weren't warned. What issues did you encounter? Should the compiler have warned you, but didn't? Do you get warnings when truncating a pointer when casting to an integer? What about more complex issues: if you use the Single floating-point type, what happens? Warning, or is it silently represented as a double? What if you pass in a parameter to a method that's a different size - for example, PostMessage and you pass in a 32-bit-sized value to the handle parameter - will the compiler be smart enough to guess that if the size is wrong, your code might be wrong, even though it's often valid to pass a smaller type to a larger parameter? Under what circumstances should it do so? (Another thing: what if you pass a 64-bit pointer to a 32-bit type in a method expecting a pointer to a 64-bit type - the type safety should yell loudly, but does it? A use case for that is reading blocks from a binary file, something that could easily cause problems with the wrong-sized types.) ...etc.

编译器警告很可能是人谁升级的最有用的工具之一,所以编译器应该产生尽可能多的,在许多情况下是可能的,以尽可能少的误报可能。记住德尔福使用广泛的程序员 - 你可能知道什么是警告装置或识别坏code就算编译器是无声的,但任何事情,这将有助于初学者(或有一个糟糕的一天,优秀的程序员)是非常重要的。

Compiler warnings are probably one of the most useful tools for people who upgrade, so the compiler should produce as many as possible, in as many situations as possible, with as few false positives as possible. Remember Delphi is used by a wide range of programmers - you may know what a warning means or recognize bad code even if the compiler is silent, but anything that will help novices (or good programmers having a bad day) is important.

自定义控制和放大器; WinAPI的。您可能有几个海关控制或code位,使大量使用的Windows API,而不是VCL的。是否有任何的Windows API的具体问题?

Custom controls & WinAPI. You probably have a few customs controls or bits of code that make heavy use of Windows APIs instead of the VCL. Are there any Windows API-specific issues?

语言的兼容性请问旧文件IO code的工作 - AssignFile 等? RTTI?如果你有一个事件的签名与整数类型和事件处理程序是自动创建的IDE,是它产生的整数或尺寸特定的整数类型取决于即当前设置的平台?如果该事件是NativeInt,然后呢? (我已经看到了事件处理方法签名生成错误之前,虽然只在C ++端。)

Language compatibility. Does the old file IO code work - AssignFile, etc? RTTI? If you have an event signature with an Integer type, and an event handler is auto-created by the IDE, is it generated as Integer or a size-specific integer type depending on the platform that's currently set? What if the event is NativeInt, what then? (I've seen bugs in event handler method signature generation before, though only on the C++ side.)

不同类型的应用程序。我们可以假设GUI程序已测试好。那么控制台和服务应用程序?

Different types of application. We can assume GUI programs have been tested well. What about console and service applications?

C ++ Builder的兼容文件的生成。 C ++ Builder中不会在XE2 64位,但希望会在XE3。德尔福可以产生..hpp和.OBJ文件帕斯卡尔code,虽然。发生在一个64位平台是什么?您可以生成这些文件,即使它们是无用的?该编译器生成C ++ - 在64位模式下特定的警告呢,还是放弃,而不是让你做呢?在32位模式下,你有什么可以为64位兼容性做会产生警告构建C ++头?

C++Builder compatible file generation. C++Builder won't be 64-bit in XE2, but hopefully will in XE3. Delphi can produce ..hpp and .obj files for Pascal code, though. What happens in for a 64-bit platform? Can you produce those files, even though they're useless? Does the compiler generate C++-specific warnings in 64-bit mode, or does it give up and not let you do it? In 32-bit mode, is there anything you can do for 64-bit compatibility that will generate a warning building the C++ header?

链接。可以将您链接.LIB和.OBJ和其它编译器创建的文件? (我期望的.lib是,.OBJ号)是否连接器使用COFF或OMF 64位 - 他们已经改变? 这个线程意味着一个ELF格式。它是否改变了对32位的吗?这是否会影响DCU格式,我们还会获得超快的编译/链接?

Linker. Can you link .lib and .obj files created with other compilers? (I'd expect .lib yes, .obj no.) Does the linker use COFF or OMF for 64-bit - have they changed? This thread implies an ELF format. Has it changed for 32-bit too? Does this affect the DCU format, will we still get ultra-fast compiling / linking?

COM和64位插件。有什么编组的问题?您可以为浏览器构建一个64位的插件吗?

COM and 64-bit plugins. Are there any marshalling issues? Can you build a 64-bit plugin for Explorer now?

调用约定。 Safecall 的应该是唯一的调用约定(如果 safecall 计数...),这仍然是不同的 - 它仍然工作?函数和过程的指针,并关闭(对象的方法指针):做他们的工作?它们是什么样的调试检查?鉴于所有调用约定现在是一样的,如果你混合调用约定在方法声明和你通话的指针,会发生什么?是否有遗留的东西左右,这将打破或它透明地工作?难道现在给你一个(错误的)警告,类型不兼容?

Calling conventions. Safecall's supposed to be the only 'calling convention' (if safecall counts...) that's still different - does it still work? Function and procedure pointers, and closures (object method pointers): do they work? What do they look like in the debug inspector? Given all calling conventions are now the same, if you mix calling conventions in your method declaration and your calling pointer, what happens? Is there any legacy stuff around that will break or does it transparently work? Does it now give you an (erroneous) warning that the types are incompatible?

浮点运算。德尔福64 preVIEW 说浮点只会加倍。德尔福能否手柄长双 S'是否有处理旧任何兼容性程序实(48位,我认为??)类型?该编译器生成SSE或SSE2 code或A组合,以及如何好处呢?

Floating point math. The Delphi 64 preview said floating point would be double only. Can Delphi handle long doubles? Are there any compatibility routines for handling the old Real (48 bits, I think??) type? Does the compiler generate SSE or SSE2 code or a mix, and how good is it?

性能这是他们第一次走在64位编译器。它可能会被细化,在未来的几个版本。但是,有没有什么明显的性能问题,有:

Performance. This is their first go at a 64-bit compiler; it will probably be refined over the next few releases. But are there any obvious performance problems, with:

  • 编制;连接; IDE的见解?

  • compiling; linking; IDE insight?

生成code:是你的程序更快或更慢?是FP数学更快或更慢?请问在线工作,它产生任何不必要的页眉/页脚位左右内联的方式?

Generated code: are your programs faster or slower? Is FP math faster or slower? Does inline work, and does it generate any unnecessary header/footer bits around inlined methods?

调试。这可能是最简单的测试,通过测试的其他一切事物的全过程,但如何以及是否在64位调试工作?是否有32位单的所有功能?不要IDE调试Visualiser的插件仍然工作?如果你调试非德尔福64位程序或连接,而不是正常运行过程中,?

Debugging. This is probably easiest to test through the whole process of testing everything else, but how well does the 64-bit debugger work? Does it have all functionality of the 32-bit one? Do IDE debug visualiser plugins still work? What if you debug a non-Delphi 64-bit program or attach to a process, instead of running normally?

其它是德尔福自己编译为64位程序?如果不是,为什么不呢? (难道他们吃自己的狗食?)code检查新的VCL(假设preVIEW带有VCL源)。他们做了什么,使VCL 32/64兼容?是否有任何错误,或者如果你已经知道了64位code以及从其他IDE,有没有更好的办法,他们可以拿呢?

Misc Is Delphi itself compiled as a 64-bit program? If not, why not? (Are they "eating their own dogfood"?) Code inspect the new VCL (assuming the preview comes with VCL source.) What have they done to make the VCL 32/64 compatible? Are there any errors, or if you already know 64-bit code well from other IDEs, are there better approaches they could take instead?

...等。我可以继续键入几个小时,但我认为这是一个良好的开端,但:)

...etc. I could keep typing for hours, but I think that's a good start though :)

这篇关于我应该在64位的Delphi进行测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆