search for: kcov_remote_map

Displaying 3 results from an estimated 3 matches for "kcov_remote_map".

2019 Oct 21
0
[PATCH RFC 1/3] kcov: remote coverage support
...unsigned int size; > +}; > + > +struct kcov_remote { > + u64 handle; > + struct kcov *kcov; > + struct hlist_node hnode; > }; > > +static DEFINE_SPINLOCK(kcov_remote_lock); > +static DEFINE_HASHTABLE(kcov_remote_map, 4); > +static struct list_head kcov_remote_areas = LIST_HEAD_INIT(kcov_remote_areas); > + > +static struct kcov_remote *kcov_remote_find(u64 handle) > +{ > + struct kcov_remote *remote; > + > + hash_for_each_possible(kcov_remote_map, remote, hnode, handle) { > +...
2019 Oct 24
0
[PATCH v2 1/3] kcov: remote coverage support
..._remote_find(handle)) > + return ERR_PTR(-EEXIST); > + remote = kmalloc(sizeof(*remote), GFP_ATOMIC); > + if (!remote) > + return ERR_PTR(-ENOMEM); > + remote->handle = handle; > + remote->kcov = kcov; > + hash_add(kcov_remote_map, &remote->hnode, handle); I think it will make sense to check that there is no existing kcov with the same handle registered. Such condition will be extremely hard to debug based on episodically missing coverage. ... > void kcov_task_exit(struct task_struct *t) > { > str...
2019 Oct 23
0
[PATCH v2 1/3] kcov: remote coverage support
...gt; + struct kcov_remote *remote; > + > + if (kcov_remote_find(handle)) > + return ERR_PTR(-EEXIST); > + remote = kmalloc(sizeof(*remote), GFP_ATOMIC); > + if (!remote) > + return ERR_PTR(-ENOMEM); > + remote->handle = handle; > + remote->kcov = kcov; > + hash_add(kcov_remote_map, &remote->hnode, handle); > + return remote; > +} > + > > ... > > + spin_lock(&kcov_remote_lock); > + for (i = 0; i < remote_arg->num_handles; i++) { > + kcov_debug("handle %llx\n", remote_arg->handles[i]); > + if (!kcov_check_handle...