Coder Social home page Coder Social logo

numap's People

Contributors

kwakwaouaite avatar trahay avatar

numap's Issues

Invalid header

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}

Data amount limiter

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.

Proper implementation of data backup

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.

  • in numap_analyse.c : numap_sampling_print

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.

  • Who has to implement the signal handler ? (User/Library)
  • Is the mem_sampling_backed global var a good thing ? Can't it be more clean ?
  • Same questions about link_fd_measure
  • What names are good to keep ? What names have to be modified ?

Data amount not persistent

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%`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.