




已阅读5页,还剩107页未读, 继续免费阅读
(计算机系统结构专业论文)微处理器性能分析与优化.pdf.pdf 免费下载
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
摘要 面对日益复杂的设计和有限的设计时间如何有效地进行性能分析和优化,是摆在 每一个处理器设计者面前的问题。本文紧密结台一个高性能微处理器( 龙芯2 号 h z l 0 5 1 ) 豹设计,从性能分析环境设计和性能分析方法着手,系统地研究了微处j ;_ i 3 器性能分析和 优化问题,并根掘睦能分析结果提出r 若干龙芯2 号结构优化万法。 性:能分析环境的核心是目标处理器和工作负载的模型,这些模型的准确性、速度和 灵活性是其关键指标。处理器的r t l 模受是种准确的模型,但是它的速度和灵活性不 能满足性能分析的要求。本文提出了一种使用高级语言对硬件建模的方法,并使用它建 立了龙芯2 号的信号级摸拟器i c t - g o d s o n 。i c t - g o d s o n 和r t l 的逻辑行为相丽,但速度 可以比r t i _ 。仿真高一个数量级以上。 i c t - g o d s o n 部分解决了运行速度的问题,但由于它还是模拟了所有硬件信号和行为, 其速度和灵活性依然受到比较大的限制。为此本文迸一梦建立了一种更高层的模拟器 s i r e g o d s o n 。s i r e ”g o d s o n 是个用c 语言实现的龙芯2 号处理器性能模型。执行驱动麴 组织方式、离效的数据结榴秘算法以及模块化实琥保证了s i r e g o d s o n 的速度和灵活性。 s i m n g o d s o n 每秒能够模拟约5 0 0 k 个处理器阁期,和目前公开的最快的详细模拟器相当。 s i m g o d s o n 支持大程序快速评估,能够在一个小时内准确地给出s p e cc p u 2 0 0 0 程序的 性能数据。s i m g o d s o n 同时支持用户级模拟和全系统模拟,既能满足不同场合的要求, 还能方便地隔离操作系统和i o 对程序性能的影响。本文还为晒n + g o d s o n 建立了个完 整的验迁流程,它能够有效地控制模拟器的误差。 为了充分满足不同设计阶段和设计目的的需求,性能分析环境应该由一组工具组成。 除了i c t - g o d s o n 和s i r e g o d s o n 甄釉高级法言性能模型,本文建立的性能分柝环境还包括 r t l 积f p g a 仿真环境以及一些辅助的软件工具。r t l 和f p g a 主要用于验旺高级语毒 模型,各种辅助工具可以用于工作负载的分析和优化。 本文为i c t - g o d s o n 和s i m g o d s o n 模拟器实现了多角度的数据 投集。这种方法能够从 各个侧潞f 体现鞠标处理器的行为,帮助设计人员发现性能瓶颈。为了更深入地理缨高陛 能微处理器的行为,本文进步考察了一些瓶颈分析方法。这些方法能够用来系统地确 定处理器内部各类瓶颈阂素的重要程度以及它们之问的关系。 最后,本文详细地讨论了龙芯2 号性能分析和优化 二作。我们展示了多角度的数据 收集方法的实赋应用,分析了龙芯2 号的瓶颈,并讨论了基寸二性能分析的冀优化,包 括l o a d 猜测优化、存储系统优化等。本文还诩沦了对s p e cc p u 2 0 0 0 工作负载的分析, 以及编译器和操作系统对性熊的影购。实践证明,本文所建意的怿能分折环境和分析方 法能很好地满足实际高性能微处理器性能分析和优化的需求。 关键词:微处理器;龙芯:微体系结构; 作负载分析:性能分析:性能模型:瓶 颈分析: p e r f o r m a n c ea n a l y s i sa n do p t i m i z a t i o n so fm i c r o p r o c e s s o r s z h a n gf u x i n ( c o m p u t e ra r c h i t e c t u r e ) d i r e c t e db yh uw e i w a w i t ht h ee v e r - i n c r e a s i n gd e s i g nc o m p l e x i t ya n dl i m i t e dd e s i g nt i m e i ti saq u e s t i o nf 0 r e a c hd e s i g n e r :h o wt oe f f i c i e n t l yp e r f o r ma n a l y s i sa n do p t i m i z a t i o n so ft h et a r g e ts y s t e m ? t h i s p a p e rt r i e st oa n s w e rt h i sq u e s t i o nv i as t u d i e so f t h ep e r f o r m a n c ea n a l y s i se n v i r o n m e n ta n dt h e m e t h o d o l o g yn e e d e db ya r e a l i s t i ch i g hp e r f o r m a n c em i c r o p r o c e s s o r ( t h eg o d s o n 。2p r o c e s s o r 【h z l 0 5 ) d e s i g n a tt h ec o r eo fp e r f o r m a n c ea n a l y s i se n v i r o m n e n ta r et h em o d e l so ft a r g e tp l 。o c e s s o r sa n d w o r k l o a d sa c c u r a c y , s p e e da n df l e x i b i l i t ya r et h ek e yr e q u i r e m e n t so ft h e s em o d e l s r t l m o d e l sd i c t a t et h el o g i cb e h a v i o ro fm i c r o p r o c e s s o r s ,b u tt h e ya r et o os l o w ,a n db a t i n gt o o m u c hd e t a i l st ob ef l e x i b l ee n o u g h t h i st h e s i sp r o p o s e saw a yt om o d e lh a r d w a r ei nh i g hl e v e l p r o g r m n m i n gl a n g u a g e sa n ds u c c e s s f u l l yu s e si tt ob u i l das i g n a l l e v e ls i m u l a t o r , w h i c hi s c a l l e di c t - g o d s o n i c t - g o d s o nh a st h es a m el o g i cb e h a v i o rw i t ht h eg o d s o n 一2r t lm o d e l ,b u t i tc a l li 1 1 l l1o xf a s t e r i c t - g o d s o np a r t i a l l ys o y e st h es p e e dp r o b l e m ,b u ts i n c ei tb e a r sa l lt i l ed e t a i l si t i ss t i l l l i m i t e di nf l e x i b i l i t y w eg ot u r t h e rt ob u i l dal n o r eh i g h l e v e lm o d e l 。w h i c hi sc a l l e d s i m g o d s o n s i r e g o d s o ni sap e r f o r m a n c em o d e lo ft h eg o d s o n 一2p r o c e s s o rw r i t t e ni nct h e a d o p t i o no fe x e c u t i o n d r i v e no r g a n i z a t i o n ,h i g h l ye f f i c i e n td a t as t r u c t u r e sm i da l g o r i t l m l s ,a n d m o d u l a rd e s i m _ le n s u r e si t ss p e e da n df l e x i b i l i t y , s i m g o d s o nc t q l - 1s i m u l a t ea r o u n d5 0 0 kc y c l e s p e rs e c o n da n dt h i si sc o m p a r a b l et ot h ef a s t e s tp u b l i cd e t a i l e ds i m u l a t o r ss i m g o d s o ns u p p o r t s f a s te v a l u a t i o no fl a r g ew o r k l o a d s i tc a na c c u r a t e l yp r e d i c tt h ep e r f o r m a n c eo fs p e cc p u 2 0 0 0 ma nh o u r s i m g o d s o ns u p p o r t sb o t hu s e rm o d es i m u l a t i o na n df f d l s y s t e ms i m u l a t i o ns ot h a t w ec a nc h o o s eac o n v e n t i o n a lm o d ef o rd i f f e r e n tp u r p o s e s , m a dt h i si sa l s ou s e f u lf o ri s o l a t i n g t h ee f f e c to f t h eo p e r a t i n gs y s t e ma n de x t e mi o w ee s t a b l i s has y s t e m a t i c a lv a l i d a t i o nf l o wf o r s i m g o d s o n ,w h i c hi se f f e c t i v ei nc o n t r o l l i n gt h em o d e l e r r o r t ob e s tm e e tt h er e q u i r e m e n t so fd i f f e r e n td e s i g n s t a g e s a n dd e s i g n p u r p o s e s ,a p e r f o m a a n c ea n a l y s i se n v i r o l l r n e n ts h o u l db ec o m p o s e do fas e o ft o o l s b e s i d e si c t - g o d s o n a n ds i m g o d s o n t h ee n v j r o r m l e n te s t a b l i s h e db yt h i st h e s i si n c l u d e st h er t lm o d e la n df p g a e m u l a t i o np l a t f o r m ,a n ds o m eo t h e rs o f t w a r et o o l s r t la n df p g aa r eu s e dt ov a l i d a t e h i 豳一l e v e lm o d e l sw h i l es o f t w a r et o o l sa r eu s e df o rt a s k ss n e l la sw o r k l o a da n a l y s i s t h i st h e s i si m p l e m e n t sam u l t i r a c e td a t ac o l l e c t i o ns c h e m ei nb o t hi c t - g o d s o na n d s i m g o d s o n l h e yc a np r e s e n td i f f e r e n tv i e w so ft a r g e tp r o c e s s o r sb e h a v i o r sa n dh e l pd e s i g n e r t of i n db o t t l e n e c k s t ob e t t e ru n d e r s t a n d i n gt h eb e h a v i o ro f h i 曲p e r f o m l a l l c em i c r o p r o c e s s o r s , w ef f w t h e r i n v e s t i g a t e s e v e r a lm e t h o d sf o rb o t t l e n e c k a n a l y s i s t h e s em e t h o d sc a r l s y s t e m a t i c a l l yd e c i d et h ee f f e c t se a c hb o t t l e n e c ka n dt h e i ri n t e r a c t i o n sh a v eo nt i l ep e r f o r m a n c e 徽处理瓣性糍分析与优化:a b s t r a c t f i n a l l y , w ed i s c u s st h ep e r f o r m a n c ea n a l y s i sa n do p t i m i z a t i o no f t h eg o d s o n 一2p r o c e s s o ri n d e t a i l w es h o wh o wm u l t i f a c e td a t ac o l l e c t i o ni su s e d ,w ea n a l y s i st h eb o t t l e n e c k s a n dw e d i s c u s ss o m eo p t i m i z a t i o n sb a s e do np e r f o r m a n c ea n a l y s i s ,i n c l u d i n gl o a d s p e c u l a t i o na n d o p t i m i z a t i o n so fm e m o r ys y s t e m 。w ea l s od i s c u s st h es p e cc p u 2 0 0 0w o r k l o a d ,a n dt h e p e r f o r m a n c ei m p a c to fc o m p i l e r sa n do p e r a t i n gs y s t e m s ,| i ss h o w l lt h a tt h ep e r f o r n l a n c e a n a l y s i se n v i r o n m e n ta n dm e t h o d sp r o p o s e db yt h i st h e s i sc a nw e l lm e e tt h er e a lw o r l d r e q u i r e m e n t s k e y w o r d s :m i c r o p r o c e s s o r ;g o d s o n 一2 ;m i c r o a r e h i t e c t u r e ;w o r k l o a dm l a l y s i s ;p e r f o r m a n c e a n a l y s i s ;p e r f o r m a n c em o d e l ;b o t t l e n e c ka n a l y s i s 徽楚理器性能分析与谯托:鬓8 最 图目录 阁3 1i c t - g o d s o n 的可视化界藤, 圈6 1p b 设计矩终( x 一8 ) 豳6 2 交互代价的计奠和执行时问切分一 圈6 3 利用i p c 切分图柬优化长流水线 踅7 龙蕊2 b 豹i p c 圈7 2 龙芯2 b 的分支预测失效率, 阉7 3 各流承级i p c 分布阁 鬻7 4d e c o d e 级l - p c 分糍 阉7 5r e g m a p 级i p c 分布 潜7 6i s s u e 缀p c 努毒一 + 2 1 5 1 + 5 2 s 3 ,。,5 7 。+ 5 7 。5 8 。5 9 + 6 0 ,辱l 阁7 7 不同功能部件的指令分布+ 6 3 圈7 8s p e c 2 0 0 0 测试程序所体现的臻口访存行为空间局部性统汁 黼7 9s p e c 2 0 0 0 溅试程序所体现游处骥器系统总线访存搡俸时闻局部性 隰7 1 0s p e ci n t 2 0 0 0 在各种配置下的i p c 辫7 1ts p e cf p 2 0 0 0 在冬耪配嚣下豁i p c 翻7 j 2g o d s o n 2 b 的分支预测失效率和j r 预测失效的比率 翱7 1 3 龙芯2 号处理器c p 0 队列工作原理 圈7 t 4l o a d 猜测优纯对性能提高豁百分眈 图7 1 5 龙芯2 b 的性能年嗣访存延迟的关系 黧7 。1 5 延迟和繁宽对s p e cc p u 2 0 0 0 性戆夔影鞫,; 燃7 1 7 片外二级c a c h e 对程序i p c 的影晌 图7 1 8 平均每条指令花爨静存储访阀髑期 潮7 19a m m p 的i p c 陵时闻变忧清醒 斛 繇 甜 嬲 卯 弼 乃 弭 ” 玛 玲 图72 0a p p l u 的i p c 随时间变化情况 图7 2 1g c c e x p r 的i p c 随时问变化情况 圈72 2g z i p r a n d o m 的i p c 随时间变化情况 圈7 2 3g z i p p r o g r a m 的i p c 随时问变化情况 图72 4a l t o 的加速效果 圈72 5 不问t l b 页大小对s p e cc p u 2 0 0 0 分值的影响 图72 6 软t l b 对s p e cc p u 2 0 0 0 程序的影响 7 9 8 0 8 0 8 l 8 5 9 0 9 l 中因科学院博士学设论文一微处理器性能分析与优化 表舅录 表3 ,i 枣髂诗鼗绞谤骧出樽镶一 表4 1s i m p o i n t 分析使用的微体系结构配置 表4 2s i m p o i n t 的加速比 表4 3s i m p o i n t 戆黻确凄一 表4 4 增加k 对s i m p o i n t 谈差的影晌( k = 2 0 ) 表4 5s m a r t s 的加速眈 表4 6s m a r t s 豹撄礁缝 表4 7s i m - g o d s o n 模拟器验证使用的微体系结构配鬣 表4 8 微基准程序验证结巢 表4 + 9s p e cc p u 2 0 0 0 程序验证结粜 表5 1f p g a 和实际机器延遇测试结果比较 表5 2f p g a 和实鞴机器带宽测试翁荣比较 表5 , 3f p g a 和实黼搬器s p e cc p u 2 0 0 0 si p c - ed l i fd l l sd l l - eb 艮fb r sb r e a n m l p0 6 7 80 6 7 1 0 0 1 00 0 5 00 0 5 20 0 4 700 3 9 00 4 00 0 3 6 a p s l 0 6 3 60 6 6 00 0 3 80 0 3 00 0 2 5( 】j _ :00 5 600 6 4“1 1 a r t a r t l0 2 9 90 2 9 8- o 0 0 20 4 8 9 0 4 9 0 0 0 0 2 0 0 5 00 5 20 0 1 2 a r t a r t 2o 3 0 20 3 0 2o 0 0 20 4 9 10 4 9 10 0 0 0 o 0 5 1 0 0 5 0o 0 1 4 b z l p 2g r a p l u e 0 8 6 5 1 1 2 l02 9 60 0 1 600 0 904 1 200 6 400 5 501 1 l b z l p 2p r o g r a m 0 9 4 81 0 2 50 0 8 20 0 1 700 1 7o0 1 500 6 600 4 8( ! q 1 b z l p 2 s o u r c e 0 8 1 60 8 6 60 0 6 00 0 2 3o0 2 3 0 0 3 l00 7 2 0 0 7 500 3 7 c r a t t y0 9 0 30 9 0 6 o 0 0 40 0 0 3o 0 0 30 0 1 l0 2 6 70 2 6 6 00 0 4 e o n c o o k 0 7 3 4 o 7 3 1 o 0 0 4 0 0 0 00 0 0 005 4 5o1 4 90 1 4 9 00 0 3 e o n k a j i y a 0 7 1 2o 7 1 0- 00 0 2o 0 0 00 0 0 0l6 6 70 1 6 10 1 6 1o 0 0 2 e o n r u s h m e l e r0 7 7 60 7 6 8- 0 0 1 0o0 0 00 0 0 0( ) 6 6 70 1 5 3o 1 5 2- 0 0 0 1 g a p 0 9 6 60 4 9 2- 0 4 9 i o o l 200 3 2 16 1 ( j 0 1 2 400 8 5 ,0 | 1 g e e 1 6 6 0 5 4 30 5 3 0- 0 0 2 40 0 7 60 0 5 802 1 70 0 4 500 5 4 nlh g e c2 0 0 0 7 3 20 7 4 400 1 700 3 400 2 4 n2 , 01 1 60 1 3 6 l j l l g c e e x p r 0 7 0 70 7 3 00 0 3 30 0 4 200 3 1 n2 ( ,s 01 1 601 3 2 n1 1 4 g c e 1 r l t e g r a t e 0 6 7 6o6 7 1o 0 0 7o 0 6 00 0 4 6 12 2 h0 0 7 20 0 9 0 n1 4 、 g e e s c l l a b 0 6 9 6o 7 2 l0 0 3 50 0 3 4o 0 2 4j ) 2 9 7o1 3 7o 1 3 80 0 0 8 g z l p g r a p l u e 1 2 3 21 2 2 8- o 0 0 30 0 2 0o 0 1 9_ 0 0 2 000 8 0o 0 8 l0 0 1 4 g z l p l o g 1 1 7 41 1 9 4 0 0 1 70 0 3 20 0 3 00 0 6 2 00 5 000 4 90 0 1 8 g z l p p r o g r a m 1 3 1 211 8 90 0 9 40 0 3 30 0 6 10s 4 so 0 5 700 5 800 2 5 g z l pr a n d o m 1 1 7 9l1 7 7- 0 0 0 20 0 2 60 0 2 500 2 20 0 5 400 5 3 o0 l l g z l ps o u r c e i 2 2 4l2 1 3 - o 0 0 9 0 0 3 5 0 0 3 700 7 0 00 6 400 6 6o0 3 l m c f0 1 8 4o1 8 5 0 0 0 40 2 6 60 2 6 9o0 l l 00 7 l 0 0 7 7 0 0 8 8 t n e s a1 2 3 21 2 3 8 0 0 0 5 0 0 0 40 0 0 40 0 0 201 1 70 1 1 6 - 00 0 3 o8 7 008 9 20 0 2 5o 0 2 00 0 1 90 0 2 50 0 8 60 0 8 7o o l 2 0 4 1 9 0 4 3 l0 0 2 80 1 7 8o 1 7 4- 00 2 30 0 0 50 0 0 3 03 9 6 t w o l f0 5 6 00 5 5 60 0 0 70 0 6 90 0 6 9 00 0 4 02 2 702 2 800 0 4 v o r t e x v o r t e x l0 6 4 606 2 9- 00 2 70 0 0 8 0 0 0 90 0 4 8 00 8 l00 8 30 0 3 l v o r t e x v o r t e x 20 7 3 90 7 2 3- 00 2 20 0 0 50 0 0 500 0 60 0 9 400 9 80 0 4 3 v o r t e xv o r t e x 30 6 3 4 06 2 3o0 1 800 0 80 0 0 900 1 7o0 8 l00 8 4 00 3 7 w u ! o w l s e 0 9 4 209 5 20 0 1 00 0 2 3 0 0 2 300 0 9 01 7 901 7 7 o0 1 0 往r 彳匀冤尘g 钉的绪粜4 月”聃咖结粜t 州是1 尉r 的革d l i 茬带糍嚣据c a c h e 失效+ b r 表f 竹t 捌 举 表4 2 和表4 3 分别给出了s i m p o i n t 的加速比和精确性情况。其中的s i m p o i n t 样本大小为1 0 0 m 条指令,生成s i m p o i n t 使用k = l o 的约束,即最多把样本分为 1 0 类。每类只取一个样本,因此需要模拟的指令最多只有1 0 * 1 0 0 m = 1 0 亿条, 在s i r e g o d s o n 模拟器上可以在一小时之内完成。加速比从1 3 到5 8 6 不等,一般 运行时问越长的程序加速比越大。 表4 3 中我们给出了i p c 、一级数掘c a c h e 失效率和分支预测失效牢的误 第四章s i r e - g o d s o n 模拟器的设计与实现 差。可以看到,对大多数程序,s i m p o i n t 具有相当高的精确性。多数程序的i p c 误差甚至在1 以内。对于i p c ,明显不正常的程序包括b z i p 2 和g a p ,此外只有 a p s i 、g c c 和g z i p ( 对某些输入) 的误差略高。对一级数据c a c h e 失效率,除 了b z i p 2 和g a p ,a p s i 、e o n 、g c c 和g z i p p r o r a m 的误差比较大。而分支预测失效 率误差较大的程序是a p s i 、b z i p 2 、g a p 、g c c 和s w i m 。 从衷4 2 可以看到,a p s i 、b z i p 2 、g a p 和g z i p 的总指令数都比较高,因此有 可能k = 1 0 时,由于每类的样本很多,用一个样本难以精确代表。g c c 的程序行 为比较复杂( 参见第7 章对程序周期性的分折) ,k = 1 0 也不足以精确分类所有样 本。事实上,从表4 2 可以看到,对g e e 用k = 1 0 分类,结果都得出了9 个或者 1 0 个s i m p o i n t ,说明g c c 中不相似的样本比较多。至于e o n 的一级c a c h e 失效 率误差和s w i m 的分支预测失效率误差,由于这些失效率的绝对值很小,这些误 差不会对性能估计有明显的影响。 s i m p o i n t 算法能够对所产生的s i m p o i n t 给出误差估计,即该样本和它所在类 的样本相似程度的方差。例如,对k = 1 0 时,g a p 的s i m p o i n t 方差如下: g a po u t p u to f s l m p o i n t s ,7c e n t e r s : v a r i a n c e s c l u s t e r : 0 0 5 8 9 2 7 20 0 4 2 6 4 0 401 0 1 8 0 500 0 5 2 5 0 6o2 4 9 6 2 30 0 3 6 8 9 9 2 其中第6 个样本的方差明显比较大。不过,b z i p 2 的结果虽然比较异常,其 s i m p o i n t 的方差却没有特别异常地大。 用k = 2 0 重新生成s i m p o i n t ,得到的结果如下: 表4 4 增加k 对s i m p o i n t 误差的影响( k = 2 0 ) p r o g r a mi p c - f | p o sl p c e d l i f d l l sd j p b r - f 占r ,占r f a p s l 06 3 5 80 6 4 9 400 2 1 40 0 3 0 200 2 8 300 6 2 90 0 5 6 20 0 6 2 4 0 1 1 0 3 b z p 2g r a p h i c 08 6 4 508 8 2 000 2 0 20 0j 6 3o o l 7 700 8 7 900 6 3 70 0 6 6 400 4 2 4 g a p 09 6 6 30 9 5 5 4o o l l300 1 2 30 0 1 3 300 8 l30 1 2 3 7o l3 2 l00 6 7 9 g z l pp r o g r a m i3 1 2 4l3 0 0 60 0 0 9 00 0 3 3 100 3 4 60 0 4 5 30 0 5 7 o0 6 3 5o i l 4 0 g c c l 6 6 05 4 2 805 6 3 40 0 3 8 00 0 7 6 200 5 2 303 1 3 600 4 5 30 0 5 9 903 2 2 3 g c c2 0 007 3 2 07 4 500 l80 0 3 400 2 5- o2 5 j o l l 6 o i3 70 1 7 5 g c cc x p r 07 0 6 607 0 2 i0 0 0 6 40 0 4 1 6o0 3 1 302 4 7 60 1 1 60 1 3 l70 1 3 5 3 g c cm t e g r a t c 0 6 7 5 70 6 8 3 900 1 2 l00 7 2 30 0 4 5 803 6 6 50 0 6 0 1 0 0 8 2 503 7 2 7 口c cs c d a b06 9 6 30 6 8 7 9| 0 0 1 2 l00 3 4 l0 0 2 8 50 1 6 4 20 i 1 6 90 1 4 6 500 7 0 l 我们可以看到,在k 尸2 0 时,所有程序的i p c 误差都得到了很好的控制。b z i p 2 、 g a p 和g z i p p r o g r a m 的分支误预测率和一级c a c h e 失效率误差也降到了可以接受 的程度。但是g c c 的一级c a c h e 失效率和分支误预测率误差仍然没有好转,甚 至有所下降。一方面,k = 2 0 可能对g c c 仍然是不够的。另一方面,由了:s i m p o i n t 的选择仅依赖于基本块执行次数,在b b v 上相似但c a c h e 失效率有很大差别 的样本会被分为一类,发生这种情况时s i m p o i n t 可能出现比较大的误差。事实 上w u n d e r l i c h 等人 w w f 0 3 匕出,g c c 中确实存在这种情况。 中国科学院博士学位论文一一微处理器性能分析j 优化 p e r e l m a n 等人后来提出了一种改进方法 p h c 0 3 】。这种方法生成多种候选的 s i m p o i n t 集( 按最多分成n 类生成,l - - n = k ) ,然后通过一次完全的详细模拟 来选择其中样本i p c 方差最小的s i m p o i n t 集。这样可以避免出现上述情况。他们 发现,如果使用l m 指令的样本大小,指定k = 3 0 0 ,能够很好地控制g c c 的误差。 p e r e l m a n 等人的方法有几点不足:( 1 ) 、它要求一次完整的 f 细模拟,时问 代价比较大。( 2 ) 、为了得到方差比较小的s i m p o i n t 集,k 通常要设得比较大; 如果使用检查点技术,k 值对磁盘空间需求的影响比较大。( 3 ) 、使用详细模拟 来辅助选择模拟点集使得选择结果对具体的微体系结构产生一定的依赖。本文认 为,另一种解决方法是增加第二维的度量来辅助某个样本类中代表样本的选择。 我们首先根据s i m p o i n t 算法按b b v 分类样本,然后根据第二维度量继续细分每 个样本类,为每个子类选择代表样本。s i m p o i n t 的主要缺陷在于它有时会低估存 储系统的影响,因此各样本的c a c h e 命中率应陔是一个很好的第二维选择度 量。c a c h e 命中率生成已经是一个很成熟的技术 m a t 7 0 】,我们不仅不需要进行 详细模拟,还可以用一次运行同时获得多个配置的数据,减小对具体微结构的依 赖。 4 3 2s m a r t s 实现和评估 s m a r t s 是一种严格的系统采样方法。首先,我们要确定样本大小u ( 指 令数) 、采样频率k 以及预热指令数w 。s m a r t s 把每k + u 条指令作为一个采 样单元,先用快速模拟( k - i ) ,u w 条指令,再详细模拟w 条指令,然后歼 始采样统计,继续详细模拟u 条指令。 为了支持s m a r t s ,模拟器必须同时支持快速功能模拟和详细模拟,以及 它们之间的切换。模拟器还需要支持有选择的数据统计,以便支持预热。m i p s 指令集的转移指令延迟槽特性给模式切换带来一些团难,因为转移指令和其延迟 槽指令问有些紧密相关的信息,如果在转移指令处切换模式则需要同时转移这 些信息。我们把转移指令和它的延迟槽作为一个原子单位处理,解决了这个问题。 表4 5 和表4 6 分别给出了s m a r t s 的加速比和误差情况。其中,模拟器配 置和程序同上节。s m a r t s 的参数为u = 1 0 0 0 ,k = 1 0 0 0 ,w = 2 0 0 0 。 从衷4 5 中可以看到,平均每个程序需要详细模拟的指令数为5 7 亿,平均 模拟时间为4 ,6 9 小时,和w u n d e r l i c h 等人的结果基本一致。 袁4 6 显示,对s p e c c p u 2 0 0 0 程序,s m a r t s 预测的i p c 误差平均为一1 7 。 其中误差最大的程序为c r a f t y ,8 4 。s m a r t s 预测的一级c a c h e 失效:莓误差 极小,排除绝对值太小的情况外,只有c r a f t y 和v o r t e x 2 误差超过1 。但是, s m a r t s 预测的分支预测失效率误差有时比较大。 第四章s i r e - g o d s o n 模拟器的设计与实现 表4 5s m a r t s 的加速比 p r o g r a m f u l l l n s t s f u u t i m e ( h ) d e t a i l e d l n s t s s m a r t , ( h )s p e e d u p 挪n 4 0 5 8 3 6 7 1 0 2 4 41 7 6 5 21 2 3 8 3 5 2 1 4 81 0 1 2 9 41 7 4 3 a p s l 6 4 2 4 2 1 5 7 8 0 3 02 5 7 4 71 9 3 4 4 8 4 7 3 32 0 2 9 0 31 2 6 9 a r t a r t l5 7 5 2 7 6 0 6 9 8 43 7 4 91 7 2 8 3 6 4 3 01 5 5 6 92 4 0 8 a r ta r t 26 3 8 1 6 0 9 6 8 3 34 0 8 21 9 1 7 3 1 7 7 71 ,7 0 9 22 3 8 8 b z l p 2 g r a p h i c 15 8 8 9 0 9 1 0 5 1 26 4 2 74 7 7 4 1 7 1 7 l3 4 5 8 31 8 5 8 b z l p 2 p r o g r a m 1 3 6 9 4 0 4 4 1 0 9 05 2 8 04 1 1 4 6 2 2 4 029 5 5 61 7 8 6 b z l p 2 s o u r c e 1 1 7 5 4 8 0 9 4 5 7 34 6 3 73 5 3 2 0 4 1 8 92 5 9 1 91 7 8 9 c r a f t y3 2 1 5 0 8 0 2 6 0 2 2 1 2 1 5 29 6 5 9 9 5 3 2 37 6 2 3 11 5 9 4 e o n c o o k 1 2 11 4 0 8 0 7 8 2 95 5 6 63 6 5 1 6 3 5 9 32 9 8 8 31 8 6 3 e o n k a j i y a 1 5 6 l 4 4 4 8 9 5 6 6 3 34 7 1 0 6 5 9 3 53 8 1 6 71 7 3 8 e o l l r u s h n m e r8 6 4 3 1 0 3 8 2 8 13 6 5 7 2 6 0 3 2 6 6 9 62 0 8 7 21 7 5 2 g a p 3 0 5 9 5 1 9 2 2 2 8 71 1 7 2 29 1 9 2 1 3 2 5 6 7 6 4 5 81 5 j 3 3 g o :1 6 6 4 4 5 3 0 8 6 l1 3 12 1 5 51 3 3 7 1 8 7 5 60 9 4 5 2 2 8 0 g c c 2 0 0 1 1 1 2 8 8 0 1 8 9 1 14 6 5 l3 3 4 0 3 6 5 6 72 4 4 9 41 8 9 9 g c c e x p r 1 2 1 9 r 7 4 0 2 1 4 75 4 23 6 6 1 1 8 3 00 2 6 8 12 0 2 2 g c c i n t e g a t e 1 2 8 7 7 5 5 2 9 3 85 6 l3 8 6 7 3 8 3 40 2 7 6 12 0 3 2 g e e s c i l a b 6 3 6 3 5 7 4 7 3 7 32 7 6 11 9 0 9 8 2 1 1 01 4 0 6 91 9 6 2 g z a p g r a p b a c 11 7 0 8 6 6 6 6 9 9 64 1 0 03 5 1 8 0 0 6 5 02 5 7 8 11 5 9 0 蜘p 1 0 9 4 3 8 9 2 1 6 1 0 8 9 1 4 6 01 3 1 8 7 9 0 8 5o 8 7 4 21 6 7 0 g z l p p r o g r a m 1 7 0 5 7 0 7 9 3 5 1 85 6 9 25 1 2 5 0 0 8 2 93 4 4 51 6 5 2 g z a p r a n d o m 9 6 4 0 7 2 6 0 9 1 63 3 2 32 8 9 6 7 7 0 8 02 1 0 1 71 5 8 1 g z l p s o u r c e 8 8 6 4 2 5 2 0 5 1l2 9 6 72 6 6 3 4 2 0 9
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年汽车尾气处理市场分析报告
- 2025年中国咖啡磨砂膏行业市场全景分析及前景机遇研判报告
- 2025年模型制作行业市场需求分析报告及未来五至十年行业预测报告
- 各负其责教学课件
- 卤素水份测定仪项目投资可行性研究分析报告(2024-2030版)
- 连锁药店新员工培训课件
- 2024年中国铬矿石行业市场调查报告
- 税务师网课平台课件下载
- 2025年 物流服务师高级考试练习题库附答案
- 2025年中国腔体滤波器行业市场全景分析及投资策略研究报告
- 2025年全国新高考II卷高考全国二卷真题英语试卷(真题+答案)
- 江苏省扬州市2023-2024学年高一下学期6月期末 英语试卷(含答案无听力)
- 浙江省温州市乐清市2022-2023学年五年级下学期6月期末科学试题
- 通信员工安全试题及答案
- 2025年洗纹身协议书
- 工会厂务公开课件
- 桃花源记的试题及答案
- 工厂计件奖罚管理制度
- 2025年中国城市礼物发展白皮书
- 2024年陕西省西安市初中学业水平模拟考试地理试卷
- 《老年人认知记忆训练》课件
评论
0/150
提交评论