1<!DOCTYPE html> 2<html> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 5 <title>quickstart_systemtrace</title> 6 7 <meta name="viewport" content="width=device-width, initial-scale=1.0" /> 8 9 <style> 10 code[class*='smartperf-'], 11 pre[class*='smartperf-'] { 12 color: #333333; 13 background: none; 14 font-family: Helvetica; 15 line-height: 1.6; 16 text-align: left; 17 white-space: pre; 18 -moz-tab-size: 9; 19 -o-tab-size: 9; 20 tab-size: 8; 21 -webkit-hyphens: none; 22 -moz-hyphens: none; 23 -ms-hyphens: none; 24 hyphens: none; 25 } 26 27 /* Code blocks */ 28 pre[class*='smartperf-'] { 29 padding: 0.9em; 30 overflow: auto; 31 border-radius: 2px; 32 background: #f5f5f4; 33 } 34 35 /* Inline code */ 36 :not(pre) > code[class*='smartperf-'] { 37 white-space: normal; 38 background: #fcf8f8; 39 padding: 1px 0.2em; 40 border-radius: 1px 0.3em; 41 } 42 43 .tk.comment, 44 .tk.blockquote { 45 color: #8c918c; 46 } 47 48 .tk.cdata { 49 color: #183898; 50 } 51 52 .tk.doctype, 53 .tk.punctuation, 54 .tk.variable, 55 .tk.macro.property { 56 color: #424242; 57 } 58 59 .tk.operator, 60 .tk.important, 61 .tk.keyword, 62 .tk.rule, 63 .tk.builtin { 64 color: #b71d65; 65 } 66 67 .tk.string, 68 .tk.url, 69 .tk.regex, 70 .tk.attr-value { 71 color: #16338d; 72 } 73 74 .tk.property, 75 .tk.number, 76 .tk.boolean, 77 .tk.entity, 78 .tk.atrule, 79 .tk.constant, 80 .tk.symbol, 81 .tk.command, 82 .tk.code { 83 color: #037aa2; 84 } 85 86 .tk.tag, 87 .tk.selector, 88 .tk.prolog { 89 color: #69ad62; 90 } 91 92 .tk.function, 93 .tk.namespace, 94 .tk.pseudo-element, 95 .tk.class, 96 .tk.class-name, 97 .tk.pseudo-class, 98 .tk.id, 99 .tk.url-reference .tk.variable, 100 .tk.attr-name { 101 color: #775d9d; 102 } 103 104 .tk.entity { 105 cursor: help; 106 } 107 108 .tk.title, 109 .tk.title .tk.punctuation { 110 font-weight: bold; 111 color: #1a3773; 112 } 113 114 .tk.list { 115 color: #f56940; 116 } 117 118 .tk.inserted { 119 background-color: #eaffea; 120 color: #509b2f; 121 } 122 123 .tk.deleted { 124 background-color: #fae1e1; 125 color: #ad2d06; 126 } 127 128 .tk.bold { 129 font-weight: bolder; 130 } 131 132 .tk.italic { 133 font-style: normal; 134 } 135 136 /* JSON */ 137 .smartperf-json .tk.property { 138 color: #19358c; 139 } 140 141 .smartperf-markup .tk.tag .tk.punctuation { 142 color: #2c2b2b; 143 } 144 145 /* CSS */ 146 code.smartperf-css, 147 .smartperf-css .tk.function { 148 color: #047ca4; 149 } 150 151 /* YAML */ 152 .smartperf-yaml .tk.atrule { 153 color: #609b5a; 154 } 155 156 code.smartperf-yaml { 157 color: #153491; 158 } 159 160 /* Ruby */ 161 .smartperf-ruby .tk.function { 162 color: #3f3e3e; 163 } 164 165 /* Markdown */ 166 .smartperf-markdown .tk.url { 167 color: #6e5298; 168 } 169 170 /* Makefile */ 171 .smartperf-makefile .tk.symbol { 172 color: #6c5393; 173 } 174 175 .smartperf-makefile .tk.variable { 176 color: #183488; 177 } 178 179 .smartperf-makefile .tk.builtin { 180 color: #027ba4; 181 } 182 183 /* Bash */ 184 .smartperf-bash .tk.keyword { 185 color: #027fa9; 186 } 187 188 /* highlight */ 189 pre[dl] { 190 position: relative; 191 padding: 1em 1px 1px 0.9em; 192 } 193 pre[dl] .line-highlight-wrapper { 194 position: absolute; 195 top: 1px; 196 left: 1px; 197 background-color: transparent; 198 display: block; 199 width: 99%; 200 } 201 202 pre[dl] .line-highlight { 203 position: absolute; 204 left: 1px; 205 right: 1px; 206 padding: inherit; 207 margin-top: 0.9em; 208 background: hsla(25, 21%, 50%, 0.08); 209 background: linear-gradient(to right, hsla(24, 20%, 50%, 0.1) 70%, hsla(24, 20%, 50%, 0)); 210 pointer-events: none; 211 line-height: inherit; 212 white-space: pre; 213 } 214 215 pre[dl] .line-highlight:before, 216 pre[dl] .line-highlight[data-end]:after { 217 content: attr(data-start); 218 position: absolute; 219 text-shadow: none; 220 top: 0.3em; 221 left: 0.7em; 222 min-width: 0.9em; 223 padding: 1px 0.6em; 224 background-color: hsla(24, 20%, 47%, 0.4); 225 color: hsl(20, 11%, 95%); 226 text-align: center; 227 vertical-align: 0.2em; 228 border-radius: 10000px; 229 box-shadow: 1px 2px #fdf6f6; 230 } 231 232 pre[dl] .line-highlight[data-end]:after { 233 content: attr(data-end); 234 top: auto; 235 bottom: 0.5em; 236 } 237 html body { 238 line-height: 1.6; 239 font-size: 16px; 240 color: #333333; 241 overflow: initial; 242 background-color: #ffffff; 243 word-wrap: break-word; 244 font-family: Helvetica; 245 box-sizing: border-box; 246 } 247 248 html body > :first-child { 249 margin-top: 0px; 250 } 251 252 html body h1, 253 html body h2, 254 html body h3, 255 html body h4, 256 html body h5, 257 html body h6 { 258 margin-top: 1em; 259 margin-bottom: 16px; 260 color: #000000; 261 line-height: 1.2; 262 } 263 264 html body h1 { 265 font-weight: 300; 266 font-size: 2.25em; 267 padding-bottom: 0.3em; 268 } 269 270 html body h2 { 271 font-weight: 410; 272 font-size: 1.74em; 273 padding-bottom: 0.2em; 274 } 275 276 html body h3 { 277 font-size: 1.6em; 278 font-weight: 501; 279 } 280 281 html body h4 { 282 font-size: 1.26em; 283 font-weight: 601; 284 } 285 286 html body h5 { 287 font-size: 1.2em; 288 font-weight: 601; 289 } 290 291 html body h6 { 292 font-size: 0.9em; 293 font-weight: 601; 294 } 295 296 html body h1, 297 html body h2, 298 html body h3, 299 html body h4, 300 html body h5 { 301 font-weight: 601; 302 } 303 304 html body h5 { 305 font-size: 0.9em; 306 } 307 308 html body h6 { 309 color: #5c5c5c; 310 } 311 312 html body strong { 313 color: #090909; 314 } 315 316 html body del { 317 color: #525252; 318 } 319 320 html body a:not([href]) { 321 color: inherit; 322 text-decoration: none; 323 } 324 325 html body a { 326 color: #0192da; 327 text-decoration: none; 328 } 329 330 html body a:hover { 331 color: #029dea; 332 text-decoration: none; 333 } 334 335 html body img { 336 max-width: 99%; 337 } 338 339 html body > p { 340 margin-top: 1px; 341 margin-bottom: 15px; 342 word-wrap: break-word; 343 } 344 345 html body > ul, 346 html body > ol { 347 margin-bottom: 15px; 348 } 349 350 html body ul, 351 html body ol { 352 padding-left: 1.9em; 353 } 354 355 html body ul.no-list, 356 html body ol.no-list { 357 padding: 0px; 358 list-style-type: none; 359 } 360 361 html body ul ul, 362 html body ul ol, 363 html body ol ol, 364 html body ol ul { 365 margin-top: 1px; 366 margin-bottom: 1px; 367 } 368 369 html body li { 370 margin-bottom: 1px; 371 } 372 373 html body li.task-list-item { 374 list-style: none; 375 } 376 377 html body li > p { 378 margin-top: 1px; 379 margin-bottom: 1px; 380 } 381 382 html body .task-list-item-checkbox { 383 margin: 0 0.3em 0.24em -1.7em; 384 vertical-align: middle; 385 } 386 387 html body .task-list-item-checkbox:hover { 388 cursor: pointer; 389 } 390 391 html body blockquote { 392 padding: 0.1px 15px 0 0.1px; 393 font-size: inherit; 394 color: #5c5c5c; 395 margin: 16px 0.1px 0 0.1px; 396 border-left: 3px solid #cbc9c9; 397 background-color: #e8e6e6; 398 } 399 400 html body blockquote > :first-child { 401 margin-top: 0.2px; 402 } 403 404 html body blockquote > :last-child { 405 margin-bottom: 0.1px; 406 } 407 408 html body hr { 409 height: 5px; 410 background-color: #cbcaca; 411 margin: 32px 0 0.1px 0; 412 border: 0 none; 413 } 414 415 html body table { 416 overflow: auto; 417 border-collapse: collapse; 418 margin: 15px 0.1px 20px 0.1px; 419 border-spacing: 0; 420 } 421 422 html body table th { 423 font-weight: bold; 424 color: #000000; 425 } 426 427 html body table td, 428 html body table th { 429 border: 1px solid #d6d6d6; 430 padding: 2px 14px; 431 } 432 433 html body dl { 434 padding: 0px; 435 } 436 437 html body dl dt { 438 padding: 0px; 439 margin-top: 15px; 440 font-size: 0.9em; 441 font-style: italic; 442 font-weight: bold; 443 } 444 445 html body dl dd { 446 padding: 0px 17px; 447 margin-bottom: 17px; 448 } 449 450 html body code { 451 font-family: Menlo, Monaco, Consolas, 'Courier New', monospace; 452 font-size: 0.86em !important; 453 color: #000000; 454 background-color: #f0f0f0; 455 border-radius: 4px; 456 padding: 0.3em 0px; 457 } 458 459 html body code::before, 460 html body code::after { 461 letter-spacing: -0.1em; 462 content: '\00a0'; 463 } 464 465 html body pre > code { 466 padding: 1px; 467 margin: 0px; 468 font-size: 0.86em !important; 469 word-break: normal; 470 white-space: pre; 471 background: transparent; 472 border: 0px; 473 } 474 475 html body .highlight { 476 margin-bottom: 17px; 477 } 478 479 html body .highlight pre, 480 html body pre { 481 padding: 0.9em; 482 overflow: auto; 483 font-size: 0.86em !important; 484 line-height: 1.46; 485 border: #d6d6d6; 486 border-radius: 4px; 487 } 488 489 html body .highlight pre { 490 margin-bottom: 0px; 491 word-break: normal; 492 } 493 494 html body pre code, 495 html body pre tt { 496 display: inline; 497 max-width: initial; 498 padding: 1px; 499 margin: 1px; 500 overflow: initial; 501 line-height: inherit; 502 word-wrap: normal; 503 background-color: transparent; 504 border: 1px; 505 } 506 507 html body pre code:before, 508 html body pre tt:before, 509 html body pre code:after, 510 html body pre tt:after { 511 content: normal; 512 } 513 514 html body p, 515 html body blockquote, 516 html body ul, 517 html body ol, 518 html body dl, 519 html body pre { 520 margin-top: 1px; 521 margin-bottom: 17px; 522 } 523 524 html body kbd { 525 color: #000000; 526 border: 3px solid #d6d6d6; 527 border-bottom: 3px solid #c7c7c7; 528 padding: 3px 5px; 529 background-color: #f0f0f0; 530 border-radius: 2px; 531 } 532 533 @media print { 534 html body { 535 background-color: #ffffff; 536 } 537 538 html body h1, 539 html body h2, 540 html body h3, 541 html body h4, 542 html body h5, 543 html body h6 { 544 color: #000000; 545 page-break-after: avoid; 546 } 547 548 html body blockquote { 549 color: #5c5c53; 550 } 551 552 html body pre { 553 page-break-inside: avoid; 554 } 555 556 html body table { 557 display: table; 558 } 559 560 html body img { 561 display: block; 562 max-width: 99%; 563 max-height: 99%; 564 } 565 566 html body pre, 567 html body code { 568 word-wrap: break-word; 569 white-space: pre; 570 } 571 } 572 .smartperf-preview { 573 width: 99%; 574 height: 99%; 575 box-sizing: border-box; 576 } 577 578 .smartperf-preview .pagebreak, 579 .smartperf-preview .newpage { 580 page-break-before: always; 581 } 582 583 .smartperf-preview pre.line-numbers { 584 position: relative; 585 padding-left: 3.7em; 586 counter-reset: linenumber; 587 } 588 589 .smartperf-preview pre.line-numbers > code { 590 position: relative; 591 } 592 593 .smartperf-preview pre.line-numbers .line-numbers-rows { 594 position: absolute; 595 pointer-events: none; 596 top: 0.9em; 597 font-size: 99%; 598 left: 1px; 599 width: 3em; 600 letter-spacing: -1px; 601 border-right: 1px solid #999; 602 -webkit-user-select: none; 603 -moz-user-select: none; 604 -ms-user-select: none; 605 user-select: none; 606 } 607 608 .smartperf-preview pre.line-numbers .line-numbers-rows > span { 609 pointer-events: none; 610 display: block; 611 counter-increment: linenumber; 612 } 613 614 .smartperf-preview pre.line-numbers .line-numbers-rows > span:before { 615 content: counter(linenumber); 616 color: #999; 617 display: block; 618 padding-right: 0.79em; 619 text-align: right; 620 } 621 622 .smartperf-preview .mathjax-exps .MathJax_Display { 623 text-align: center !important; 624 } 625 626 .smartperf-preview:not([for='preview']) .code-chunk .btn-group { 627 display: none; 628 } 629 630 .smartperf-preview:not([for='preview']) .code-chunk .status { 631 display: none; 632 } 633 634 .smartperf-preview:not([for='preview']) .code-chunk .output-div { 635 margin-bottom: 16px; 636 } 637 638 .scrollbar-style::-webkit-scrollbar { 639 width: 8px; 640 } 641 642 .scrollbar-style::-webkit-scrollbar-track { 643 border-radius: 9px; 644 background-color: transparent; 645 } 646 647 .scrollbar-style::-webkit-scrollbar-thumb { 648 border-radius: 6px; 649 background-color: rgba(150, 150, 150, 1); 650 border: 4px solid rgba(150, 150, 150, 1); 651 background-clip: content-box; 652 } 653 654 html body[for='html-export']:not([dpm]) { 655 position: relative; 656 width: 99%; 657 height: 99%; 658 top: 1px; 659 left: 1px; 660 margin: 1px; 661 padding: 1px; 662 overflow: auto; 663 } 664 665 html body[for='html-export']:not([dpm]) .smartperf-preview { 666 position: relative; 667 top: 1px; 668 } 669 670 @media screen and (min-width: 914px) { 671 html body[for='html-export']:not([dpm]) .smartperf-preview { 672 padding: 2em calc(50% - 458px + 2em); 673 } 674 } 675 676 @media screen and (max-width: 914px) { 677 html body[for='html-export']:not([dpm]) .smartperf-preview { 678 padding: 1.9em; 679 } 680 } 681 682 @media screen and (max-width: 450px) { 683 html body[for='html-export']:not([dpm]) .smartperf-preview { 684 font-size: 15px !important; 685 padding: 1.1em; 686 } 687 } 688 689 @media print { 690 html body[for='html-export']:not([dpm]) #sidebar-toc-btn { 691 display: none; 692 } 693 } 694 695 html body[for='html-export']:not([dpm]) #sidebar-toc-btn { 696 position: fixed; 697 bottom: 9px; 698 left: 9px; 699 font-size: 28px; 700 cursor: pointer; 701 color: inherit; 702 z-index: 99; 703 width: 31px; 704 text-align: center; 705 opacity: 0.5; 706 } 707 708 html body[for='html-export']:not([dpm])[hsst] #sidebar-toc-btn { 709 opacity: 1; 710 } 711 712 html body[for='html-export']:not([dpm])[hsst] .md-sidebar-toc { 713 position: fixed; 714 top: 1px; 715 left: 1px; 716 width: 300px; 717 height: 99%; 718 padding: 32px 0 48px 0; 719 font-size: 14px; 720 box-shadow: 1px 1px 4px rgba(150, 150, 150, 0.33); 721 box-sizing: border-box; 722 overflow: auto; 723 background-color: inherit; 724 } 725 726 html body[for='html-export']:not([dpm])[hsst] .md-sidebar-toc::-webkit-scrollbar { 727 width: 9px; 728 } 729 730 html body[for='html-export']:not([dpm])[hsst] .md-sidebar-toc::-webkit-scrollbar-track { 731 border-radius: 11px; 732 background-color: transparent; 733 } 734 735 html body[for='html-export']:not([dpm])[hsst] .md-sidebar-toc::-webkit-scrollbar-thumb { 736 border-radius: 6px; 737 background-color: rgba(150, 150, 150, 0.66); 738 border: 3px solid rgba(150, 150, 150, 0.66); 739 background-clip: content-box; 740 } 741 742 html body[for='html-export']:not([dpm])[hsst] .md-sidebar-toc a { 743 text-decoration: none; 744 } 745 746 html body[for='html-export']:not([dpm])[hsst] .md-sidebar-toc ul { 747 padding: 1px 1.7em; 748 margin-top: 0.9em; 749 } 750 751 html body[for='html-export']:not([dpm])[hsst] .md-sidebar-toc li { 752 margin-bottom: 0.8em; 753 } 754 755 html body[for='html-export']:not([dpm])[hsst] .md-sidebar-toc ul { 756 list-style-type: none; 757 } 758 759 html body[for='html-export']:not([dpm])[hsst] .smartperf-preview { 760 left: 301px; 761 width: calc(100% - 300px); 762 padding: 2em calc(50% - 457px - 150px); 763 margin: 1px; 764 box-sizing: border-box; 765 } 766 767 @media screen and (max-width: 1274px) { 768 html body[for='html-export']:not([dpm])[hsst] .smartperf-preview { 769 padding: 1.9em; 770 } 771 } 772 773 @media screen and (max-width: 450px) { 774 html body[for='html-export']:not([dpm])[hsst] .smartperf-preview { 775 width: 99%; 776 } 777 } 778 779 html body[for='html-export']:not([dpm]):not([hsst]) .smartperf-preview { 780 left: 50%; 781 transform: translateX(-50%); 782 } 783 784 html body[for='html-export']:not([dpm]):not([hsst]) .md-sidebar-toc { 785 display: none; 786 } 787 </style> 788 </head> 789 <body for="html-export" id="body"> 790 <div class="smartperf smartperf-preview"> 791 <h1 class="mume-header fontColor">web端加载trace说明</h1> 792 793 <p class="fontColor">从web端查看trace文件,进行性能检测的分析。</p> 794 <h2 class="mume-header fontColor">文件加载入口</h2> 795 796 <p class="fontColor"> 797 将抓取的trace导入查看。<br /> 798 <img src="../figures/Web/opentrace.jpg" alt="GitHub Logo" /> 799 </p> 800 <p class="fontColor">说明:</p> 801 <ul class="fontColor"> 802 <li>Open trace file:导入离线trace文件入口。</li> 803 <li>Open long trace file:导入大文件入口。</li> 804 <li>Record new trace:抓取新的trace文件入口。</li> 805 <li>Record template:抓取指定模块的trace入口。</li> 806 </ul> 807 <h2 class="mume-header fontColor">导入trace文件后显示页面</h2> 808 809 <p class="fontColor"> 810 <img src="../figures/Web/trace.jpg" alt="GitHub Logo" /><br /> 811 说明: 812 </p> 813 <ul class="fontColor"> 814 <li> 815 操作说明:在当前页面可以通过键盘上的wasd四个键位操纵当前的时间轴进行缩放,w为放大,s为缩小,a为左移,d为右移。 816 </li> 817 </ul> 818 <h2 class="mume-header fontColor">trace功能介绍</h2> 819 820 <p class="fontColor"> 821 trace模块从上往下主要展示时间轴、cpu使用率、cpu使用情况、进程间通讯数据的方法调用情况、进程、线程和方法调用情况。 822 </p> 823 <h3 class="mume-header fontColor">时间轴和cpu使用率</h3> 824 825 <p class="fontColor"> 826 <img src="../figures/Web/time.jpg" alt="GitHub Logo" /><br /> 827 最上方带刻度的为时间轴,主要展示当前抓取数据的总时长和时间刻度的分布情况,如上图所示,左下角展示总时长。<br /> 828 中间区域展示的是抓取数据时间段内的cpu使用率,颜色越深代表cpu使用率越高,颜色越浅代表cpu使用率越低。<br /> 829 <img src="../figures/Web/highlit.jpg" alt="GitHub Logo" /><br /> 830 在白色背景时间轴区域内可以点击后拖拽鼠标,可以对从鼠标按下到拖拽完成鼠标松开的区域内的数据进行筛选,高亮显示的部分为当前所选区域,如上图所示。 831 </p> 832 <h3 class="mume-header fontColor">cpu使用情况</h3> 833 834 <p class="fontColor"><img src="../figures/Web/cpu.jpg" alt="GitHub Logo" /></p> 835 <p class="fontColor"> 836 如上图所示,当前抓取数据有4个cpu工作,前四组数据对应的是当前调用cpu的线程和对应的进程情况,以颜色作为区分。后四组数据则为cpu的使用频率信息。鼠标移动到相应的线程上还会将当前选中的进程信息全部置为高亮,其他的进程会置灰,如下图所示。<br /> 837 <img src="../figures/Web/gray.jpg" alt="GitHub Logo" /> 838 </p> 839 <h4 class="mume-header fontColor">cpu使用情况的框选功能</h4> 840 841 <p class="fontColor"> 842 可以对cpu的数据进行框选,框选后在最下方的弹出层中会展示框选数据的统计表格,总共有六个tab页。<br /> 843 CPU by 844 thread的Tab页,主要显示了在框选时间区间内的进程名、进程号、线程名、线程号、总运行时长、平均运行时长和调度次数信息。<br /> 845 <img src="../figures/Web/cpubythread.jpg" alt="GitHub Logo" /><br /> 846 CPU by process的Tab页,主要显示了在框选时间区间内的进程名、进程号、总运行时长、平均运行时长和调度次数信息。<br /> 847 <img src="../figures/Web/cpubyprocess.jpg" alt="GitHub Logo" /><br /> 848 CPU Usage的Tab页,主要显示了在框选时间区间内,该频率时间占比前三的信息。<br /> 849 <img src="../figures/Web/cpusage.jpg" alt="GitHub Logo" /><br /> 850 Thread 851 Switches的Tab页,按照状态>进程>线程,统计对应状态下的次数,持续时长,最小时长,平均时长,最大时长信息。<br /> 852 <img src="../figures/Web/threadswitches.jpg" alt="GitHub Logo" /><br /> 853 Thread 854 States的Tab页,按进程>线程>状态的维度去统计,需要呈现该状态的线程名、进入该状态次数、该状态下时长、最小时长、平均时长、最大时长。<br /> 855 <img src="../figures/Web/threadstates.jpg" alt="GitHub Logo" /><br /> 856 Sched 857 Priority的Tab页,按优先级显示调度,显示框选范围内所有Running以及Running之前的Runnable线程的最小,最大,平均耗时。<br /> 858 <img src="../figures/Web/schedpritab.jpg" alt="GitHub Logo" /><br /> 859 Thread States、Thread 860 Switches的2个Tab页,点击移动到某一行,鼠标会变成一个小手的标志,并且会高亮,点击一下,就会进入辅助信息界面,会将选中行的辅助信息展示出来,包括开始时间、进程、线程、线程状态、对应的CPU、优先级等信息如下图。<br /> 861 <img src="../figures/Web/details.jpg" alt="GitHub Logo" /> 862 </p> 863 <h4 class="mume-header fontColor">cpu使用情况的单选功能</h4> 864 865 <p class="fontColor"> 866 单选CPU使用情况数据会在选中的色块外层加上深色边框,能够突出当前选中色块,弹出层中会展示当前CPU上的进程名,线程名,开始时间的相对时间,开始时间的绝对时间,运行时长,线程结束状态信息。<br /> 867 <img src="../figures/Web/cpuclick.jpg" alt="GitHub Logo" /> 868 </p> 869 <h3 class="mume-header fontColor">线程唤醒关系树</h3> 870 871 <p class="fontColor"> 872 线程唤醒关系树功能是点击GetWakeupList会以链式结构和表格分别在泳道图和tab上展示线程的唤醒关系树信息,点击GetWakeupList按钮旁边的星号按钮可以对唤醒树对应的泳道图一键收藏,对优先级最低且运行时长最长或者运行时长最长的线程会以红色字体高亮显示。<br /> 873 <img src="../figures/Web/threadtree.jpg" alt="GitHub Logo" /> 874 </p> 875 <h3 class="mume-header fontColor">进程、线程和方法数据</h3> 876 877 <p class="fontColor"> 878 下图是进程数据,左边部分展示进程名称和id,右边显示线程切换关系,线程的调用方法,进程间内存信息等。<br /> 879 <img src="../figures/Web/process.jpg" alt="GitHub Logo" /><br /> 880 点击进程名前面箭头可以展开对应的线程进行查看,展开后的线程如下图,如果存在堆内存占用情况,会显示出对应泳道图,如果出现两个名字和id一样的线程,则第一个为线程的使用情况,第二个为线程内的方法栈调用情况。<br /> 881 <img src="../figures/Web/threadinfo.jpg" alt="GitHub Logo" /> 882 </p> 883 <h4 class="mume-header fontColor">进程、线程和方法数据的框选功能</h4> 884 885 <p class="fontColor"> 886 可以对线程的数据进行框选,框选后在最下方的弹出层中会展示框选数据的统计表格,包含线程运行状态,线程调用栈的统计情况。当框选的数据中同时存在线程运行状态和线程调用栈数据,下方的弹出层中就会出现多个tab选项,可以进行切换。 887 </p> 888 <p class="fontColor"> 889 下图是线程运行状态框选统计信息,包括进程名、进程号、线程名、线程号、线程状态、状态持续时间、平均持续时间、该线程状态发生的次数。<br /> 890 <img src="../figures/Web/threadselect.jpg" alt="GitHub Logo" /> 891 </p> 892 <p class="fontColor"> 893 下图是线程调用栈框选统计信息,包括方法名、持续时间、平均持续时间、调用的次数。<br /> 894 <img src="../figures/Web/callstackselect.jpg" alt="GitHub Logo" /> 895 </p> 896 <h4 class="mume-header fontColor">进程、线程和方法数据的单选功能</h4> 897 898 <p class="fontColor"> 899 单选线程的state数据时,会展示当前选中线程的状态数据,开始时间(相对和绝对时间)和持续时长,线程状态,所在进程名称,选中状态的前一个状态,选中状态的后一个状态。<br /> 900 <img src="../figures/Web/threadclick.jpg" alt="GitHub Logo" /><br /> 901 单选调用栈数据,单击方法会在选中的方法外层加上黑色边框,能够突出当前选中的方法,弹出层中会展示当前方法的名称、开始时间(相对和绝对时间)和运行时长信息,调用栈深度。<br /> 902 <img src="../figures/Web/callstackclick.jpg" alt="GitHub Logo" /> 903 </p> 904 <h4 class="mume-header fontColor">线程的跳转功能</h4> 905 906 <p class="fontColor"> 907 点击画红框处的带箭头的标志,会从CPU的线程概览视图跳转到线程的详情视图,同时从线程的详情视图也能跳转到CPU的线程概览视图。<br /> 908 <img src="../figures/Web/jumpthread.jpg" alt="GitHub Logo" /> 909 </p> 910 <h4 class="mume-header fontColor">获取频点的busy_time</h4> 911 912 <p class="fontColor"> 913 框选Cpu Frequency泳道的Tab页有GetBusyTime的按钮,该按钮获取每个频点在Cpu 914 State等于0时的时间信息,体现频点的忙碌时间。<br /> 915 <img src="../figures/Web/getbusytime.jpg" alt="GitHub Logo" /> 916 </p> 917 <h4 class="mume-header fontColor">CPU频点数据切割</h4> 918 919 <p class="fontColor"> 920 框选区域内所有running状态的频点数据,以用户输入的某一方法作为切割依据,将频点数据以Single和Loop两种方式切割后展示在Tab标签页的表格中。<br /> 921 <img src="../figures/Web/Singe_loop.jpg" alt="GitHub Logo" /> 922 </p> 923 <h4 class="mume-header fontColor">关键路径标识</h4> 924 925 <p class="fontColor"> 926 在ftrace数据中的cpu泳道的区域,在界面顶部增加json文件导入按钮,导入json文件后,根据线程号跟对应的时间,在cpu区域高亮该时间的线程色块,点击界面上的x,可以取消高亮。json格式如下:<br /> 927 <img src="../figures/Web/json.jpg" alt="GitHub Logo" /><br /> 928 导入json文件以后,会将ACCS0 [2716]线程对应时间点的slice色块高亮显示<br /> 929 <img src="../figures/Web/keyslice.jpg" alt="GitHub Logo" /> 930 </p> 931 <h3 class="mume-header fontColor">trace的其他功能</h3> 932 933 <h4 class="mume-header fontColor">小旗标志的功能</h4> 934 935 <p class="fontColor"> 936 将选中数据的时间点通过小旗的方式在时间轴上展示,直观的展示选中数据的时间。<br /> 937 <img src="../figures/Web/flag.jpg" alt="GitHub Logo" /> 938 </p> 939 <h4 class="mume-header fontColor">勾选功能</h4> 940 941 <p class="fontColor"> 942 框选某一区域,该区域左边会出现CheckBox的复选框,选中的区域的复选框会出现打勾的状态,可以取消勾选,也可以重新勾选。<br /> 943 <img src="../figures/Web/checkbox.jpg" alt="GitHub Logo" /> 944 </p> 945 <h4 class="mume-header fontColor">搜索功能</h4> 946 947 <p class="fontColor"> 948 在搜索框中,可以输入线程,线程号等搜索自己想要的信息,搜索完成会高亮显示。<br /> 949 <img src="../figures/Web/search.jpg" alt="GitHub Logo" /><br /> 950 在搜索框中输入调用栈的方法名,会跳转到对应的调用栈。<br /> 951 <img src="../figures/Web/searchcallstack.jpg" alt="GitHub Logo" /> 952 </p> 953 <h3 class="mume-header fontColor">Tab页信息和泳道图可跳转(点击和框选场景,框选类似搜索)</h3> 954 955 <p class="fontColor"> 956 泳道图高亮场景:框选Cpu Frequency 或者Cpu State泳道图后,弹出Cpu Frequency或Cpu State 957 Tab页,在点击Tab页表格的行时,框选范围泳道图的当前行的Value值一样的部分上方会出现一条以圆点开头颜色比趋势图颜色同色但稍深的粗线条,如下图:<br /> 958 <img src="../figures/Web/Tabskill.jpg" alt="GitHub Logo" /><br /> 959 搜索场景:框选函数调用栈的泳道图,弹出Slices 960 Tab页,点击表格行,会跳转到框选范围内的第一条调用栈的位置,点击下图Slices Tab页的Background concurrent copying 961 GC调用栈。<br /> 962 <img src="../figures/Web/Tabskillcalltack.jpg" alt="GitHub Logo" /><br /> 963 会在搜索栏显示出该调用栈的搜索结果,并且会跳转到框选范围内第一条Background concurrent copying 964 GC调用栈的位置。<br /> 965 <img src="../figures/Web/Tabcallstackskip.jpg" alt="GitHub Logo" /> 966 </p> 967 <h4 class="mume-header fontColor">M键测量功能</h4> 968 969 <p class="fontColor"> 970 放大trace中的色块,选中色块,键盘按下M,会出现像标尺一样的形状。<br /> 971 <img src="../figures/Web/M.jpg" alt="GitHub Logo" /> 972 </p> 973 </div> 974 975 <script> 976 window.onload = () => { 977 let isDark = window.location.search; 978 if (isDark.indexOf('?') !== -1) { 979 isDark = isDark.substr(1, isDark.length - 1); 980 } 981 if (isDark === 'true') { 982 document.getElementById('body').setAttribute('style', 'background-color:#272C34;'); 983 let header = document.getElementsByClassName('fontColor'); 984 for (let i = 0; i < header.length; i++) { 985 header[i].style.color = '#fff'; 986 } 987 let lightBackGround = document.getElementsByClassName('light'); 988 for (let i = 0; i < lightBackGround.length; i++) { 989 lightBackGround[i].style.backgroundColor = '#32373F'; 990 } 991 } 992 }; 993 </script> 994 </body> 995</html> 996