查看gcc如何按计划(时间表)指示按滴答滴答的水平 [英] View, how gcc plan (schedule) instructions on tick-by-tick level

查看:115
本文介绍了查看gcc如何按计划(时间表)指示按滴答滴答的水平的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我所知,使用gcc for Pentium可以查看编译过程的高级转储,其中gcc显示了它如何为U和V管道规划(调度)汇编程序指令,并且还显示了多少刻度(CPU时钟)将会拿出每条指令。

你能说,哪个版本的gcc可以显示这样的转储,以及打开这个转储的选项是什么?

例如,对于Core2,有一个定义了解码器和执行端口的 core2.md ,每条指令的延迟。我希望看到,gcc如何使用它以及在指令调度中做了什么决定。换句话说:例如程序:



  int main(){
int i; int j = 0; (i = 0; i <1000000; i ++)
j + = i ^((i + 5)&(i> 2)&(i> 5)+ I>&→2)及(I>→5)) - (I + 5);
返回j%250;
}

我怎样才能得到每次迭代时gcc如何计划滴答? / p>

解决方案

我不确定你的意思,但 -fsched-verbose = n (尝试n = 6)转储一些调度信息,看起来就像你在做什么。


As I remember, with gcc for Pentium it was possible to view advanced dump of compilation process, where gcc shows, how it plans (schedules) assembler instructions for U and V pipelines and also shows how many ticks (CPU clocks) will take each instruction.

Can you say, which versions of gcc can show such dumps and what option is to turn this on?

E.g. for Core2 there is a core2.md with decoders and execution ports defined, latencies for every instruction. I want to see, how gcc uses this and what decisions are done in instruction scheduling.

In other words: for example program:

int main() {
    int i; int j=0;
    for(i=0;i<1000000;i++)
        j+=i^((i+5)&(i>>2)&(i>>5) + (i>>2)&(i>>5))-(i+5);
    return j%250;
}

how can I get, how ticks are planned by gcc for each iteration?

解决方案

I'm not sure exactly what you mean, but the -fsched-verbose=n (try with n=6) dumps some scheduling information which looks like what you're after.

这篇关于查看gcc如何按计划(时间表)指示按滴答滴答的水平的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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