Sorted summary for file /home/marxin/bin/gcc/lib/gcc/x86_64-pc-linux-gnu/11.0.1/cc1plus ---------------------------------------------- 46.19 ggc-page.c:1549 15.68 ggc-page.c:1554 15.12 ggc-page.c:1545 4.19 ggc-page.c:1551 3.16 ggc-page.c:1550 2.72 ggc-page.c:637 2.39 ggc-page.c:630 1.40 ggc-page.c:1537 1.13 ggc-page.c:1559 0.94 ggc-page.c:629 0.88 ggc-page.c:1564 0.77 ggc-page.c:628 0.71 ggc-page.c:1565 0.69 ggc-page.c:639 Percent | Source code & Disassembly of cc1plus for cycles:u (3623 samples, percent: local period) ------------------------------------------------------------------------------------------------------- : : : : 3 Disassembly of section .text: : : 5 0000000000c697c0 <ggc_set_mark(void const*)>: : 6 ggc_set_mark(void const*): : 1537 P must have been allocated by the GC allocator; it mustn't point to : 1538 static objects, stack variables, or memory allocated with malloc. */ : : 1540 int : 1541 ggc_set_mark (const void *p) : 1542 { 1.40 : c697c0: endbr64 // ggc-page.c:1537 : 629 uintptr_t high_bits = (uintptr_t) p & ~ (uintptr_t) 0xffffffff; 0.25 : c697c4: movabs $0xffffffff00000000,%rdx : 1537 { 0.19 : c697ce: sub $0x8,%rsp : 1539 lookup_page_table_entry(): : 628 page_table table = G.lookup; 0.77 : c697d2: mov 0x1c05c47(%rip),%rax # 286f420 <G+0x540> // ggc-page.c:628 : 629 uintptr_t high_bits = (uintptr_t) p & ~ (uintptr_t) 0xffffffff; 0.94 : c697d9: and %rdi,%rdx // ggc-page.c:629 : 630 while (table->high_bits != high_bits) 0.08 : c697dc: cmp %rdx,0x8(%rax) 2.39 : c697e0: je c697f1 <ggc_set_mark(void const*)+0x31> // ggc-page.c:630 0.00 : c697e2: nopw 0x0(%rax,%rax,1) : 631 table = table->next; 0.00 : c697e8: mov (%rax),%rax : 630 while (table->high_bits != high_bits) 0.00 : c697eb: cmp 0x8(%rax),%rdx 0.00 : c697ef: jne c697e8 <ggc_set_mark(void const*)+0x28> : 637 L2 = LOOKUP_L2 (p); 0.00 : c697f1: mov $0x18,%ecx : 636 L1 = LOOKUP_L1 (p); 0.00 : c697f6: mov %rdi,%rsi : 637 L2 = LOOKUP_L2 (p); 0.33 : c697f9: mov $0x1,%edx 0.28 : c697fe: mov %rdi,%r9 0.63 : c69801: mov 0x1c05c28(%rip),%r8 # 286f430 <G+0x550> // ggc-page.c:637 : 636 L1 = LOOKUP_L1 (p); 0.36 : c69808: shr $0x18,%rsi 0.14 : c6980c: movzbl %sil,%esi : 637 L2 = LOOKUP_L2 (p); 0.00 : c69810: sub %r8d,%ecx : 639 return base[L1][L2]; 0.69 : c69813: mov 0x10(%rax,%rsi,8),%rax // ggc-page.c:639 : 637 L2 = LOOKUP_L2 (p); 1.46 : c69818: shl %cl,%edx // ggc-page.c:637 0.19 : c6981a: mov %r8d,%ecx 0.11 : c6981d: sub $0x1,%edx 0.63 : c69820: shr %cl,%r9 0.25 : c69823: movslq %edx,%rdx 0.22 : c69826: and %r9,%rdx : 639 return base[L1][L2]; 0.25 : c69829: mov (%rax,%rdx,8),%rax : 641 ggc_set_mark(void const*): : 1545 unsigned long mask; : : 1547 /* Look up the page on which the object is alloced. If the object : 1548 wasn't allocated by the collector, we'll probably die. */ : 1549 entry = lookup_page_table_entry (p); : 1550 gcc_assert (entry); 15.12 : c6982d: test %rax,%rax // ggc-page.c:1545 0.11 : c69830: je 74fddb <ggc_set_mark(void const*) [clone .cold]> : : 1550 /* Calculate the index of the object on the page; this is its bit : 1551 position in the in_use_p bitmap. */ : 1552 bit = OFFSET_TO_BIT (((const char *) p) - entry->page, entry->order); 0.00 : c69836: movzbl 0x2e(%rax),%edx 33.32 : c6983a: sub 0x18(%rax),%rdi // ggc-page.c:1549 : 1551 word = bit / HOST_BITS_PER_LONG; : 1552 mask = (unsigned long) 1 << (bit % HOST_BITS_PER_LONG); 1.16 : c6983e: mov $0x1,%esi // ggc-page.c:1551 : : 1556 /* If the bit was previously set, skip it. */ : 1557 if (entry->in_use_p[word] & mask) : 1558 return 1; 0.14 : c69843: mov $0x1,%r8d : 1549 bit = OFFSET_TO_BIT (((const char *) p) - entry->page, entry->order); 0.03 : c69849: mov %rdx,%rcx 0.00 : c6984c: lea 0x1c061ed(%rip),%rdx # 286fa40 <inverse_table> 0.03 : c69853: shl $0x4,%rcx 0.11 : c69857: add %rcx,%rdx 1.73 : c6985a: imul (%rdx),%rdi // ggc-page.c:1549 11.13 : c6985e: mov 0x8(%rdx),%ecx 0.19 : c69861: shr %cl,%rdi : 1550 word = bit / HOST_BITS_PER_LONG; 3.16 : c69864: mov %edi,%edx // ggc-page.c:1550 : 1549 bit = OFFSET_TO_BIT (((const char *) p) - entry->page, entry->order); 0.03 : c69866: mov %rdi,%rcx : 1550 word = bit / HOST_BITS_PER_LONG; 0.00 : c69869: shr $0x6,%edx : 1551 mask = (unsigned long) 1 << (bit % HOST_BITS_PER_LONG); 1.70 : c6986c: shl %cl,%rsi // ggc-page.c:1551 : 1554 if (entry->in_use_p[word] & mask) 0.85 : c6986f: add $0x6,%rdx // ggc-page.c:1554 : 1551 mask = (unsigned long) 1 << (bit % HOST_BITS_PER_LONG); 1.33 : c69873: mov %rsi,%rcx // ggc-page.c:1551 : 1554 if (entry->in_use_p[word] & mask) 0.08 : c69876: mov (%rax,%rdx,8),%rsi 14.83 : c6987a: test %rcx,%rsi // ggc-page.c:1554 0.25 : c6987d: jne c6988e <ggc_set_mark(void const*)+0xce> : : 1559 /* Otherwise set it, and decrement the free object count. */ : 1560 entry->in_use_p[word] |= mask; 0.00 : c6987f: or %rsi,%rcx : 1564 entry->num_free_objects -= 1; : : 1566 if (GGC_DEBUG_LEVEL >= 4) : 1567 fprintf (G.debug_file, "Marking %p\n", p); : : 1569 return 0; 0.88 : c69882: xor %r8d,%r8d // ggc-page.c:1564 : 1558 entry->in_use_p[word] |= mask; 0.00 : c69885: mov %rcx,(%rax,%rdx,8) : 1559 entry->num_free_objects -= 1; 1.13 : c69889: subw $0x1,0x2a(%rax) // ggc-page.c:1559 : 1565 } 0.22 : c6988e: mov %r8d,%eax 0.71 : c69891: add $0x8,%rsp // ggc-page.c:1565 0.19 : c69895: ret Sorted summary for file /home/marxin/bin/gcc/lib/gcc/x86_64-pc-linux-gnu/11.0.1/cc1plus ---------------------------------------------- 60.52 c-common.h:1252 3.95 gt-cp-tree.h:104 2.55 gt-cp-tree.h:107 2.55 gt-cp-tree.h:692 1.86 c-common.h:1253 1.82 gt-cp-tree.h:109 1.52 gt-cp-tree.h:224 0.97 gt-cp-tree.h:346 0.94 gt-cp-tree.h:339 0.91 gt-cp-tree.h:460 0.64 gt-cp-tree.h:353 0.64 gt-cp-tree.h:474 0.61 gt-cp-tree.h:114 Percent | Source code & Disassembly of cc1plus for cycles:u (3289 samples, percent: local period) ------------------------------------------------------------------------------------------------------- : : : : 3 Disassembly of section .text: : : 5 0000000000ba22a0 <gt_ggc_mx_lang_tree_node(void*)>: : 6 gt_ggc_mx_lang_tree_node(void*): : 104 } : 105 } : : 107 void : 108 gt_ggc_mx_lang_tree_node (void *x_p) : 109 { 1.25 : ba22a0: endbr64 // gt-cp-tree.h:104 : 107 union lang_tree_node * x = (union lang_tree_node *)x_p; : 108 union lang_tree_node * xlimit = x; : 109 while (ggc_test_and_set_mark (xlimit)) 0.52 : ba22a4: cmp $0x1,%rdi // gt-cp-tree.h:107 0.33 : ba22a8: jbe ba3daa <gt_ggc_mx_lang_tree_node(void*)+0x1b0a> : 104 { 0.00 : ba22ae: push %r15 1.49 : ba22b0: push %r14 // gt-cp-tree.h:104 0.27 : ba22b2: push %r13 0.40 : ba22b4: push %r12 0.49 : ba22b6: mov %rdi,%r12 0.06 : ba22b9: push %rbp : 107 while (ggc_test_and_set_mark (xlimit)) 0.42 : ba22ba: mov %rdi,%rbp : 104 { 0.18 : ba22bd: push %rbx 0.55 : ba22be: sub $0x18,%rsp 0.67 : ba22c2: nopw 0x0(%rax,%rax,1) : 107 while (ggc_test_and_set_mark (xlimit)) 0.18 : ba22c8: mov %rbp,%rdi 0.18 : ba22cb: call c697c0 <ggc_set_mark(void const*)> 1.22 : ba22d0: test %eax,%eax // gt-cp-tree.h:107 0.24 : ba22d2: jne ba2300 <gt_ggc_mx_lang_tree_node(void*)+0x60> : 112 gt_ggc_mx_lang_tree_node(void*) [clone .localalias]: : 1252 c_tree_chain_next (tree t)