* [PATCH dwarves 1/2] btf_loader: send warnings to stderr
@ 2024-10-17 9:24 Alan Maguire
2024-10-17 9:24 ` [PATCH dwarves 2/2] tests/btf_functions: redirect stderr for pfunct --format_path=btf Alan Maguire
2024-10-17 20:27 ` [PATCH dwarves 1/2] btf_loader: send warnings to stderr Arnaldo Carvalho de Melo
0 siblings, 2 replies; 5+ messages in thread
From: Alan Maguire @ 2024-10-17 9:24 UTC (permalink / raw)
To: acme; +Cc: dwarves, eddyz87, Alan Maguire
Among other things, this helps simplify tests/btf_functions.sh.
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
---
btf_loader.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/btf_loader.c b/btf_loader.c
index c70b67f..4814f29 100644
--- a/btf_loader.c
+++ b/btf_loader.c
@@ -449,7 +449,7 @@ static int create_new_tag(struct cu *cu, int type, const struct btf_type *tp, ui
case BTF_KIND_TYPE_TAG: tag->tag = DW_TAG_LLVM_annotation; break;
default:
free(tag);
- printf("%s: Unknown type %d\n\n", __func__, type);
+ fprintf(stderr, "%s: Unknown type %d\n\n", __func__, type);
return 0;
}
@@ -470,7 +470,7 @@ static int process_decl_tag(struct cu *cu, const struct btf_type *tp)
tag = cu__tag(cu, tp->type);
if (tag == NULL) {
- printf("WARNING: BTF_KIND_DECL_TAG for unknown BTF id %d\n", tp->type);
+ fprintf(stderr, "WARNING: BTF_KIND_DECL_TAG for unknown BTF id %d\n", tp->type);
return 0;
}
@@ -478,7 +478,8 @@ static int process_decl_tag(struct cu *cu, const struct btf_type *tp)
if (tag->attribute != NULL) {
char bf[128];
- printf("WARNING: still unsuported BTF_KIND_DECL_TAG(%s) for %s already with attribute (%s), ignoring\n",
+
+ fprintf(stderr, "WARNING: still unsuported BTF_KIND_DECL_TAG(%s) for %s already with attribute (%s), ignoring\n",
attribute, tag__name(tag, cu, bf, sizeof(bf), NULL), tag->attribute);
} else {
tag->attribute = attribute;
--
2.43.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH dwarves 2/2] tests/btf_functions: redirect stderr for pfunct --format_path=btf
2024-10-17 9:24 [PATCH dwarves 1/2] btf_loader: send warnings to stderr Alan Maguire
@ 2024-10-17 9:24 ` Alan Maguire
2024-10-17 20:27 ` [PATCH dwarves 1/2] btf_loader: send warnings to stderr Arnaldo Carvalho de Melo
1 sibling, 0 replies; 5+ messages in thread
From: Alan Maguire @ 2024-10-17 9:24 UTC (permalink / raw)
To: acme; +Cc: dwarves, eddyz87, Alan Maguire
...since otherwise we will see the following during test execution
WARNING: still unsuported BTF_KIND_DECL_TAG(bpf_fastcall) for bpf_iter_css_task_next already with attribute (bpf_kfunc), ignoring
WARNING: still unsuported BTF_KIND_DECL_TAG(bpf_fastcall) for bpf_iter_bits_new already with attribute (bpf_kfunc), ignoring
Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
---
tests/btf_functions.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/btf_functions.sh b/tests/btf_functions.sh
index 5794be9..1a28923 100755
--- a/tests/btf_functions.sh
+++ b/tests/btf_functions.sh
@@ -53,13 +53,13 @@ pahole --btf_features=default --btf_encode_detached=$outdir/vmlinux.btf --verbos
test -n "$VERBOSE" && printf "done.\n"
-funcs=$(pfunct --format_path=btf $outdir/vmlinux.btf |sort)
+funcs=$(pfunct --format_path=btf $outdir/vmlinux.btf 2>/dev/null|sort)
# all functions from DWARF; some inline functions are not inlined so include them too
pfunct --all --no_parm_names --format_path=dwarf $vmlinux | \
sort|uniq > $outdir/dwarf.funcs
# all functions from BTF (removing bpf_kfunc prefix where found)
-pfunct --all --no_parm_names --format_path=btf $outdir/vmlinux.btf |\
+pfunct --all --no_parm_names --format_path=btf $outdir/vmlinux.btf 2>/dev/null|\
awk '{ gsub("^bpf_kfunc ",""); print $0}'|sort|uniq > $outdir/btf.funcs
exact=0
--
2.43.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH dwarves 1/2] btf_loader: send warnings to stderr
2024-10-17 9:24 [PATCH dwarves 1/2] btf_loader: send warnings to stderr Alan Maguire
2024-10-17 9:24 ` [PATCH dwarves 2/2] tests/btf_functions: redirect stderr for pfunct --format_path=btf Alan Maguire
@ 2024-10-17 20:27 ` Arnaldo Carvalho de Melo
2024-10-23 11:41 ` Alan Maguire
1 sibling, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-10-17 20:27 UTC (permalink / raw)
To: Alan Maguire; +Cc: dwarves, eddyz87
On Thu, Oct 17, 2024 at 10:24:32AM +0100, Alan Maguire wrote:
> Among other things, this helps simplify tests/btf_functions.sh.
Thanks, applied both patches.
- Arnaldo
> Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
> ---
> btf_loader.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/btf_loader.c b/btf_loader.c
> index c70b67f..4814f29 100644
> --- a/btf_loader.c
> +++ b/btf_loader.c
> @@ -449,7 +449,7 @@ static int create_new_tag(struct cu *cu, int type, const struct btf_type *tp, ui
> case BTF_KIND_TYPE_TAG: tag->tag = DW_TAG_LLVM_annotation; break;
> default:
> free(tag);
> - printf("%s: Unknown type %d\n\n", __func__, type);
> + fprintf(stderr, "%s: Unknown type %d\n\n", __func__, type);
> return 0;
> }
>
> @@ -470,7 +470,7 @@ static int process_decl_tag(struct cu *cu, const struct btf_type *tp)
> tag = cu__tag(cu, tp->type);
>
> if (tag == NULL) {
> - printf("WARNING: BTF_KIND_DECL_TAG for unknown BTF id %d\n", tp->type);
> + fprintf(stderr, "WARNING: BTF_KIND_DECL_TAG for unknown BTF id %d\n", tp->type);
> return 0;
> }
>
> @@ -478,7 +478,8 @@ static int process_decl_tag(struct cu *cu, const struct btf_type *tp)
>
> if (tag->attribute != NULL) {
> char bf[128];
> - printf("WARNING: still unsuported BTF_KIND_DECL_TAG(%s) for %s already with attribute (%s), ignoring\n",
> +
> + fprintf(stderr, "WARNING: still unsuported BTF_KIND_DECL_TAG(%s) for %s already with attribute (%s), ignoring\n",
> attribute, tag__name(tag, cu, bf, sizeof(bf), NULL), tag->attribute);
> } else {
> tag->attribute = attribute;
> --
> 2.43.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH dwarves 1/2] btf_loader: send warnings to stderr
2024-10-17 20:27 ` [PATCH dwarves 1/2] btf_loader: send warnings to stderr Arnaldo Carvalho de Melo
@ 2024-10-23 11:41 ` Alan Maguire
2024-10-23 14:28 ` Arnaldo Carvalho de Melo
0 siblings, 1 reply; 5+ messages in thread
From: Alan Maguire @ 2024-10-23 11:41 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo; +Cc: dwarves, eddyz87
hey Arnaldo
On 17/10/2024 21:27, Arnaldo Carvalho de Melo wrote:
> On Thu, Oct 17, 2024 at 10:24:32AM +0100, Alan Maguire wrote:
>> Among other things, this helps simplify tests/btf_functions.sh.
>
> Thanks, applied both patches.
>
I'm still not seeing those patches in the next tree; is it possible they
got lost in the flurry of changes? Thanks!
Alan
> - Arnaldo
>
>> Signed-off-by: Alan Maguire <alan.maguire@oracle.com>
>> ---
>> btf_loader.c | 7 ++++---
>> 1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/btf_loader.c b/btf_loader.c
>> index c70b67f..4814f29 100644
>> --- a/btf_loader.c
>> +++ b/btf_loader.c
>> @@ -449,7 +449,7 @@ static int create_new_tag(struct cu *cu, int type, const struct btf_type *tp, ui
>> case BTF_KIND_TYPE_TAG: tag->tag = DW_TAG_LLVM_annotation; break;
>> default:
>> free(tag);
>> - printf("%s: Unknown type %d\n\n", __func__, type);
>> + fprintf(stderr, "%s: Unknown type %d\n\n", __func__, type);
>> return 0;
>> }
>>
>> @@ -470,7 +470,7 @@ static int process_decl_tag(struct cu *cu, const struct btf_type *tp)
>> tag = cu__tag(cu, tp->type);
>>
>> if (tag == NULL) {
>> - printf("WARNING: BTF_KIND_DECL_TAG for unknown BTF id %d\n", tp->type);
>> + fprintf(stderr, "WARNING: BTF_KIND_DECL_TAG for unknown BTF id %d\n", tp->type);
>> return 0;
>> }
>>
>> @@ -478,7 +478,8 @@ static int process_decl_tag(struct cu *cu, const struct btf_type *tp)
>>
>> if (tag->attribute != NULL) {
>> char bf[128];
>> - printf("WARNING: still unsuported BTF_KIND_DECL_TAG(%s) for %s already with attribute (%s), ignoring\n",
>> +
>> + fprintf(stderr, "WARNING: still unsuported BTF_KIND_DECL_TAG(%s) for %s already with attribute (%s), ignoring\n",
>> attribute, tag__name(tag, cu, bf, sizeof(bf), NULL), tag->attribute);
>> } else {
>> tag->attribute = attribute;
>> --
>> 2.43.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH dwarves 1/2] btf_loader: send warnings to stderr
2024-10-23 11:41 ` Alan Maguire
@ 2024-10-23 14:28 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2024-10-23 14:28 UTC (permalink / raw)
To: Alan Maguire; +Cc: dwarves, eddyz87
On Wed, Oct 23, 2024 at 12:41:33PM +0100, Alan Maguire wrote:
> hey Arnaldo
>
>
>
> On 17/10/2024 21:27, Arnaldo Carvalho de Melo wrote:
> > On Thu, Oct 17, 2024 at 10:24:32AM +0100, Alan Maguire wrote:
> >> Among other things, this helps simplify tests/btf_functions.sh.
> >
> > Thanks, applied both patches.
> >
>
> I'm still not seeing those patches in the next tree; is it possible they
> got lost in the flurry of changes? Thanks!
It was on my office machine:
b77d88003eb53fa1 (HEAD -> master) btf_encoder: Use the ELF_C_READ_MMAP mode with elf_begin()
11b59c00770dbe26 tests/btf_functions: Redirect stderr for pfunct --format_path=btf
0ee47254eae5ae26 btf_loader: Send warnings to stderr
e91433cb3bb5bf58 tests: Use PAHOLE_LANG_EXCLUDE=rust to skip Rust CUs
97f2f7ba05508273 pfunct: Use languages__init() to honour PAHOLE_LANG_EXCLUDE
cbb1149c4eaf01b1 languages: Introduce languages__cu_filtered() from pahole's cu__filter()
fa7458521b6e421f languages: Use PAHOLE_LANG_EXCLUDE env var if present, as a fallback
1f25386486e4d7b5 languages: Introduce language__init()
8fc09fd3315ce934 core: Adopt the languages__parse(), languages__in() and 'struct languages' from pahole
b9a0283d24fe31c5 languages: Start making 'struct languages' a class
⬢ [acme@toolbox pahole]$
I'm doing some tests and pushing it out to next.
- Arnaldo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-10-23 14:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-17 9:24 [PATCH dwarves 1/2] btf_loader: send warnings to stderr Alan Maguire
2024-10-17 9:24 ` [PATCH dwarves 2/2] tests/btf_functions: redirect stderr for pfunct --format_path=btf Alan Maguire
2024-10-17 20:27 ` [PATCH dwarves 1/2] btf_loader: send warnings to stderr Arnaldo Carvalho de Melo
2024-10-23 11:41 ` Alan Maguire
2024-10-23 14:28 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox