FreeBSD Bugzilla – Attachment 206319 Details for
Bug 239672
gcov: Optimize list traverse by two passes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
gcov_fs patch v2
gcov_fs-v2.patch (text/plain), 1.30 KB, created by
Chuhong Yuan
on 2019-08-07 06:16:52 UTC
(
hide
)
Description:
gcov_fs patch v2
Filename:
MIME Type:
Creator:
Chuhong Yuan
Created:
2019-08-07 06:16:52 UTC
Size:
1.30 KB
patch
obsolete
>Index: sys/gnu/gcov/gcov_fs.c >=================================================================== >--- sys/gnu/gcov/gcov_fs.c (revision 350670) >+++ sys/gnu/gcov/gcov_fs.c (working copy) >@@ -185,6 +185,7 @@ > * @entry: list entry for parent's child node list > * @children: child nodes > * @all_entry: list entry for list of all nodes >+ * @remove_entry: tail queue entry for marked to be removed nodes > * @parent: parent node > * @loaded_info: array of pointers to profiling data sets for loaded object > * files. >@@ -203,6 +204,7 @@ > struct gcov_node { > LIST_ENTRY(gcov_node) children_entry; > LIST_ENTRY(gcov_node) all_entry; >+ TAILQ_ENTRY(gcov_node) remove_entry; > struct { > struct gcov_node *lh_first; > } children; >@@ -420,18 +422,22 @@ > void > gcov_stats_reset(void) > { >- struct gcov_node *node; >+ struct gcov_node *node, *node_temp; >+ TAILQ_HEAD(, gcov_node) remove_head = >+ TAILQ_HEAD_INITIALIZER(remove_head); > > mtx_lock(&node_lock); >- restart: > LIST_FOREACH(node, &all_head, all_entry) { > if (node->num_loaded > 0) > reset_node(node); > else if (LIST_EMPTY(&node->children)) { >- remove_node(node); >- goto restart; >+ TAILQ_INSERT_TAIL(&remove_head, node, remove_entry); > } > } >+ >+ TAILQ_FOREACH_SAFE(node, &remove_head, remove_entry, node_temp) { >+ remove_node(node); >+ } > mtx_unlock(&node_lock); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 239672
:
206304
| 206319