=============================================================================== 400039d8 : /* * rtems_cpu_usage_reset */ void rtems_cpu_usage_reset( void ) { 400039d8: 9d e3 bf a0 save %sp, -96, %sp 400039dc: 40 00 18 1e call 40009a54 <_Timecounter_Sbinuptime> 400039e0: 3b 10 00 57 sethi %hi(0x40015c00), %i5 uint32_t cpu_count; uint32_t cpu_index; _TOD_Get_uptime( &CPU_usage_Uptime_at_last_reset ); cpu_count = rtems_get_processor_count(); 400039e4: 40 00 0f 48 call 40007704 400039e8: d0 3f 63 88 std %o0, [ %i5 + 0x388 ] ! 40015f88 for ( cpu_index = 0 ; cpu_index < cpu_count ; ++cpu_index ) { 400039ec: 80 a2 20 00 cmp %o0, 0 400039f0: 02 80 00 0a be 40003a18 <== NEVER TAKEN 400039f4: 03 10 00 57 sethi %hi(0x40015c00), %g1 Per_CPU_Control *cpu = _Per_CPU_Get_by_index( cpu_index ); cpu->cpu_usage_timestamp = CPU_usage_Uptime_at_last_reset; 400039f8: f8 1f 63 88 ldd [ %i5 + 0x388 ], %i4 for ( cpu_index = 0 ; cpu_index < cpu_count ; ++cpu_index ) { 400039fc: 84 10 20 00 clr %g2 40003a00: 82 10 62 a8 or %g1, 0x2a8, %g1 cpu->cpu_usage_timestamp = CPU_usage_Uptime_at_last_reset; 40003a04: f8 38 40 00 std %i4, [ %g1 ] for ( cpu_index = 0 ; cpu_index < cpu_count ; ++cpu_index ) { 40003a08: 84 00 a0 01 inc %g2 40003a0c: 80 a2 00 02 cmp %o0, %g2 40003a10: 12 bf ff fd bne 40003a04 <== NEVER TAKEN 40003a14: 82 00 60 50 add %g1, 0x50, %g1 } rtems_task_iterate(CPU_usage_Per_thread_handler, NULL); 40003a18: 31 10 00 0e sethi %hi(0x40003800), %i0 40003a1c: b2 10 20 00 clr %i1 40003a20: 40 00 0f ed call 400079d4 40003a24: 91 ee 21 bc restore %i0, 0x1bc, %o0 =============================================================================== 40004998 : void rtems_cpu_usage_top (void) { 40004998: 9d e3 bf 98 save %sp, -104, %sp <== NOT EXECUTED rtems_printer printer; rtems_print_printer_printk (&printer); 4000499c: 40 00 09 3b call 40006e88 <== NOT EXECUTED 400049a0: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED rtems_cpu_usage_top_with_plugin (&printer); 400049a4: 7f ff ff 47 call 400046c0 <== NOT EXECUTED 400049a8: 90 07 bf f8 add %fp, -8, %o0 <== NOT EXECUTED } 400049ac: 81 c7 e0 08 ret <== NOT EXECUTED 400049b0: 81 e8 00 00 restore <== NOT EXECUTED =============================================================================== 400046c0 : void rtems_cpu_usage_top_with_plugin( const rtems_printer *printer ) { 400046c0: 9d e3 bf 18 save %sp, -232, %sp <== NOT EXECUTED rtems_name name; rtems_id id; rtems_cpu_usage_data data; int show_lines = 25; memset(&data, 0, sizeof(data)); 400046c4: 94 10 20 80 mov 0x80, %o2 <== NOT EXECUTED 400046c8: 92 10 20 00 clr %o1 <== NOT EXECUTED 400046cc: 40 00 41 24 call 40014b5c <== NOT EXECUTED 400046d0: 90 07 bf 80 add %fp, -128, %o0 <== NOT EXECUTED data.thread_run = true; 400046d4: 82 10 20 01 mov 1, %g1 <== NOT EXECUTED 400046d8: c2 2f bf 80 stb %g1, [ %fp + -128 ] <== NOT EXECUTED data.sort_order = RTEMS_TOP_SORT_CURRENT; data.poll_rate_usecs = 3000; data.show = show_lines; data.printer = printer; sc = rtems_task_set_priority (RTEMS_SELF, RTEMS_CURRENT_PRIORITY, &priority); 400046dc: 94 07 bf 78 add %fp, -136, %o2 <== NOT EXECUTED data.single_page = true; 400046e0: c2 2f bf 82 stb %g1, [ %fp + -126 ] <== NOT EXECUTED data.sort_order = RTEMS_TOP_SORT_CURRENT; 400046e4: 82 10 20 04 mov 4, %g1 <== NOT EXECUTED 400046e8: c2 27 bf 84 st %g1, [ %fp + -124 ] <== NOT EXECUTED data.poll_rate_usecs = 3000; 400046ec: 82 10 2b b8 mov 0xbb8, %g1 <== NOT EXECUTED 400046f0: c2 27 bf 88 st %g1, [ %fp + -120 ] <== NOT EXECUTED data.show = show_lines; 400046f4: 82 10 20 19 mov 0x19, %g1 <== NOT EXECUTED data.printer = printer; 400046f8: f0 27 bf 90 st %i0, [ %fp + -112 ] <== NOT EXECUTED sc = rtems_task_set_priority (RTEMS_SELF, RTEMS_CURRENT_PRIORITY, &priority); 400046fc: 92 10 20 00 clr %o1 <== NOT EXECUTED data.show = show_lines; 40004700: c2 27 bf 8c st %g1, [ %fp + -116 ] <== NOT EXECUTED sc = rtems_task_set_priority (RTEMS_SELF, RTEMS_CURRENT_PRIORITY, &priority); 40004704: 40 00 1b 47 call 4000b420 <== NOT EXECUTED 40004708: 90 10 20 00 clr %o0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 4000470c: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004710: 12 80 00 39 bne 400047f4 <== NOT EXECUTED 40004714: d2 07 bf 78 ld [ %fp + -136 ], %o1 <== NOT EXECUTED return; } name = rtems_build_name('C', 'P', 'l', 't'); sc = rtems_task_create (name, priority, 4 * 1024, 40004718: 9a 07 bf 7c add %fp, -132, %o5 <== NOT EXECUTED 4000471c: 98 10 26 00 mov 0x600, %o4 <== NOT EXECUTED 40004720: 96 10 20 00 clr %o3 <== NOT EXECUTED 40004724: 15 00 00 04 sethi %hi(0x1000), %o2 <== NOT EXECUTED 40004728: 11 10 d4 1b sethi %hi(0x43506c00), %o0 <== NOT EXECUTED 4000472c: 40 00 1a 85 call 4000b140 <== NOT EXECUTED 40004730: 90 12 20 74 or %o0, 0x74, %o0 ! 43506c74 <== NOT EXECUTED RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, RTEMS_PREEMPT | RTEMS_TIMESLICE | RTEMS_NO_ASR, &id); if (sc != RTEMS_SUCCESSFUL) 40004734: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 40004738: 12 80 00 26 bne 400047d0 <== NOT EXECUTED 4000473c: 94 07 bf 80 add %fp, -128, %o2 <== NOT EXECUTED rtems_printf (printer, "error: cannot create helper thread: %s\n", rtems_status_text (sc)); return; } sc = rtems_task_start (id, rtems_cpuusage_top_thread, (rtems_task_argument) &data); 40004740: d0 07 bf 7c ld [ %fp + -132 ], %o0 <== NOT EXECUTED 40004744: 13 10 00 0f sethi %hi(0x40003c00), %o1 <== NOT EXECUTED int show_lines = 25; 40004748: ba 10 20 19 mov 0x19, %i5 <== NOT EXECUTED sc = rtems_task_start (id, rtems_cpuusage_top_thread, (rtems_task_argument) &data); 4000474c: 92 12 62 0c or %o1, 0x20c, %o1 <== NOT EXECUTED 40004750: 40 00 1b 9f call 4000b5cc <== NOT EXECUTED 40004754: b8 10 20 04 mov 4, %i4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 40004758: 80 a2 20 00 cmp %o0, 0 <== NOT EXECUTED 4000475c: 12 80 00 76 bne 40004934 <== NOT EXECUTED 40004760: 01 00 00 00 nop <== NOT EXECUTED return; } while (true) { int c = getchar (); 40004764: 40 00 40 34 call 40014834 <== NOT EXECUTED 40004768: 01 00 00 00 nop <== NOT EXECUTED if ((c == '\r') || (c == '\n') || (c == 'q') || (c == 'Q')) 4000476c: 80 a2 20 0d cmp %o0, 0xd <== NOT EXECUTED 40004770: 02 80 00 3f be 4000486c <== NOT EXECUTED 40004774: 80 a2 20 0a cmp %o0, 0xa <== NOT EXECUTED 40004778: 02 80 00 3d be 4000486c <== NOT EXECUTED 4000477c: 82 0a 3f df and %o0, -33, %g1 <== NOT EXECUTED 40004780: 80 a0 60 51 cmp %g1, 0x51 <== NOT EXECUTED 40004784: 02 80 00 3a be 4000486c <== NOT EXECUTED 40004788: 80 a2 20 3c cmp %o0, 0x3c <== NOT EXECUTED rtems_task_wake_after (RTEMS_MICROSECONDS_TO_TICKS (100000)); rtems_printf (printer, "load monitoring stopped.\n"); return; } else if (c == '<') 4000478c: 02 80 00 23 be 40004818 <== NOT EXECUTED 40004790: 80 a2 20 3e cmp %o0, 0x3e <== NOT EXECUTED data.sort_order = RTEMS_TOP_SORT_MAX; else --data.sort_order; rtems_event_send(id, RTEMS_EVENT_1); } else if (c == '>') 40004794: 02 80 00 2a be 4000483c <== NOT EXECUTED 40004798: 80 a0 60 53 cmp %g1, 0x53 <== NOT EXECUTED data.sort_order = 0; else ++data.sort_order; rtems_event_send(id, RTEMS_EVENT_1); } else if ((c == 's') || (c == 'S')) 4000479c: 02 80 00 5b be 40004908 <== NOT EXECUTED 400047a0: 80 a0 60 41 cmp %g1, 0x41 <== NOT EXECUTED { data.single_page = !data.single_page; rtems_event_send(id, RTEMS_EVENT_1); } else if ((c == 'a') || (c == 'A')) 400047a4: 02 80 00 4d be 400048d8 <== NOT EXECUTED 400047a8: 80 a2 20 2b cmp %o0, 0x2b <== NOT EXECUTED data.show = show_lines; else data.show = 0; rtems_event_send(id, RTEMS_EVENT_1); } else if (c == '+') 400047ac: 02 80 00 6d be 40004960 <== NOT EXECUTED 400047b0: 80 a2 20 2d cmp %o0, 0x2d <== NOT EXECUTED { ++show_lines; if (data.show != 0) data.show = show_lines; } else if (c == '-') 400047b4: 02 80 00 71 be 40004978 <== NOT EXECUTED 400047b8: 80 a2 20 20 cmp %o0, 0x20 <== NOT EXECUTED if (show_lines > 5) --show_lines; if (data.show != 0) data.show = show_lines; } else if (c == ' ') 400047bc: 12 bf ff ea bne 40004764 <== NOT EXECUTED 400047c0: d0 07 bf 7c ld [ %fp + -132 ], %o0 <== NOT EXECUTED { rtems_event_send(id, RTEMS_EVENT_1); 400047c4: 40 00 19 c8 call 4000aee4 <== NOT EXECUTED 400047c8: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 400047cc: 30 bf ff e6 b,a 40004764 <== NOT EXECUTED rtems_printf (printer, 400047d0: 40 00 1a 31 call 4000b094 <== NOT EXECUTED 400047d4: 01 00 00 00 nop <== NOT EXECUTED 400047d8: 13 10 00 77 sethi %hi(0x4001dc00), %o1 <== NOT EXECUTED 400047dc: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 400047e0: 92 12 61 d0 or %o1, 0x1d0, %o1 <== NOT EXECUTED 400047e4: 40 00 09 bd call 40006ed8 <== NOT EXECUTED 400047e8: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return; 400047ec: 81 c7 e0 08 ret <== NOT EXECUTED 400047f0: 81 e8 00 00 restore <== NOT EXECUTED rtems_printf (printer, 400047f4: 40 00 1a 28 call 4000b094 <== NOT EXECUTED 400047f8: 01 00 00 00 nop <== NOT EXECUTED 400047fc: 13 10 00 77 sethi %hi(0x4001dc00), %o1 <== NOT EXECUTED 40004800: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40004804: 92 12 61 a0 or %o1, 0x1a0, %o1 <== NOT EXECUTED 40004808: 40 00 09 b4 call 40006ed8 <== NOT EXECUTED 4000480c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED return; 40004810: 81 c7 e0 08 ret <== NOT EXECUTED 40004814: 81 e8 00 00 restore <== NOT EXECUTED if (data.sort_order == 0) 40004818: c2 07 bf 84 ld [ %fp + -124 ], %g1 <== NOT EXECUTED 4000481c: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004820: 12 80 00 0e bne 40004858 <== NOT EXECUTED 40004824: 01 00 00 00 nop <== NOT EXECUTED data.sort_order = RTEMS_TOP_SORT_MAX; 40004828: f8 27 bf 84 st %i4, [ %fp + -124 ] <== NOT EXECUTED rtems_event_send(id, RTEMS_EVENT_1); 4000482c: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED 40004830: 40 00 19 ad call 4000aee4 <== NOT EXECUTED 40004834: d0 07 bf 7c ld [ %fp + -132 ], %o0 <== NOT EXECUTED 40004838: 30 bf ff cb b,a 40004764 <== NOT EXECUTED if (data.sort_order >= RTEMS_TOP_SORT_MAX) 4000483c: c2 07 bf 84 ld [ %fp + -124 ], %g1 <== NOT EXECUTED 40004840: 80 a0 60 03 cmp %g1, 3 <== NOT EXECUTED 40004844: 08 80 00 2c bleu 400048f4 <== NOT EXECUTED 40004848: 01 00 00 00 nop <== NOT EXECUTED data.sort_order = 0; 4000484c: c0 27 bf 84 clr [ %fp + -124 ] <== NOT EXECUTED 40004850: 10 bf ff f8 b 40004830 <== NOT EXECUTED 40004854: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED --data.sort_order; 40004858: c2 07 bf 84 ld [ %fp + -124 ], %g1 <== NOT EXECUTED 4000485c: 82 00 7f ff add %g1, -1, %g1 <== NOT EXECUTED 40004860: c2 27 bf 84 st %g1, [ %fp + -124 ] <== NOT EXECUTED rtems_event_send(id, RTEMS_EVENT_1); 40004864: 10 bf ff f3 b 40004830 <== NOT EXECUTED 40004868: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED rtems_event_send(id, RTEMS_EVENT_1); 4000486c: d0 07 bf 7c ld [ %fp + -132 ], %o0 <== NOT EXECUTED data.thread_run = false; 40004870: c0 2f bf 80 clrb [ %fp + -128 ] <== NOT EXECUTED rtems_event_send(id, RTEMS_EVENT_1); 40004874: 40 00 19 9c call 4000aee4 <== NOT EXECUTED 40004878: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED while (loops && data.thread_active) 4000487c: c2 0f bf 81 ldub [ %fp + -127 ], %g1 <== NOT EXECUTED 40004880: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004884: 02 80 00 0f be 400048c0 <== NOT EXECUTED 40004888: 05 10 00 75 sethi %hi(0x4001d400), %g2 <== NOT EXECUTED 4000488c: 03 00 00 61 sethi %hi(0x18400), %g1 <== NOT EXECUTED 40004890: 82 10 62 a0 or %g1, 0x2a0, %g1 ! 186a0 <_Configuration_Interrupt_stack_size+0x176a0> <== NOT EXECUTED 40004894: 81 80 20 00 wr %g0, %y <== NOT EXECUTED 40004898: fa 00 a2 c8 ld [ %g2 + 0x2c8 ], %i5 <== NOT EXECUTED 4000489c: 01 00 00 00 nop <== NOT EXECUTED 400048a0: 01 00 00 00 nop <== NOT EXECUTED 400048a4: ba 70 40 1d udiv %g1, %i5, %i5 <== NOT EXECUTED rtems_task_wake_after (RTEMS_MICROSECONDS_TO_TICKS (100000)); 400048a8: 40 00 1b 89 call 4000b6cc <== NOT EXECUTED 400048ac: 90 10 00 1d mov %i5, %o0 <== NOT EXECUTED while (loops && data.thread_active) 400048b0: c2 0f bf 81 ldub [ %fp + -127 ], %g1 <== NOT EXECUTED 400048b4: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400048b8: 12 bf ff fc bne 400048a8 <== NOT EXECUTED 400048bc: 01 00 00 00 nop <== NOT EXECUTED rtems_printf (printer, "load monitoring stopped.\n"); 400048c0: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED 400048c4: 13 10 00 77 sethi %hi(0x4001dc00), %o1 <== NOT EXECUTED 400048c8: 40 00 09 84 call 40006ed8 <== NOT EXECUTED 400048cc: 92 12 62 20 or %o1, 0x220, %o1 ! 4001de20 <== NOT EXECUTED } } } 400048d0: 81 c7 e0 08 ret <== NOT EXECUTED 400048d4: 81 e8 00 00 restore <== NOT EXECUTED if (data.show == 0) 400048d8: c2 07 bf 8c ld [ %fp + -116 ], %g1 <== NOT EXECUTED 400048dc: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 400048e0: 12 80 00 12 bne 40004928 <== NOT EXECUTED 400048e4: 01 00 00 00 nop <== NOT EXECUTED data.show = show_lines; 400048e8: fa 27 bf 8c st %i5, [ %fp + -116 ] <== NOT EXECUTED 400048ec: 10 bf ff d1 b 40004830 <== NOT EXECUTED 400048f0: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED ++data.sort_order; 400048f4: c2 07 bf 84 ld [ %fp + -124 ], %g1 <== NOT EXECUTED 400048f8: 82 00 60 01 inc %g1 <== NOT EXECUTED 400048fc: c2 27 bf 84 st %g1, [ %fp + -124 ] <== NOT EXECUTED rtems_event_send(id, RTEMS_EVENT_1); 40004900: 10 bf ff cc b 40004830 <== NOT EXECUTED 40004904: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED data.single_page = !data.single_page; 40004908: c2 0f bf 82 ldub [ %fp + -126 ], %g1 <== NOT EXECUTED 4000490c: 82 18 60 01 xor %g1, 1, %g1 <== NOT EXECUTED rtems_event_send(id, RTEMS_EVENT_1); 40004910: d0 07 bf 7c ld [ %fp + -132 ], %o0 <== NOT EXECUTED 40004914: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED data.single_page = !data.single_page; 40004918: c2 2f bf 82 stb %g1, [ %fp + -126 ] <== NOT EXECUTED rtems_event_send(id, RTEMS_EVENT_1); 4000491c: 40 00 19 72 call 4000aee4 <== NOT EXECUTED 40004920: 01 00 00 00 nop <== NOT EXECUTED 40004924: 30 bf ff 90 b,a 40004764 <== NOT EXECUTED data.show = 0; 40004928: c0 27 bf 8c clr [ %fp + -116 ] <== NOT EXECUTED rtems_event_send(id, RTEMS_EVENT_1); 4000492c: 10 bf ff c1 b 40004830 <== NOT EXECUTED 40004930: 92 10 20 02 mov 2, %o1 <== NOT EXECUTED rtems_printf (printer, 40004934: 40 00 19 d8 call 4000b094 <== NOT EXECUTED 40004938: 01 00 00 00 nop <== NOT EXECUTED 4000493c: 13 10 00 77 sethi %hi(0x4001dc00), %o1 <== NOT EXECUTED 40004940: 94 10 00 08 mov %o0, %o2 <== NOT EXECUTED 40004944: 92 12 61 f8 or %o1, 0x1f8, %o1 <== NOT EXECUTED 40004948: 40 00 09 64 call 40006ed8 <== NOT EXECUTED 4000494c: 90 10 00 18 mov %i0, %o0 <== NOT EXECUTED rtems_task_delete (id); 40004950: 40 00 1a 55 call 4000b2a4 <== NOT EXECUTED 40004954: d0 07 bf 7c ld [ %fp + -132 ], %o0 <== NOT EXECUTED return; 40004958: 81 c7 e0 08 ret <== NOT EXECUTED 4000495c: 81 e8 00 00 restore <== NOT EXECUTED if (data.show != 0) 40004960: c2 07 bf 8c ld [ %fp + -116 ], %g1 <== NOT EXECUTED 40004964: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 40004968: 02 bf ff 7f be 40004764 <== NOT EXECUTED 4000496c: ba 07 60 01 inc %i5 <== NOT EXECUTED data.show = show_lines; 40004970: fa 27 bf 8c st %i5, [ %fp + -116 ] <== NOT EXECUTED 40004974: 30 bf ff 7c b,a 40004764 <== NOT EXECUTED if (show_lines > 5) 40004978: 80 a7 60 05 cmp %i5, 5 <== NOT EXECUTED 4000497c: 34 80 00 02 bg,a 40004984 <== NOT EXECUTED 40004980: ba 07 7f ff add %i5, -1, %i5 <== NOT EXECUTED if (data.show != 0) 40004984: c2 07 bf 8c ld [ %fp + -116 ], %g1 <== NOT EXECUTED 40004988: 80 a0 60 00 cmp %g1, 0 <== NOT EXECUTED 4000498c: 32 bf ff 76 bne,a 40004764 <== NOT EXECUTED 40004990: fa 27 bf 8c st %i5, [ %fp + -116 ] <== NOT EXECUTED 40004994: 30 bf ff 74 b,a 40004764 <== NOT EXECUTED