Em Tue, May 26, 2015 at 08:05:28AM +0800, Wangnan (F) escreveu:
> On 2015/5/25 21:30, Arnaldo Carvalho de Melo wrote:
> >Well, there are many styles to pick, the fact that perf uses __ to
> >separate class name from class method doesn't mean that you should as
> >well, as you may find it
On 2015/5/25 21:30, Arnaldo Carvalho de Melo wrote:
Em Fri, May 22, 2015 at 06:00:58PM -0700, Alexei Starovoitov escreveu:
On 5/22/15 10:23 AM, Jiri Olsa wrote:
+struct bpf_object *bpf_open_object(const char *path)
another suggestion for the namespace.. Arnaldo forces us ;-)
to use the
Em Fri, May 22, 2015 at 06:00:58PM -0700, Alexei Starovoitov escreveu:
> On 5/22/15 10:23 AM, Jiri Olsa wrote:
> >>+struct bpf_object *bpf_open_object(const char *path)
> >another suggestion for the namespace.. Arnaldo forces us ;-)
> >to use the object name first plus '__(method name)' for
>
Em Fri, May 22, 2015 at 06:00:58PM -0700, Alexei Starovoitov escreveu:
On 5/22/15 10:23 AM, Jiri Olsa wrote:
+struct bpf_object *bpf_open_object(const char *path)
another suggestion for the namespace.. Arnaldo forces us ;-)
to use the object name first plus '__(method name)' for
interface
On 2015/5/25 21:30, Arnaldo Carvalho de Melo wrote:
Em Fri, May 22, 2015 at 06:00:58PM -0700, Alexei Starovoitov escreveu:
On 5/22/15 10:23 AM, Jiri Olsa wrote:
+struct bpf_object *bpf_open_object(const char *path)
another suggestion for the namespace.. Arnaldo forces us ;-)
to use the
Em Tue, May 26, 2015 at 08:05:28AM +0800, Wangnan (F) escreveu:
On 2015/5/25 21:30, Arnaldo Carvalho de Melo wrote:
Well, there are many styles to pick, the fact that perf uses __ to
separate class name from class method doesn't mean that you should as
well, as you may find it inconvenient or
On 5/22/15 10:23 AM, Jiri Olsa wrote:
+
+struct bpf_object *bpf_open_object(const char *path)
+{
another suggestion for the namespace.. Arnaldo forces us ;-)
to use the object name first plus '__(method name)' for
interface functions so that would be:
bpf_object__open
bpf_object__close
On Sun, May 17, 2015 at 10:56:34AM +, Wang Nan wrote:
SNIP
> + obj->path);
> + err = -EINVAL;
> + goto errout;
> + }
> + ep = >elf.ehdr;
> +
> + if ((ep->e_type != ET_REL) || (ep->e_machine != 0)) {
> +
On Sun, May 17, 2015 at 10:56:34AM +, Wang Nan wrote:
SNIP
> +
> +void bpf_close_object(struct bpf_object *obj)
> +{
> + if (!obj)
> + return;
> +
> + bpf_obj_clear_elf(obj);
> +
> + if (obj->path)
> + free(obj->path);
you're safe calling free with NULL,
On 5/22/15 10:23 AM, Jiri Olsa wrote:
+
+struct bpf_object *bpf_open_object(const char *path)
+{
another suggestion for the namespace.. Arnaldo forces us ;-)
to use the object name first plus '__(method name)' for
interface functions so that would be:
bpf_object__open
bpf_object__close
On Sun, May 17, 2015 at 10:56:34AM +, Wang Nan wrote:
SNIP
+
+void bpf_close_object(struct bpf_object *obj)
+{
+ if (!obj)
+ return;
+
+ bpf_obj_clear_elf(obj);
+
+ if (obj-path)
+ free(obj-path);
you're safe calling free with NULL, so there's
On Sun, May 17, 2015 at 10:56:34AM +, Wang Nan wrote:
SNIP
+ obj-path);
+ err = -EINVAL;
+ goto errout;
+ }
+ ep = obj-elf.ehdr;
+
+ if ((ep-e_type != ET_REL) || (ep-e_machine != 0)) {
+ pr_warning(%s is not
On 5/17/15 3:56 AM, Wang Nan wrote:
This patch adds basic 'struct bpf_object' which will be used for eBPF
object file loading. eBPF object files are compiled by LLVM as ELF
format. In this patch, libelf is used to open those files, read EHDR
and do basic validation according to e_type and
On 5/17/15 3:56 AM, Wang Nan wrote:
This patch adds basic 'struct bpf_object' which will be used for eBPF
object file loading. eBPF object files are compiled by LLVM as ELF
format. In this patch, libelf is used to open those files, read EHDR
and do basic validation according to e_type and
This patch adds basic 'struct bpf_object' which will be used for eBPF
object file loading. eBPF object files are compiled by LLVM as ELF
format. In this patch, libelf is used to open those files, read EHDR
and do basic validation according to e_type and e_machine.
All elf related staffs are
This patch adds basic 'struct bpf_object' which will be used for eBPF
object file loading. eBPF object files are compiled by LLVM as ELF
format. In this patch, libelf is used to open those files, read EHDR
and do basic validation according to e_type and e_machine.
All elf related staffs are
16 matches
Mail list logo