Displaying 3 results from an estimated 3 matches for "kcov_remote_find".
2019 Oct 24
0
[PATCH v2 1/3] kcov: remote coverage support
...4 PM Andrey Konovalov <andreyknvl at google.com> wrote:
>
> This patch adds background thread coverage collection ability to kcov.
...
> +static struct kcov_remote *kcov_remote_add(struct kcov *kcov, u64 handle)
> +{
> +       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_...
2019 Oct 21
0
[PATCH RFC 1/3] kcov: remote coverage support
...*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) {
> +               if (remote->handle == handle)
> +                       return remote;
> +       }
> +       return NULL;
> +}
> +...
2019 Oct 23
0
[PATCH v2 1/3] kcov: remote coverage support
...handle from the current
> task_struct. However non common handles allow to collect coverage
> selectively from different subsystems.
> 
> ...
>
> +static struct kcov_remote *kcov_remote_add(struct kcov *kcov, u64 handle)
> +{
> +	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 remot...