jcsaezal / pmctrack Goto Github PK
View Code? Open in Web Editor NEWPMCTrack: an OS-oriented performance monitoring tool for Linux
Home Page: https://pmctrack-linux.github.io/
License: GNU General Public License v2.0
PMCTrack: an OS-oriented performance monitoring tool for Linux
Home Page: https://pmctrack-linux.github.io/
License: GNU General Public License v2.0
I successfully build on kernel 5.15.30-051530-generic but it fails on insod module. dmesg when checking the info it says
[49232.363857] ftrace - set filter for finish_task_switch failed. error code -22
I want to measure the LLC misses at kernel level. I see you mention to use int pmcs_get_current_metric_value( struct task_struct* task, int metric_id, uint64_t* value )
function after setting prof_enabled
to 1 in tast_struct
. But I can't find valid values for metric_id
.
Hi,
Is there any documentation of how to get energy/power samples periodically from an Odroid Smart Power2 board using pmctrack?
Thank you,
Anwesha
Is there a patch of linux kernel 4.9.y for odroid xu4?
I have written a monitoring module which periodically reads LLC misses and cycles, and computes a first metric, i.e. rate. I also have a second metric which is only the value of LLC misses counted. I can successfully use these values in my custom scheduler, which is great ! Then I also wrote a multi-threaded user-space application which uses libpmctrack to count the LLC misses, as in the example in test/test_libpmctrack/basic-test-libpmctrack. If the dummy monitoring module is active I can read some values, however if I activate my monitoring module by echoing the respective index in /proc/pmc/mm_manager
I do not read any value and the libpmctrack functions failed in trying to read /proc/pmc/config file
. This should happen because I haven't exported the counters as virtual counters. Looking at the dummy monitoring module and at the ipc_sampling module, I added a callback mymodule_counter_usage()
, which sets the following fields in the usage structure:
usage->hwpmc_mask = 0x0;
usage->nr_virtual_counters = 1;
usage->nr_experiments = 1;
usage->vcounter_desc[0] = "LLC miss count"
Also I added the following lines in mymodule_on_new_sample()
callback to update the virtual counters:
if ((prof->virt_counter_mask & 0x1)) { sample->virt_mask |= 0x1; sample->nr_virt_counts++; sample->virtual_counts[0] = llc_data->llc_misses; }
In this way I can get some values, but I am not sure what I am actually reading as well as I would like to know more on how to properly export the counters and therefore be able to gather counter values from user applications with libpmctrack that are running on a system which uses at the same time my monitoring module in its scheduler.
Thank you in advance for you help and for pmctrack !
Hi. When I was following the guide to patch the kernel in the xu3, I came across the following error.
The error states that the following patch was rejected.
Is this something I should be concerned about?
==============================================================
--- arch/arm/boot/dts/exynos5422_evt0.dtsi
+++ arch/arm/boot/dts/exynos5422_evt0.dtsi
@@ -91,6 +91,17 @@
};
};
+ arm-pmu {
+ compatible = "arm,cortex-a15-pmu";
+ interrupt-parent = <&combiner>;
+ interrupts = <1 2>, <7 0>, <16 6>, <19 2>;
+ /*
+ compatible = "arm,cortex-a7-pmu";
+ interrupt-parent = <&gic>;
+ interrupts = <0 192 4>, <0 193 4>, <0 194 4>, <0 195 4>;
+ */
+ };
+
watchdog@10020000 {
compatible = "samsung,s3c2410-wdt";
reg = <0x101D0000 0x100>;
==============================================================
Hi,
I am using XU3 with PMCTrack. I followed your guide on getting PMCTrack on the XU3.
Mostly it works, except for a small error during patching where heap #1 was not successful.
However, everything else worked and compiled.
Early test seem to point that pmctrack works but when I start using larger benchmark applications (e.g. parboil) I start getting zeroes in my data. (see example below)
I have tried setting the mm_manager to 1, but i get an error and I found a post in odroid forum that advises to set it to 0.
I hope someone can advise me what I am doing wrong.
Or better still have a working image for XU3.
I would like to obtain performance counters and energy reading of an application for my research work and pmctrack+odroid-xu3 seem to be my best bet.
odroid@odroid:~/PB/parboil$ pmctrack -T 1 -c instr,cycles,llc_misses ./parboil r un cutcp base small
[Event-to-counter mappings]
pmc1=instr
pmc2=cycles
pmc3=llc_misses
[Event counts]
nsample pid event pmc1 pmc2 pmc3
Parboil parallel benchmark suite, version 0.2
read 5943 atoms from file '/home/odroid/PB/parboil/datasets/cutcp/small/input/wa tbox.sl40.pqr'
extent of domain is:
minimum -19.998 -19.941 -19.961
maximum 19.974 20 19.974
padding domain by 0.5 Angstroms
domain lengths are 40.972 by 40.941 by 40.935
1 4158 tick 45426348 68833709 78206
2 4158 tick 0 0 0
3 4158 tick 0 0 0
4 4158 tick 0 0 0
5 4158 tick 0 0 0
6 4158 tick 0 0 0
7 4158 tick 0 0 0
8 4158 tick 0 0 0
9 4158 tick 0 0 0
10 4158 tick 0 0 0
11 4158 tick 0 0 0
12 4158 tick 0 0 0
13 4158 tick 0 0 0
14 4158 tick 0 0 0
15 4158 tick 0 0 0
16 4158 tick 0 0 0
17 4158 tick 0 0 0
18 4158 tick 0 0 0
19 4158 tick 0 0 0
20 4158 tick 0 0 0
21 4158 tick 0 0 0
22 4158 tick 0 0 0
23 4158 tick 0 0 0
24 4158 tick 0 0 0
25 4158 tick 0 0 0
26 4158 tick 0 0 0
27 4158 tick 0 0 0
28 4158 tick 0 0 0
29 4158 tick 0 0 0
30 4158 tick 0 0 0
31 4158 tick 0 0 0
32 4158 tick 0 0 0
33 4158 tick 0 0 0
IO : 0.035814
Compute : 32.895776
Timer Wall Time: 32.931599
Pass
34 4158 migration 173104 654628 2465
35 4158 exit 4209084 13617505 58913
odroid@odroid:~/PB/parboil$
Hi,
Would it be possible to concurrently obtain 5 applications pmc separately?
E.g. I have 5 applications that needs to run concurrently, but I need to obtain the pmc counts for each application.
Hi,
Is there any patch for kernel v4.17-x86? How can I use PMCTrack on this kernel?
Thanks
Hi, I am trying to get stats for multiple counters. I am getting the following in the output file:
[Event-to-counter mappings]
pmc1=instr(0),llc_misses(1)
pmc2=cycles(0),bus_accesses(1)
pmc3=l2_cache_accesses(0)
pmc4=l1_data_accesses(0)
[Event counts]
nsample cpu coretype expid event pmc1 pmc2 pmc3 pmc4
1 0 0 0 tick 16201 122948 2471 5695
2 1 0 0 tick 897005 4291915 11347 206329
3 2 0 0 tick 10178 83281 1693 4096
4 3 0 0 tick 1626577 5142808 69491 685774
5 4 1 0 tick 17712 67290 2093 8100
6 5 1 0 tick 115 1929 78 44
7 6 1 0 tick 46568 167465 4011 17111
8 7 1 0 tick 0 0 0 0
9 0 0 1 tick 0 0 - -
10 1 0 1 tick 3331 82381 - -
11 2 0 1 tick 0 0 - -
12 3 0 1 tick 4179 18810 - -
13 4 1 1 tick 106 493 - -
14 5 1 1 tick 0 0 - -
15 6 1 1 tick 486 3060 - -
16 7 1 1 tick 0 0 - -
17 0 0 0 tick 0 0 0 0
18 1 0 0 tick 2372160 10162903 50591 540864
19 2 0 0 tick 0 0 0 0
20 3 0 0 tick 646372 1332981 15585 228872
21 4 1 0 tick 50142 69657 1440 20128
22 5 1 0 tick 0 0 0 0
23 6 1 0 tick 189017 381921 14571 55095
24 7 1 0 tick 0 0 0 0
25 0 0 1 tick 0 0 - -
26 1 0 1 tick 1239 499002 - -
27 2 0 1 tick 0 0 - -
28 3 0 1 tick 0 0 - -
29 4 1 1 tick 45 208 - -
30 5 1 1 tick 0 0 - -
31 6 1 1 tick 757 4199 - -
32 7 1 1 tick 0 0 - -
Does this mean that I can not record more than 4 counters at one particular instant?
Or expid 0 and 1 both are recorded at the same time but displayed separately? what does expid represent?
Can you please explain how to interpret this output?
Thank you.
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.