我有一个程序,其基本结构如下:
<c language headers>
main() {
some malloc() allocations and file reads into these buffers
call to an assembly language routine that needs to be optimized to the maximum
write back the output of to files and do free()
exit()
}
Run Code Online (Sandbox Code Playgroud)
汇编语言程序本质上是计算缓冲区中数据的校验和,我的目的是将其优化到绝对最大值。它不进行任何系统调用或任何库函数调用。
我刚刚将 Intel vTune Amplifier XE 套件安装到 VS 2015 中。
我如何指定vtune严格关注汇编语言例程部分,并跳过对“C”语言准备部分的所有分析。我似乎正在累积所有数据,例如指令计数或 CPI 等。是否可以仅获取汇编语言子例程中的循环和分支的数据。如果是这样,请告诉我该怎么做。
谢谢
以下基本代码可以完美运行。它确定可用屏幕的列表,然后识别最大的屏幕,然后将舞台的大小设置为等于最大显示器的尺寸。
public class MaximizedStage extends Application {
public static void main(String[] args) {
Application.launch(args);
}
@Override
public void start(Stage stage) {
ObservableList<Screen> monitors = Screen.getScreens();
//determine the larger monitor
Rectangle2D bounds = monitors.get(0).getVisualBounds(); //get the bounds of the default monitor
int preferred_mon = 0;
var x = bounds.getMinX();
var y = bounds.getMinY();
var w = bounds.getWidth();
var h = bounds.getHeight();
System.out.println("Count of monitors : "+monitors.size()+" default monitor size : w: "+w+" h: "+h);
for (int mon = 1; mon < …Run Code Online (Sandbox Code Playgroud) 此代码在Intel 4770K(支持AVX2和XSAVE设置)上运行.环境是MASM(在VS 2017中).
and rsp,-40H ; aligns stack to 64 byte
sub rsp,2000H ; creates enough space to write out the XSAVE
mov qword ptr xsave_space_ptr, rsp
xor rcx,rcx ; XCR(0)
xgetbv ; returns RAX:7,RDX:0
mov rax,7
mov rdx,0
xsave qword ptr xsave_space_ptr ; this is where the VS 2017 crashes.
Run Code Online (Sandbox Code Playgroud)
欢迎任何有关此用法不正确的建议.如果EDX:EAX中的所有位都设置为1,它也会失败.