madewink / numap Goto Github PK
View Code? Open in Web Editor NEWThis project forked from numap-library/numap
Fork of numap, on which I worked during my internship, fully merged.
This project forked from numap-library/numap
Fork of numap, on which I worked during my internship, fully merged.
Since 0beb60c, numap_sampling_print function from src/numap_analyse.c is broken :
We have a header initialized as follows :
213 struct perf_event_header *header = (struct perf_event_header *)((char *)metadata_page + measure->page_size);
Sometimes, this seems to work fine, but sometimes fail, indicating
Error: invalid header size = 0
Actually, it happens really often when running with gdb, and rarely otherwise, but it happens more often as we increase size in to_be_profiled in example.c
Running with gdb to see what header contains.
Example of (supposedly) correct header :
{type = 9, misc = 16386, size = 40}
Example of wrong header
{type = 4155838144, misc = 32767, size = 0}
It could be wise to limit the amount of data which can be produced, and prevent the user from generating dozens of Gb of data.
Since 65e9b68 things seem to work quite well and to be more and more clean (event though the cleaner is called in numap_sampling_end, which I believe is not called anywhere, so there has to be some memory leaks).
However, there are still some adjustments to make.
This list will be edited as I check what has to be modified
Before those adjustments, some decisions have to be made, and related questions have to be answered.
When setting signal interruption, much less data is collected, with no obvious reason.
When signal is not set (with numap_sampling_set_mode_buffer_flush), final data_head often is around 180 000, with little variations (5-10% i'd say), but when signal interruption is set, even if the signal handler does nothing but resetting itself (or so I think), final data_head seems much more random, and the most extreme case I found was a data_head at 40, which represents only one sample (see log).
Log with signal interruption not set :
`Starting memory read sampling
Memory read sampling results
head = 182096 compared to max = 266240
Thread 0: 4450 samples
Thread 0: 4449 local cache 1 99.978%
Thread 0: 0 local cache 2 0.000%
Thread 0: 0 local cache 3 0.000%
Thread 0: 0 local cache LFB 0.000%
Thread 0: 1 local memory 0.022%
Thread 0: 0 remote cache or local memory 0.000%
Thread 0: 0 remote memory 0.000%
Thread 0: 0 unknown l3 miss 0.000%
head = 182392 compared to max = 266240
Thread 1: 4451 samples
Thread 1: 4451 local cache 1 100.000%
Thread 1: 0 local cache 2 0.000%
Thread 1: 0 local cache 3 0.000%
Thread 1: 0 local cache LFB 0.000%
Thread 1: 0 local memory 0.000%
Thread 1: 0 remote cache or local memory 0.000%
Thread 1: 0 remote memory 0.000%
Thread 1: 0 unknown l3 miss 0.000%
Starting memory write sampling
Memory write sampling results
head = 181864 compared to max = 266240
Thread 0: 4433 samples
Thread 0: 4433 local cache 1 100.000%
Thread 0: 0 local cache 2 0.000%
Thread 0: 0 local cache 3 0.000%
Thread 0: 0 local cache LFB 0.000%
Thread 0: 0 local memory 0.000%
Thread 0: 0 remote cache or local memory 0.000%
Thread 0: 0 remote memory 0.000%
Thread 0: 0 unknown l3 miss 0.000%
head = 183536 compared to max = 266240
Thread 1: 4474 samples
Thread 1: 4474 local cache 1 100.000%
Thread 1: 0 local cache 2 0.000%
Thread 1: 0 local cache 3 0.000%
Thread 1: 0 local cache LFB 0.000%
Thread 1: 0 local memory 0.000%
Thread 1: 0 remote cache or local memory 0.000%
Thread 1: 0 remote memory 0.000%
Thread 1: 0 unknown l3 miss 0.000%`
Log with signal interruption set :
`Starting memory read sampling
Memory read sampling results
head = 1920 compared to max = 266240
Thread 0: 48 samples
Thread 0: 48 local cache 1 100.000%
Thread 0: 0 local cache 2 0.000%
Thread 0: 0 local cache 3 0.000%
Thread 0: 0 local cache LFB 0.000%
Thread 0: 0 local memory 0.000%
Thread 0: 0 remote cache or local memory 0.000%
Thread 0: 0 remote memory 0.000%
Thread 0: 0 unknown l3 miss 0.000%
head = 184592 compared to max = 266240
Thread 1: 4614 samples
Thread 1: 4614 local cache 1 100.000%
Thread 1: 0 local cache 2 0.000%
Thread 1: 0 local cache 3 0.000%
Thread 1: 0 local cache LFB 0.000%
Thread 1: 0 local memory 0.000%
Thread 1: 0 remote cache or local memory 0.000%
Thread 1: 0 remote memory 0.000%
Thread 1: 0 unknown l3 miss 0.000%
Starting memory write sampling
Memory write sampling results
head = 262104 compared to max = 266240
Thread 0: 6407 samples
Thread 0: 6407 local cache 1 100.000%
Thread 0: 0 local cache 2 0.000%
Thread 0: 0 local cache 3 0.000%
Thread 0: 0 local cache LFB 0.000%
Thread 0: 0 local memory 0.000%
Thread 0: 0 remote cache or local memory 0.000%
Thread 0: 0 remote memory 0.000%
Thread 0: 0 unknown l3 miss 0.000%
head = 40 compared to max = 266240
Thread 1: 1 samples
Thread 1: 1 local cache 1 100.000%
Thread 1: 0 local cache 2 0.000%
Thread 1: 0 local cache 3 0.000%
Thread 1: 0 local cache LFB 0.000%
Thread 1: 0 local memory 0.000%
Thread 1: 0 remote cache or local memory 0.000%
Thread 1: 0 remote memory 0.000%
Thread 1: 0 unknown l3 miss 0.000%`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.