{"id":20373517,"url":"https://github.com/megengine/mperf-libpfm4","last_synced_at":"2025-07-08T06:06:59.941Z","repository":{"id":103460038,"uuid":"607105964","full_name":"MegEngine/mperf-libpfm4","owner":"MegEngine","description":"forked from https://sourceforge.net/p/perfmon2/libpfm4/ci/master/tree/","archived":false,"fork":false,"pushed_at":"2023-06-26T09:26:29.000Z","size":2696,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"mperf_version","last_synced_at":"2025-03-12T11:39:36.022Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MegEngine.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-27T10:23:35.000Z","updated_at":"2023-07-10T04:07:18.000Z","dependencies_parsed_at":"2023-07-07T06:15:54.998Z","dependency_job_id":null,"html_url":"https://github.com/MegEngine/mperf-libpfm4","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MegEngine/mperf-libpfm4","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegEngine%2Fmperf-libpfm4","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegEngine%2Fmperf-libpfm4/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegEngine%2Fmperf-libpfm4/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegEngine%2Fmperf-libpfm4/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MegEngine","download_url":"https://codeload.github.com/MegEngine/mperf-libpfm4/tar.gz/refs/heads/mperf_version","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MegEngine%2Fmperf-libpfm4/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264207131,"owners_count":23572736,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-15T01:18:49.369Z","updated_at":"2025-07-08T06:06:59.924Z","avatar_url":"https://github.com/MegEngine.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"          ------------------------------------------------------------\n                                    libpfm-4.x:\n          a helper library to program the performance monitoring events\n          ------------------------------------------------------------\n \t  Copyright (c) 2009 Google, Inc\n\t                Contributed by Stephane Eranian \u003ceranian@gmail.com\u003e\n\n \t  Copyright (c) 2001-2007 Hewlett-Packard Development Company, L.P.\n\t                Contributed by Stephane Eranian \u003ceranian@hpl.hp.com\u003e\n\n\nThis package provides a library, called libpfm4 which is used to develop\nmonitoring tools exploiting the performance monitoring events such as those\nprovided by the Performance Monitoring Unit (PMU) of modern processors.\n\nThis is a complete rewrite of libpfm3 and it is NOT backward compatible\nwith it.\n\nLibpfm4 helps convert from an event name, expressed as a string, to\nthe event encoding that is either the raw event as documented by HW vendor\nor the OS-specific encoding. In the latter case, the library is able to\nprepare the OS-specific data structures needed by the kernel to setup the\nevent.\n\nThe current libpfm4 provides support for the perf_events interface which was\nintroduced in Linux v2.6.31. Perfmon support is not present yet.\n\nThe library does not make any performance monitoring system calls. It is\nportable and supports other operating system environments beyond Linux,\nsuch as Mac OS X, and Windows.\n\nThe library supports many PMUs. The current version can handle:\n\n\t- For AMD X86:\n\t\tAMD64 K7, K8\n\t\tAMD64 Fam10h (Barcelona, Shanghai, Istanbul)\n\t\tAMD64 Fam11h (Turion)\n\t\tAMD64 Fam12h (Llano)\n\t\tAMD64 Fam14h (Bobcat)\n\t\tAMD64 Fam15h (Bulldozer) (core and uncore)\n\t\tAMD64 Fam16h (Jaguar)\n\t\tAMD64 Fam17h (Zen1)\n\t\tAMD64 Fam17h (Zen2)\n\t\tAMD64 Fam19h (Zen3) (core and L3)\n\t\tAMD64 Fam19h (Zen4)\n\n\t- For Intel X86:\n\t\tIntel P6 (Pentium II, Pentium Pro, Pentium III, Pentium M)\n\t\tIntel Yonah (Core Duo/Core Solo),\n\t\tIntel Core (Merom, Penryn, Dunnington)\n\t\tIntel Atom\n\t\tIntel Nehalem, Westmere\n\t\tIntel Sandy Bridge\n\t\tIntel Ivy Bridge\n\t\tIntel Haswell\n\t\tIntel Broadwell\n\t\tIntel SkyLake\n\t\tIntel CascadeLake\n\t\tIntel IceLake\n\t\tIntel SapphireRapid\n\t\tIntel Silvermont\n\t\tIntel Airmont\n\t\tIntel Goldmont\n\t\tIntel Tremont\n\t\tIntel RAPL (energy consumption)\n\t\tIntel Knights Corner\n\t\tIntel Knights Landing (core, uncore)\n\t\tIntel Knights Mill (core, uncore)\n\t\tIntel architectural perfmon v1, v2, v3\n\n\t- For ARM:\n\t\tARMV6 1136, 1176\n\t\t\n\t\tARMV7 Cortex A5\n\t\tARMV7 Cortex A8\n\t\tARMV7 Cortex A9\n\t\tARMV7 Cortex A15\n\t\tARMV7 Cortex A17\n\t\tARMV7 Cortex R4\n\t\tARMV7 Cortex R5\n\t\tARMV7 Cortex R7\n\t\tARMV7 Cortex R8\n\n\t\tARMV8 Cortex A32\n\t\tARMV8 Cortex A34\n\t\tARMV8 Cortex A35\n\t\tARMV8 Cortex A65\n\t\tARMV8 Cortex A72\n\t\tARMV8 Cortex A73\n\t\tARMV8 Cortex A75\n\t\tARMV8 Cortex A76Ae\n\t\tARMV8 Cortex A77\n\t\tARMV8 Cortex A78C\n\t\tARMV8 Cortex R52\n\t\tARMV8 Cortex R82\n\t\tARMV8 Cortex X1\n\t\tARMV8 Cortex X1C\n\t\tARMV8 Neoverse E1\n\t\tARMV8 Neoverse V1\n\t\tARMV8 Rainier\n\t\tARMV8 Cortex A57, A53, A55, A76, A78, X1\n\n\t\tARMV9 Cortex A510\n\t\tARMV9 Cortex A710\n\t\tARMV9 Cortex A715\n\t\tARMV9 Cortex X2\n\t\tARMV9 Cortex X3\n\t\tARMV9 Neoverse V2\n\t\tApplied Micro X-Gene\n\t\tQualcomm Krait\n\t\tFujitsu A64FX\n\t\tARM Neoverse N1\n\t\tARM Neoverse N2\n\t\tHuawei HiSilicon Kunpeng 920\n\n\t- For SPARC\n\t\tUltra I, II\n\t\tUltra III, IIIi, III+\n\t\tUltra IV+\n\t\tNiagara I, Niagara II\n\n\t- For IBM\n\t\tPower 4\n\t\tPower 5\n\t\tPower 6\n\t\tPower 7\n\t\tPower 8\n\t\tPower 8 Nest\n\t\tPower 9\n\t\tPower 10\n\t\tPPC970\n\t\tTorrent\n\t\tSystem z (s390x)\n\n\t- For MIPS\n\t\tMips 74k\n\nWHAT'S THERE\n-------------\n\t- the library source code including support for all processors listed\n\t  above\n\n\t- a set of generic examples showing how to list and query events. They\n\t  are in examples.\n\n\t- a set of examples showing how the library can be used with the\n\t  perf_events interface. They are in perf_examples.\n\n\t- a set of library header files used to compile the library and\n\t  perf_examples\n\n\t- man pages for all the library entry points\n\n\t- Python bindings for the library\n\n\t- a SPEC file to build RPMs from the library\n\n\t- the Debian-style config file to build a .deb package from the library\n\nINSTALLATION\n------------\n\t- edit config.mk to :\n\t\t- update some of the configuration variables\n\t\t- select your compiler options\n\n\t- type make\n\t- type make install\n\n\t- The default installation location is /usr/local. You can specify\n\t  a diffierent install location as follows:\n\t        $ make PREFIX=\u003cinstall-dir\u003e install\n\t  Depending on your install location, you may need to run the 'ldconfig'\n\t  command or use LD_LIBRARY_PATH when you build and run tools that\n\t  link to the libpfm4 library.\n\n\t- By default, libpfm library files are installed in \u003cinstall-dir\u003e/lib.\n\t  If 'make' builds 64-bit libraries on your system, and your target\n\t  architecture expects 64-bit libraries to be located in a library\n\t  named \"lib64\", then you should use the LIBDIR variable when installing,\n\t  as follows:\n\t        $ make LIBDIR=\u003cinstall-dir\u003e/lib64 install\n\n \t- To compile and install the Python bindings, you need to go to the\n\t  python sub-directory and type make. Python may not be systematically\n\t  built.\n\n\t- to compile the library for another ABI (e.g. 32-bit x86 on a\n\t  64-bit x86) system, you can pass the ABI flag to the compiler as\n\t  follows (assuming you have the multilib version of gcc):\n\t\t$ make OPTIM=\"-m32 -O2\"\n\nPACKAGING\n---------\n\tThe library comes with the config files necessary to generate RPMs or\n\tDebian packages. The source code produces 3 packages:\n\t- libpfm : runtime library\n\t- libpfm-dev: development files (headers, manpages, static library)\n\t- libpfm-python: Python bindings for the library\n\n\tTo generate the RPMs:\n\t$ rpmbuild -ba libpfm.spec\n\n\tTo generate the Debian packages:\n\t$ debuild -i -us -uc -b\n\n\tYou may need to install some extra packages to make Debian package\n\tgeneration possible.\n\nREQUIREMENTS:\n-------------\n\t- to run the programs in the perf_examples subdir, you MUST be using a\n\t  linux kernel with perf_events. That means v2.6.31 or later.\n\n\t- to compile the Python bindings, you need to have SWIG and the python\n\t  development packages installed\n\n\t- To compile on Windows, you need the MinGW and MSYS compiler environment\n\t  (see www.mingw.org). The environment needs to be augmented with the\n\t  mingw regex user contributed package (mingw-libgnurx-2.5.1.dev.tar.gz).\n\n\t- To compile on Mac OS X, you need to have gmake installed.\n\nDOCUMENTATION\n-------------\n\t- man pages for all entry points. It is recommended you start with: man libpfm\n\t- More information can be found on library web site:\n\t\t\thttp://perfmon2.sf.net\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegengine%2Fmperf-libpfm4","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmegengine%2Fmperf-libpfm4","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmegengine%2Fmperf-libpfm4/lists"}