public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Jiri Olsa <jolsa@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>,
	Namhyung Kim <namhyung@kernel.org>,
	David Ahern <dsahern@gmail.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: perf tools event parsing code
Date: Fri, 31 Jul 2015 17:55:32 -0300	[thread overview]
Message-ID: <20150731205532.GC16700@kernel.org> (raw)

Trying to figure out why this cset, by Wangnan:

https://git.kernel.org/cgit/linux/kernel/git/acme/linux.git/commit/?h=perf/ebpf&id=42cb6deef348f6afece0ad6fd7b034bfb532000e

doesn't make the routine he associated with parsing '--event bpf_program.o',
ended up in this:

#0  parse_events__scan_bytes (yybytes=yybytes@entry=0x7fffffff8480 "event=0x2e,umask=0x4f\n", _yybytes_len=22, yyscanner=0x18e4c30)
    at util/parse-events-flex.c:3312
#1  0x00000000004addb3 in parse_events__scan_string (yystr=<optimized out>, yystr@entry=0x7fffffff8480 "event=0x2e,umask=0x4f\n", yyscanner=<optimized out>)
    at util/parse-events-flex.c:3274
#2  0x000000000048a5e7 in parse_events__scanner (str=str@entry=0x7fffffff8480 "event=0x2e,umask=0x4f\n", data=data@entry=0x7fffffff83f0, 
    start_token=start_token@entry=259) at util/parse-events.c:1081
#3  0x000000000048ca52 in parse_events_terms (terms=terms@entry=0x18e4a88, str=str@entry=0x7fffffff8480 "event=0x2e,umask=0x4f\n")
    at util/parse-events.c:1104
#4  0x00000000004b2497 in __perf_pmu__new_alias (list=list@entry=0x7fffffffa700, dir=dir@entry=0x7fffffff96b0 "/sys/bus/event_source/devices/cpu/events", 
    name=name@entry=0x18d864b "cache-references", desc=desc@entry=0x0, val=val@entry=0x7fffffff8480 "event=0x2e,umask=0x4f\n") at util/pmu.c:224
#5  0x00000000004b25c0 in perf_pmu__new_alias (list=list@entry=0x7fffffffa700, dir=dir@entry=0x7fffffff96b0 "/sys/bus/event_source/devices/cpu/events", 
    name=name@entry=0x18d864b "cache-references", file=file@entry=0x18d67e0) at util/pmu.c:258
#6  0x00000000004b2788 in pmu_aliases_parse (dir=dir@entry=0x7fffffff96b0 "/sys/bus/event_source/devices/cpu/events", head=head@entry=0x7fffffffa700)
    at util/pmu.c:313
#7  0x00000000004b2864 in pmu_aliases (name=name@entry=0x5b9c47 "cpu", head=head@entry=0x7fffffffa700) at util/pmu.c:340
#8  0x00000000004b328a in pmu_lookup (name=<optimized out>, name@entry=0x5b9c47 "cpu") at util/pmu.c:477
#9  0x00000000004b33de in perf_pmu__find (name=name@entry=0x5b9c47 "cpu") at util/pmu.c:541
#10 0x000000000048a445 in perf_pmu__parse_init () at util/parse-events.c:1008
#11 0x000000000048b86d in perf_pmu__parse_check (name=name@entry=0x18d6c40 "file.c") at util/parse-events.c:1054
#12 0x00000000004ad4e2 in pmu_str_check (scanner=scanner@entry=0x18d6f20) at util/parse-events.l:74
#13 0x00000000004af78b in parse_events_lex (yylval_param=yylval_param@entry=0x7fffffffa900, yylloc_param=yylloc_param@entry=0x7fffffffa920, 
    yyscanner=yyscanner@entry=0x18d6f20) at util/parse-events.l:267
#14 0x00000000004b042c in parse_events_parse (_data=_data@entry=0x7fffffffbec0, scanner=0x18d6f20) at util/parse-events-bison.c:1570
#15 0x000000000048a5f6 in parse_events__scanner (str=str@entry=0x7fffffffe778 "file.c", data=data@entry=0x7fffffffbec0, start_token=start_token@entry=258)
    at util/parse-events.c:1086
#16 0x000000000048b955 in parse_events (evlist=0x18d7b90, str=str@entry=0x7fffffffe778 "file.c", err=err@entry=0x7fffffffbf10) at util/parse-events.c:1126
#17 0x000000000048b9f7 in parse_events_option (opt=<optimized out>, str=0x7fffffffe778 "file.c", unset=<optimized out>) at util/parse-events.c:1224
#18 0x0000000000487f30 in get_value (p=p@entry=0x7fffffffc0b0, opt=0x831c00 <__record_options>, flags=flags@entry=1) at util/parse-options.c:151
#19 0x000000000048823e in parse_short_opt (p=p@entry=0x7fffffffc0b0, options=<optimized out>, options@entry=0x831c00 <__record_options>)
    at util/parse-options.c:230
#20 0x0000000000488d6e in parse_options_step (ctx=ctx@entry=0x7fffffffc0b0, options=options@entry=0x831c00 <__record_options>, 
    usagestr=usagestr@entry=0x599850 <__record_usage>) at util/parse-options.c:401
#21 0x000000000048918c in parse_options_subcommand (argc=argc@entry=5, argv=argv@entry=0x7fffffffe520, options=0x831c00 <__record_options>, 
    subcommands=subcommands@entry=0x0, usagestr=0x599850 <__record_usage>, flags=flags@entry=2) at util/parse-options.c:518
#22 0x00000000004892da in parse_options (argc=argc@entry=5, argv=argv@entry=0x7fffffffe520, options=<optimized out>, usagestr=<optimized out>, 
    flags=flags@entry=2) at util/parse-options.c:553
#23 0x000000000042ad70 in cmd_record (argc=5, argv=0x7fffffffe520, prefix=<optimized out>) at builtin-record.c:1102
#24 0x0000000000474253 in run_builtin (p=p@entry=0x83c7f0 <commands+144>, argc=argc@entry=5, argv=argv@entry=0x7fffffffe520) at perf.c:370
#25 0x000000000047443f in handle_internal_command (argc=5, argv=0x7fffffffe520) at perf.c:429
#26 0x00000000004744b0 in run_argv (argcp=argcp@entry=0x7fffffffe38c, argv=argv@entry=0x7fffffffe380) at perf.c:473
#27 0x0000000000474726 in main (argc=5, argv=0x7fffffffe520) at perf.c:588
(gdb) 

/me trying to figure out this problem, but also how to avoid doing all this
seemingly unnecessary work, i.e. reading everything on the sysfs pmu files when
trying to figure out if this is a bpf filter event (-e foo.o).

Ideas?

- Arnaldo

             reply	other threads:[~2015-07-31 20:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-31 20:55 Arnaldo Carvalho de Melo [this message]
2015-08-02 19:56 ` perf tools event parsing code Jiri Olsa
2015-08-03 15:12   ` Arnaldo Carvalho de Melo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150731205532.GC16700@kernel.org \
    --to=acme@kernel.org \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox