You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
(122) |
Nov
(152) |
Dec
(69) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(6) |
Feb
(25) |
Mar
(73) |
Apr
(82) |
May
(24) |
Jun
(25) |
Jul
(10) |
Aug
(11) |
Sep
(10) |
Oct
(54) |
Nov
(203) |
Dec
(182) |
| 2004 |
Jan
(307) |
Feb
(305) |
Mar
(430) |
Apr
(312) |
May
(187) |
Jun
(342) |
Jul
(487) |
Aug
(637) |
Sep
(336) |
Oct
(373) |
Nov
(441) |
Dec
(210) |
| 2005 |
Jan
(385) |
Feb
(480) |
Mar
(636) |
Apr
(544) |
May
(679) |
Jun
(625) |
Jul
(810) |
Aug
(838) |
Sep
(634) |
Oct
(521) |
Nov
(965) |
Dec
(543) |
| 2006 |
Jan
(494) |
Feb
(431) |
Mar
(546) |
Apr
(411) |
May
(406) |
Jun
(322) |
Jul
(256) |
Aug
(401) |
Sep
(345) |
Oct
(542) |
Nov
(308) |
Dec
(481) |
| 2007 |
Jan
(427) |
Feb
(326) |
Mar
(367) |
Apr
(255) |
May
(244) |
Jun
(204) |
Jul
(223) |
Aug
(231) |
Sep
(354) |
Oct
(374) |
Nov
(497) |
Dec
(362) |
| 2008 |
Jan
(322) |
Feb
(482) |
Mar
(658) |
Apr
(422) |
May
(476) |
Jun
(396) |
Jul
(455) |
Aug
(267) |
Sep
(280) |
Oct
(253) |
Nov
(232) |
Dec
(304) |
| 2009 |
Jan
(486) |
Feb
(470) |
Mar
(458) |
Apr
(423) |
May
(696) |
Jun
(461) |
Jul
(551) |
Aug
(575) |
Sep
(134) |
Oct
(110) |
Nov
(157) |
Dec
(102) |
| 2010 |
Jan
(226) |
Feb
(86) |
Mar
(147) |
Apr
(117) |
May
(107) |
Jun
(203) |
Jul
(193) |
Aug
(238) |
Sep
(300) |
Oct
(246) |
Nov
(23) |
Dec
(75) |
| 2011 |
Jan
(133) |
Feb
(195) |
Mar
(315) |
Apr
(200) |
May
(267) |
Jun
(293) |
Jul
(353) |
Aug
(237) |
Sep
(278) |
Oct
(611) |
Nov
(274) |
Dec
(260) |
| 2012 |
Jan
(303) |
Feb
(391) |
Mar
(417) |
Apr
(441) |
May
(488) |
Jun
(655) |
Jul
(590) |
Aug
(610) |
Sep
(526) |
Oct
(478) |
Nov
(359) |
Dec
(372) |
| 2013 |
Jan
(467) |
Feb
(226) |
Mar
(391) |
Apr
(281) |
May
(299) |
Jun
(252) |
Jul
(311) |
Aug
(352) |
Sep
(481) |
Oct
(571) |
Nov
(222) |
Dec
(231) |
| 2014 |
Jan
(185) |
Feb
(329) |
Mar
(245) |
Apr
(238) |
May
(281) |
Jun
(399) |
Jul
(382) |
Aug
(500) |
Sep
(579) |
Oct
(435) |
Nov
(487) |
Dec
(256) |
| 2015 |
Jan
(338) |
Feb
(357) |
Mar
(330) |
Apr
(294) |
May
(191) |
Jun
(108) |
Jul
(142) |
Aug
(261) |
Sep
(190) |
Oct
(54) |
Nov
(83) |
Dec
(22) |
| 2016 |
Jan
(49) |
Feb
(89) |
Mar
(33) |
Apr
(50) |
May
(27) |
Jun
(34) |
Jul
(53) |
Aug
(53) |
Sep
(98) |
Oct
(206) |
Nov
(93) |
Dec
(53) |
| 2017 |
Jan
(65) |
Feb
(82) |
Mar
(102) |
Apr
(86) |
May
(187) |
Jun
(67) |
Jul
(23) |
Aug
(93) |
Sep
(65) |
Oct
(45) |
Nov
(35) |
Dec
(17) |
| 2018 |
Jan
(26) |
Feb
(35) |
Mar
(38) |
Apr
(32) |
May
(8) |
Jun
(43) |
Jul
(27) |
Aug
(30) |
Sep
(43) |
Oct
(42) |
Nov
(38) |
Dec
(67) |
| 2019 |
Jan
(32) |
Feb
(37) |
Mar
(53) |
Apr
(64) |
May
(49) |
Jun
(18) |
Jul
(14) |
Aug
(53) |
Sep
(25) |
Oct
(30) |
Nov
(49) |
Dec
(31) |
| 2020 |
Jan
(87) |
Feb
(45) |
Mar
(37) |
Apr
(51) |
May
(99) |
Jun
(36) |
Jul
(11) |
Aug
(14) |
Sep
(20) |
Oct
(24) |
Nov
(40) |
Dec
(23) |
| 2021 |
Jan
(14) |
Feb
(53) |
Mar
(85) |
Apr
(15) |
May
(19) |
Jun
(3) |
Jul
(14) |
Aug
(1) |
Sep
(57) |
Oct
(73) |
Nov
(56) |
Dec
(22) |
| 2022 |
Jan
(3) |
Feb
(22) |
Mar
(6) |
Apr
(55) |
May
(46) |
Jun
(39) |
Jul
(15) |
Aug
(9) |
Sep
(11) |
Oct
(34) |
Nov
(20) |
Dec
(36) |
| 2023 |
Jan
(79) |
Feb
(41) |
Mar
(99) |
Apr
(169) |
May
(48) |
Jun
(16) |
Jul
(16) |
Aug
(57) |
Sep
(19) |
Oct
|
Nov
|
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
(2) |
|
2
|
3
|
4
|
5
|
6
|
7
(1) |
8
|
|
9
(3) |
10
|
11
(1) |
12
|
13
|
14
|
15
(2) |
|
16
|
17
(1) |
18
(1) |
19
|
20
(1) |
21
|
22
|
|
23
|
24
|
25
(1) |
26
|
27
|
28
|
29
|
|
30
|
31
(1) |
|
|
|
|
|
|
From: Mark W. <ma...@so...> - 2020-08-25 14:47:06
|
https://sourceware.org/git/gitweb.cgi?p=valgrind.git;h=86277041a296d3ca34d938b347c246ff4485c3a0 commit 86277041a296d3ca34d938b347c246ff4485c3a0 Author: Mark Wielaard <ma...@kl...> Date: Mon Jul 27 22:43:28 2020 +0200 Incorrect call-graph tracking due to new _dl_runtime_resolve_xsave* Newer glibc have alternate ld.so _ld_runtime_resolve functions. Namely _dl_runtime_resolve_xsave and _dl_runtime_resolve_xsavec This patch recognizes the xsave, xsvec and fxsave variants and changes callgrind so that any variant counts as _dl_runtime_resolve. Original patch by pau...@gm... https://bugs.kde.org/show_bug.cgi?id=415293 Diff: --- NEWS | 1 + callgrind/fn.c | 130 ++++++++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 116 insertions(+), 15 deletions(-) diff --git a/NEWS b/NEWS index cc492fc9a9..248d90892a 100644 --- a/NEWS +++ b/NEWS @@ -43,6 +43,7 @@ where XXXXXX is the bug number as listed below. 369029 handle linux syscalls sched_getattr and sched_setattr n-i-bz helgrind: If hg_cli__realloc fails, return NULL. +415293 Incorrect call-graph tracking due to new _dl_runtime_resolve_xsave* 422174 unhandled instruction bytes: 0x48 0xE9 (REX prefixed JMP instruction) 422623 epoll_ctl warns for uninitialized padding on non-amd64 64bit arches 423021 PPC: Add missing ISA 3.0 documentation link and HWCAPS test. diff --git a/callgrind/fn.c b/callgrind/fn.c index e9d8dd2143..7cce1a0c71 100644 --- a/callgrind/fn.c +++ b/callgrind/fn.c @@ -30,8 +30,11 @@ static fn_array current_fn_active; -static Addr runtime_resolve_addr = 0; -static int runtime_resolve_length = 0; +/* x86_64 defines 4 variants. */ +#define MAX_RESOLVE_ADDRS 4 +static int runtime_resolve_addrs = 0; +static Addr runtime_resolve_addr[MAX_RESOLVE_ADDRS]; +static int runtime_resolve_length[MAX_RESOLVE_ADDRS]; // a code pattern is a list of tuples (start offset, length) struct chunk_t { int start, len; }; @@ -56,6 +59,9 @@ static Bool check_code(obj_node* obj, /* first chunk of pattern should always start at offset 0 and * have at least 3 bytes */ CLG_ASSERT((pat->chunk[0].start == 0) && (pat->chunk[0].len >2)); + + /* and we cannot be called more than MAX_RESOLVE_ADDRS times */ + CLG_ASSERT(runtime_resolve_addrs < MAX_RESOLVE_ADDRS); CLG_DEBUG(1, "check_code: %s, pattern %s, check %d bytes of [%x %x %x...]\n", obj->name, pat->name, pat->chunk[0].len, code[0], code[1], code[2]); @@ -93,8 +99,9 @@ static Bool check_code(obj_node* obj, pat->name, obj->name + obj->last_slash_pos, addr - obj->start, addr, pat->len); - runtime_resolve_addr = addr; - runtime_resolve_length = pat->len; + runtime_resolve_addr[runtime_resolve_addrs] = addr; + runtime_resolve_length[runtime_resolve_addrs] = pat->len; + runtime_resolve_addrs++; return True; } } @@ -138,8 +145,9 @@ static Bool search_runtime_resolve(obj_node* obj) "x86-glibc2.8", 30, {{ 0,12 }, { 16,14 }, { 30,0}} }; if (VG_(strncmp)(obj->name, "/lib/ld", 7) != 0) return False; - if (check_code(obj, code, &pat)) return True; - if (check_code(obj, code_28, &pat_28)) return True; + Bool pat_p = check_code(obj, code, &pat); + Bool pat_28_p = check_code(obj, code_28, &pat_28); + if (pat_p || pat_28_p) return True; return False; #endif @@ -186,9 +194,98 @@ static Bool search_runtime_resolve(obj_node* obj) static struct pattern pat = { "amd64-def", 110, {{ 0,62 }, { 66,44 }, { 110,0 }} }; + static UChar code_xsavec[] = { + /* 0*/ 0x53, 0x48, 0x89, 0xe3, 0x48, 0x83, 0xe4, 0xc0, + /* 8*/ 0x48, 0x2b, 0x25, 0x00, 0x00, 0x00, 0x00, /* sub <i32>(%rip),%rsp */ + /*15*/ 0x48, + /*16*/ 0x89, 0x04, 0x24, 0x48, 0x89, 0x4c, 0x24, 0x08, + /*24*/ 0x48, 0x89, 0x54, 0x24, 0x10, 0x48, 0x89, 0x74, + /*32*/ 0x24, 0x18, 0x48, 0x89, 0x7c, 0x24, 0x20, 0x4c, + /*40*/ 0x89, 0x44, 0x24, 0x28, 0x4c, 0x89, 0x4c, 0x24, + /*48*/ 0x30, 0xb8, 0xee, 0x00, 0x00, 0x00, 0x31, 0xd2, + /*56*/ 0x48, 0x89, 0x94, 0x24, 0x50, 0x02, 0x00, 0x00, + /*64*/ 0x48, 0x89, 0x94, 0x24, 0x58, 0x02, 0x00, 0x00, + /*72*/ 0x48, 0x89, 0x94, 0x24, 0x60, 0x02, 0x00, 0x00, + /*80*/ 0x48, 0x89, 0x94, 0x24, 0x68, 0x02, 0x00, 0x00, + /*88*/ 0x48, 0x89, 0x94, 0x24, 0x70, 0x02, 0x00, 0x00, + /*96*/ 0x48, 0x89, 0x94, 0x24, 0x78, 0x02, 0x00, 0x00, + /*04*/ 0x0f, 0xc7, 0x64, 0x24, 0x40, 0x48, 0x8b, 0x73, + /*112*/0x10, 0x48, 0x8b, 0x7b, 0x08, + /*117*/0xe8, 0x00, 0x00, 0x00, 0x00, /* callq <_dl_fixup> */ + /*122*/0x49, 0x89, 0xc3, 0xb8, 0xee, 0x00, + /*128*/0x00, 0x00, 0x31, 0xd2, 0x0f, 0xae, 0x6c, 0x24, + /*136*/0x40, 0x4c, 0x8b, 0x4c, 0x24, 0x30, 0x4c, 0x8b, + /*144*/0x44, 0x24, 0x28, 0x48, 0x8b, 0x7c, 0x24, 0x20, + /*152*/0x48, 0x8b, 0x74, 0x24, 0x18, 0x48, 0x8b, 0x54, + /*160*/0x24, 0x10, 0x48, 0x8b, 0x4c, 0x24, 0x08, 0x48, + /*168*/0x8b, 0x04, 0x24, 0x48, 0x89, 0xdc, 0x48, 0x8b, + /*176*/0x1c, 0x24, 0x48, 0x83, 0xc4, 0x18, 0xf2, 0x41, + /*184*/0xff, 0xe3 }; + static struct pattern pat_xsavec = { + "amd64-xsavec", 186, {{ 0,11 }, { 15,103 }, {122,64}, { 186,0 }} }; + + static UChar code_xsave[] = { + /* 0*/ 0x53, 0x48, 0x89, 0xe3, 0x48, 0x83, 0xe4, 0xc0, + /* 8*/ 0x48, 0x2b, 0x25, 0x00, 0x00, 0x00, 0x00, /* sub <i32>(%rip),%rsp */ + /*15*/ 0x48, + /*16*/ 0x89, 0x04, 0x24, 0x48, 0x89, 0x4c, 0x24, 0x08, + /*24*/ 0x48, 0x89, 0x54, 0x24, 0x10, 0x48, 0x89, 0x74, + /*32*/ 0x24, 0x18, 0x48, 0x89, 0x7c, 0x24, 0x20, 0x4c, + /*40*/ 0x89, 0x44, 0x24, 0x28, 0x4c, 0x89, 0x4c, 0x24, + /*48*/ 0x30, 0xb8, 0xee, 0x00, 0x00, 0x00, 0x31, 0xd2, + /*56*/ 0x48, 0x89, 0x94, 0x24, 0x40, 0x02, 0x00, 0x00, + /*64*/ 0x48, 0x89, 0x94, 0x24, 0x48, 0x02, 0x00, 0x00, + /*72*/ 0x48, 0x89, 0x94, 0x24, 0x50, 0x02, 0x00, 0x00, + /*80*/ 0x48, 0x89, 0x94, 0x24, 0x58, 0x02, 0x00, 0x00, + /*88*/ 0x48, 0x89, 0x94, 0x24, 0x60, 0x02, 0x00, 0x00, + /*96*/ 0x48, 0x89, 0x94, 0x24, 0x68, 0x02, 0x00, 0x00, + /*104*/0x48, 0x89, 0x94, 0x24, 0x70, 0x02, 0x00, 0x00, + /*112*/0x48, 0x89, 0x94, 0x24, 0x78, 0x02, 0x00, 0x00, + /*120*/0x0f, 0xae, 0x64, 0x24, 0x40, 0x48, 0x8b, 0x73, + /*128*/0x10, 0x48, 0x8b, 0x7b, 0x08, + /*133*/0xe8, 0x00, 0x00, 0x00, 0x00, /* callq <_dl_fixup> */ + /*138*/0x49, 0x89, 0xc3, 0xb8, 0xee, 0x00, + /*144*/0x00, 0x00, 0x31, 0xd2, 0x0f, 0xae, 0x6c, 0x24, + /*152*/0x40, 0x4c, 0x8b, 0x4c, 0x24, 0x30, 0x4c, 0x8b, + /*160*/0x44, 0x24, 0x28, 0x48, 0x8b, 0x7c, 0x24, 0x20, + /*168*/0x48, 0x8b, 0x74, 0x24, 0x18, 0x48, 0x8b, 0x54, + /*176*/0x24, 0x10, 0x48, 0x8b, 0x4c, 0x24, 0x08, 0x48, + /*184*/0x8b, 0x04, 0x24, 0x48, 0x89, 0xdc, 0x48, 0x8b, + /*192*/0x1c, 0x24, 0x48, 0x83, 0xc4, 0x18, 0xf2, 0x41, + /*200*/0xff, 0xe3 }; + static struct pattern pat_xsave = { + "amd64-xsave", 202, {{ 0,11 }, { 15,119 }, {138,64}, { 202,0 }} }; + + static UChar code_fxsave[] = { + /* 0*/ 0x53, 0x48, 0x89, 0xe3, 0x48, 0x83, 0xe4, 0xf0, + /* 8*/ 0x48, 0x81, 0xec, 0x40, 0x02, 0x00, 0x00, 0x48, + /*16*/ 0x89, 0x04, 0x24, 0x48, 0x89, 0x4c, 0x24, 0x08, + /*24*/ 0x48, 0x89, 0x54, 0x24, 0x10, 0x48, 0x89, 0x74, + /*32*/ 0x24, 0x18, 0x48, 0x89, 0x7c, 0x24, 0x20, 0x4c, + /*40*/ 0x89, 0x44, 0x24, 0x28, 0x4c, 0x89, 0x4c, 0x24, + /*48*/ 0x30, 0x0f, 0xae, 0x44, 0x24, 0x40, 0x48, 0x8b, + /*56*/ 0x73, 0x10, 0x48, 0x8b, 0x7b, 0x08, + /*62*/ 0xe8, 0x00, 0x00, 0x00, 0x00, /* callq <_dl_fixup> */ + /*67*/ 0x49, 0x89, 0xc3, 0x0f, 0xae, + /*72*/ 0x4c, 0x24, 0x40, 0x4c, 0x8b, 0x4c, 0x24, 0x30, + /*80*/ 0x4c, 0x8b, 0x44, 0x24, 0x28, 0x48, 0x8b, 0x7c, + /*88*/ 0x24, 0x20, 0x48, 0x8b, 0x74, 0x24, 0x18, 0x48, + /*96*/ 0x8b, 0x54, 0x24, 0x10, 0x48, 0x8b, 0x4c, 0x24, + /*104*/0x08, 0x48, 0x8b, 0x04, 0x24, 0x48, 0x89, 0xdc, + /*112*/0x48, 0x8b, 0x1c, 0x24, 0x48, 0x83, 0xc4, 0x18, + /*120*/0xf2, 0x41, 0xff, 0xe3 }; + static struct pattern pat_fxsave = { + "amd64-fxsave", 124, {{ 0,63 }, { 67,57 }, { 124,0 }} }; + if ((VG_(strncmp)(obj->name, "/lib/ld", 7) != 0) && - (VG_(strncmp)(obj->name, "/lib64/ld", 9) != 0)) return False; - return check_code(obj, code, &pat); + (VG_(strncmp)(obj->name, "/lib64/ld", 9) != 0) && + (VG_(strncmp)(obj->name, "/usr/lib/ld", 11) != 0) && + (VG_(strncmp)(obj->name, "/usr/lib64/ld", 13) != 0)) return False; + Bool pat_p = check_code(obj, code, &pat); + Bool pat_xsavec_p = check_code(obj, code_xsavec, &pat_xsavec); + Bool pat_xsave_p = check_code(obj, code_xsave, &pat_xsave); + Bool pat_fxsave_p = check_code(obj, code_fxsave, &pat_fxsave); + if (pat_p || pat_xsavec_p || pat_xsave_p || pat_fxsave_p) return True; #endif /* For other platforms, no patterns known */ @@ -254,7 +351,7 @@ obj_node* new_obj_node(DebugInfo* di, obj_node* next) i++; } - if (runtime_resolve_addr == 0) search_runtime_resolve(obj); + if (runtime_resolve_addrs == 0) search_runtime_resolve(obj); return obj; } @@ -490,6 +587,7 @@ fn_node* CLG_(get_fn_node)(BB* bb) DebugInfo* di; UInt line_num; fn_node* fn; + Int i; /* fn from debug info is idempotent for a BB */ if (bb->fn) return bb->fn; @@ -538,12 +636,14 @@ fn_node* CLG_(get_fn_node)(BB* bb) } if (0 == VG_(strcmp)(fnname, "_exit") && !exit_bb) exit_bb = bb; - - if (runtime_resolve_addr && - (bb_addr(bb) >= runtime_resolve_addr) && - (bb_addr(bb) < runtime_resolve_addr + runtime_resolve_length)) { - /* BB in runtime_resolve found by code check; use this name */ - fnname = "_dl_runtime_resolve"; + + for (i = 0; i < runtime_resolve_addrs; i++) { + if ((bb_addr(bb) >= runtime_resolve_addr[i]) && + (bb_addr(bb) < runtime_resolve_addr[i] + runtime_resolve_length[i])) { + /* BB in runtime_resolve found by code check; use this name */ + fnname = "_dl_runtime_resolve"; + break; + } } /* get fn_node struct for this function */ |