summaryrefslogtreecommitdiffstats
path: root/src/plugins/perfmon
AgeCommit message (Collapse)AuthorFilesLines
2022-02-18perfmon: show distribution of uops delivered to frontendRay Kinsella4-8/+109
Breakdown the distribution of uops delivered to the frontend. Collerates directly with the source of the uops. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I93a57dbe56dfa0f378527844aa4e63f45a548e55
2022-02-06perfmon: Fix typo in debug log messagesJon Loeliger1-2/+2
Signed-off-by: Jon Loeliger <jdl@netgate.com> Type: style Change-Id: I955c19ddbe06ef3651c03820fcc14054c63258b9
2022-01-30perfmon: topdown level 1 and 2 for icxRay Kinsella4-63/+183
Topdown level 1 and 2 for Intel Ice Lake (ICX). Limiting topdown support to THREAD for the moment on Ice Lake, as NODE support is still unreliable. Also removing Topdown Level 1 from Sapphire Rapids onwards, as Topdown LeveL 2 also shows Level 1 on Sapphire, and it reduces the overall number of bundles. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: Iaa68b711dc8b6fb1090880b411debadb3c37f8bc
2022-01-30perfmon: fix init of bundles with pseudo eventsRay Kinsella3-18/+41
Previously Linux pseudo events were being counted as multiple fixed events, such that a bundle with pseudo events could exceed the number of available fixed counters. Reworked to ignore pseudo events in the accounting for the moment. Type: fix Fixes: 0024e53ad Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: Ic938f8266fd04d7731afbd02e261c61ef22a8522
2022-01-30perfmon: check for duplicates after other checksRay Kinsella1-3/+3
Move checking for duplicate bundle names after the other checks. Type: fix Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I7fed5be758814e166eb8756b3df090130ac13bfd
2022-01-30perfmon: topdown backend bound core bundleRay Kinsella3-0/+118
Add a bundle to measure topdown backend bound core cycles, will indicate if any given execution port has contention. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I37d1b38c101ac42d51c10fa4452b822d34b729c9
2022-01-27perfmon: frontend and backend boundness bundlesRay Kinsella6-68/+334
Renamed memory stalls to topdown backend-bound-mem, added topdown frontend-bound-latency and frontend-bound-bandwidth. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I70f42b6b63fe2502635cad4aed4271e2bbdda5f1
2022-01-27perfmon: prune bundles by available pmu countersRay Kinsella3-7/+46
Prune perfmon bundles that exceed the number of available pmu counters. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I70fec26bb8ca915f4b980963e06c2e43dfde5a23
2022-01-27perfmon: add cli to show perf configRay Kinsella2-9/+37
Added a cli to show Linux perf config for a give perfmon bundle. This makes it easier to format Linux perf commands for next level analysis. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I9adafa7d441b72120390d186e3c8f884b1bc9828
2022-01-12perfmon: skipping bundle messageRay Kinsella1-1/+1
Change the skipping bundle message to debug Type: refactor Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I942ff72bd9c26ccad923442fdedddf22ba75e117
2021-12-02perfmon: compile dispatch wrapper once for each number of countersDamjan Marion3-35/+27
A bit ugly, but generates faster and less noisy code which should be important for this particular use case. Type: improvement Change-Id: If2bba947dac33ffedb4236a5b3fb50fc783668e1 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-12-02perfmon: refactor perf metric supportRay Kinsella4-189/+80
Refactoring perf metric support to remove branching on bundle type in the dispatch wrapper. This change includes caching the rdpmc index at perfmon_start(), so that the mmap_page.index doesn't need to be looked up each time. It also exclude the effects of mmap_page.index. This patch prepares the path for bundles that support general, fixed and metrics counters simulataneously. Type: refactor Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I9c5b4917bd02fea960e546e8558452c4362eabc4
2021-11-16perfmon: fix coverity warningKlement Sekera1-2/+9
Check for possible hash lookup failure to avoid NULL dereference. Type: fix Fixes: e15c999c30 Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: Ib806b4d124be26fbccf36fe9d19af1aec63f487b
2021-11-15perfmon: rename bundle to memory stallsRay Kinsella2-9/+9
Rename the memory bandwidth bundle to memory stalls, to differentiate it from the bundle that measures memory controller bandwidth boundedness. Type: refactor Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I828c73b6f769046e1ab592712bdf81ceefcd7911
2021-11-08perfmon: fix iio-bw coverity issuesRay Kinsella1-3/+1
Fixes an number of coverity issues associated with the iio-bw feature. Type: fix Fixes: e15c999c3 Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I9ad2b336694132545d90a3483200a510226e9198
2021-11-07perfmon: numa node list probing should use '/online' instead of '/has_cpu'Xiaoming Jiang1-1/+1
Type: fix Signed-off-by: Xiaoming Jiang <jiangxiaoming@outlook.com> Change-Id: I85e41d58884af71afba960d20604bb1b01876d26
2021-11-02perfmon: added bundle to measure pci bandwidthRay Kinsella2-0/+259
Added an Intel Ice Lake specific bundles to measure pci bandwidth through the Intel IO PMU. The "PCI" bundle measures read/writes from pci devices. The "CPU" bundle measure read/writes from cpus to pci devices. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: Id48cef5988113e8dc4690b97d22243311bfa7961
2021-11-02perfmon: added intel internal io pmu supportRay Kinsella2-9/+82
Added support for the Intel Internal IO Uncore PMU, along with the ability to format PMU Unit specific names. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I2939f8ade5e5ed63ccf7f3ccd0279d7c72e95a6e
2021-10-28perfmon: fix coverity warningKlement Sekera1-0/+8
Check that cpumask is initialised properly to avoid possible NULL pointer dereference. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I8df5a718104fe703d6baf3f1294b4a6d2ca01619
2021-10-26perfmon: properly unmap mmapped pagesKlement Sekera1-1/+1
Add missing array index so that actual mmapped pages are unmpapped instead of attempting to unmap array holding those pages. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: Ib8709cce1bcbfb505307c140266834b284af796c
2021-10-16perfmon: topdown lvl 2 support on sapphire rapidsRay Kinsella2-11/+167
Added topdown level 2 support on sapphire rapids, including ability to indentify a sapphire rapids cpu. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I9f99a92fa0886b98bb5185cff32bebd5a094f329
2021-10-16perfmon: additional perf counters on icelakeRay Kinsella2-1/+31
The Intel Icelake uArch supports measuring up to 12 counters, comprised of 4 fixed and 8 general counters. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I68369ea55a0c95d6a4a280a464e69502bbf5474f
2021-10-07perfmon: Topdown Level 1 support on SnowridgeRay Kinsella4-1/+102
Enable Topdown Level 1 support on Snowridge, enabled with standard CPU events on small core. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I58ad09383de7464265ac1b69e683f253591e3b5e
2021-10-07perfmon: check bundle is supportedRay Kinsella1-0/+23
Add a check bundle is supported before futher activation. Enable different bundles with same name, supported on different platforms. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I73e8bbd1e07c05ebccd9146d48a234eb598a2388
2021-10-07perfmon: fix peusdo eventsRay Kinsella1-1/+1
Fix peusdo events, missed populating "core" events with peusdo events. Type: fix Fixes: bf37bf6f7 Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I569fa876f1b58540adac0b095be0ff4ade664dec
2021-10-05perfmon: bundles with multiple typesRay Kinsella4-35/+147
Allow perfmon bundles to support more than one bundle type, either node or thread. Only used for topdown bundle for the moment. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: Iba3653a4deb39b0a8ee8ad448a7e8f954283ccd8
2021-10-04perfmon: topdown events as peusdo eventsRay Kinsella1-9/+13
Topdown events are peusdo events exposed by linux, and are only present on Intel platforms. Change to clarifies this. Type: fix Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I6a3dcea5f43f53dbb96475329baf5e596a24d54f
2021-09-17vppinfra: move format_table from perfmonNathan Skrzypczak4-373/+1
This code seems really usefull for reuse in other plugins, for pretty table formatting Type: feature Change-Id: Ib5784a0dfc81b7d5a5d1f5ccdd02072e460a50fb Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
2021-09-17misc: put devtools plugins into separate component/packageDamjan Marion1-0/+3
Type: make Change-Id: I2958e9eddadee6434766ecd3cdb3b9cea742ed64 Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-09-08perfmon: sort 'show perfmon bundle' outputZachary Leaf1-0/+11
This patch sorts 'show perfmon bundle' output in alphabetical order. Type: improvement Signed-off-by: Zachary Leaf <zachary.leaf@arm.com> Change-Id: I26b379b5d6766b9f87f9a3a5013ea92b207fb5d4
2021-09-08perfmon: add membw-bound bundleRay Kinsella4-1/+80
Added memory bandwidth boundedness bundle, closely related to cache-hierarchy. This bundle works on ICX only, due to an ICX specific counter. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: Id385bd5f4e645ac020774e311c623afb64b79b1e
2021-09-08perfmon: adding support for papi TMAMRay Kinsella4-54/+113
Adding support for Linux papi TMAM on Intel Snowridge. Adds the ability to indicate that a bundle should be thread or node bundle type based on available cpu features (rdpmc support). Type: feature Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: Ib871b2644fdb2410fbb580e0d21c3a8e2be13aba
2021-08-20perfmon: fix perf event user page readBenoît Ganne1-45/+76
When mmap()-ing perf event in userspace, we must adhere to the kernel update protocol to read consistent values. Also, 'offset' is an offset to add to the counter value, not to apply to the PMC index. Type: fix Change-Id: I59106bb3a48185ff3fcb0d2f09097269a67bb6d6 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2021-05-26perfmon: revert raw column supportRay Kinsella3-30/+0
Revert raw column from the perfmon plugin. Type: refactor Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: If127f57ee2022cc1c0ea5177f1655a792f195f1d
2021-04-27perfmon: top down level 1 supportmdr788-25/+247
Adding perfmon node TMAM support on ICX. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I48a9a9ff6a72efc28eaf0cb11ef39fb62cebb126
2021-04-01perfmon: combined set and start command.Ray Kinsella3-47/+36
Original set, start, stop, reset, show etc interface was somewhat cumbersome, we can improve slightly by combining set and start. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I7b865b2c29d2ab32adbd24d7f8a580da6990bb76
2021-04-01perfmon: % power level per nodeRay Kinsella2-0/+58
Show % time spent per graph node in power level 0, 1 and 2. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: I678ee812fa993af39568e9f9dfbf2396fc13ad42
2021-03-31perfmon: add branch mispredictionsRay Kinsella3-0/+76
Add branches, branches taken (a meteric for branchy code), and branch misses. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: If92d4aaf9d0a6e3b99b8c19e6311cc08ca470590
2021-03-26vlib: introduce vlib_get_main_by_index(), vlib_get_n_threads()Damjan Marion1-8/+8
Type: improvement Change-Id: If3da7d4338470912f37ff1794620418d928fb77f Signed-off-by: Damjan Marion <damarion@cisco.com>
2021-03-16perfmon: fixes for cache hierarchyRay Kinsella1-8/+12
Account for occasional instances with the misses rates between caches are inconsistent. Type: fix Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: Idfb8bb7543401405cfe04291ad201c28be030cc9
2021-03-16perfmon: add support for raw and timestampsRay Kinsella3-1/+24
Add perfmon plugin support to output raw counter and timestamps, both are useful for debug. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: Ia5a73d1f05e3464c18991c2346f0ed8b7ef63099
2021-01-21perfmon: added cache hits and missesRay Kinsella2-0/+70
Added basic support for counting cache hits and misses per node. Type: improvement Signed-off-by: Ray Kinsella <mdr@ashroe.eu> Change-Id: Ic566611fd3d4246ccaa2117d8f74a569a6862e80
2020-12-18perfmon: new perfmon pluginDamjan Marion15-0/+2246
Type: feature Change-Id: I2c14f82393d11fc05c6d229f5c58603ab5c0f14d Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-12-18misc: deprecate old perfmonDamjan Marion25-25549/+0
Type: refactor Change-Id: I1303219f9f2a25d821737665903b0264edd3de32 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-12-14misc: move to new pool_foreach macrosDamjan Marion1-3/+3
Type: refactor Change-Id: Ie67dc579e88132ddb1ee4a34cb69f96920101772 Signed-off-by: Damjan Marion <damarion@cisco.com>
2020-07-16misc: add callback hooks and refactor pmcTom Seidenberg8-155/+313
Callbacks for monitoring and performance measurement: - Add new callback list type, with context - Add callbacks for API, CLI, and barrier sync - Modify node dispatch callback to pass plugin-specific context - Modify perfmon plugin to keep PMC samples local to the plugin - Include process nodes in dispatch callback - Pass dispatch function return value to callback Type: refactor Signed-off-by: Tom Seidenberg <tseidenb@cisco.com> Change-Id: I28b06c58490611e08d76ff5b01b2347ba2109b22
2020-04-22misc: asan: do not poison memory after munmap()Benoît Ganne1-2/+0
It is a bad idea to poison memory after munmap because the address space can be reused (eg. for global data of dlopen()ed object) and ASan model allows access by default. Moreover, access to a stale address space will fault. Type: fix Change-Id: I356de422f255447d9d50a3a71fb0c2eaa790d731 Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-12-17perfmon: fix per-worker data initializationBenoît Ganne2-9/+14
When perfmon_init is called at initialization time worker threads are not created yet and vec_len(vlib_mains) returns 1. Initialize per-worker data when the number of workers is known, when enabling data collection instead. Type: fix Change-Id: I36887cc7b2a3e88d9728d3cd7262d9b1c968dd3c Signed-off-by: Benoît Ganne <bganne@cisco.com>
2019-05-24Add callback multiplex supportDave Barach1-15/+47
Change-Id: Iddeb3a1b0e20706e72ec8f74dabc60b342f003ba Signed-off-by: Dave Barach <dave@barachs.net>
2019-05-03plugins: clean up plugin descriptionsDave Wallace1-1/+1
- Make plugin descriptions more consistent so the output of "show plugin" can be used in the wiki. Change-Id: I4c6feb11e7dcc5a4cf0848eed37f1d3b035c7dda Signed-off-by: Dave Wallace <dwallacelf@gmail.com>