[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2013/6/11 Vince Weaver <vincent.weaver@xxxxxxxxx>:
>
> perf_event exports a bunch of event info via /sys under
> /sys/bus/event_source/devices
>
> By parsing these files it's possible to generate more likely valid
> (and almost-valid) events.  It also makes exercising expanded PMUs
> (such as uncore events on recent Intel machines) possible.
>
> The included somewhat ugly patch enables generating events based
> on the sysfs files (1 time out of 9).  It sets up a table of all
> possible event fields and generalized events for all detected event
> types the first time such an event is requested, then uses this table
> to generate events subsequent times.
>
> The parser is possibly fragile.  The perf tool actually has a full
> lexer to handle the parsing of these files.  I've tested on a core2
> and sandybridge machine but it might possibly fail on more obscure
> machines, especially if any have non-contiguous event fields.
>
> Signed-off-by: Vince Weaver <vincent.weaver@xxxxxxxxx>
>
> +static long long random_sysfs_config(__u32 *type, __u64 *config1) {
> +
> +       int i,j;
> +       long long c=0,c1=0;
> +
> +       i=rand()%num_pmus;

Hi, I'm occasionally seeing:

Unable to opendir /sys/bus/event_source/devices : Resource temporarily
unavailable
[221186.493638] traps: trinity-child30[375] trap divide error
ip:40dbae sp:7fff3c1d7ae0 error:0 in trinity[400000+28000]

One of the cores collected with -D gives me:

Core was generated by `./trinity -q -l off -C40 -D'.
Program terminated with signal 8, Arithmetic exception.
#0  0x000000000040dbae in random_sysfs_config (config1=0x1676038,
type=<optimized out>) at syscalls/perf_event_open.c:409
409             i=rand()%num_pmus;
#0  0x000000000040dbae in random_sysfs_config (config1=0x1676038,
type=<optimized out>) at syscalls/perf_event_open.c:409
#1  random_event_config (event_type=event_type@entry=0x1676000,
config1=config1@entry=0x1676038) at syscalls/perf_event_open.c:652
#2  0x000000000040e1e2 in create_mostly_valid_counting_event
(attr=0x1676000) at syscalls/perf_event_open.c:779

Tommi
--
To unsubscribe from this list: send the line "unsubscribe trinity" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux SCSI]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux