Discussion:
Oprofile vs Perf
Sabra Gargouri
2013-04-24 09:16:42 UTC
Permalink
Hi,
While searching on the net about Perf I found in some articles, that recent developments in the Linux aim to solve problems found in Oprofile.
I would like to know witch problems are in Oprofile? and the difference between perf and oprofile.
I know that both perf and oprofile are profiling tools for hardware events. We can either use perf or Oprofile? 
Does perf replace Oprofile? Or they have both different features?

Best regards,
Sabra
Maynard Johnson
2013-04-25 14:24:39 UTC
Permalink
Post by Sabra Gargouri
Hi,
While searching on the net about Perf I found in some articles, that recent developments in the Linux aim to solve problems found in Oprofile.
I would like to know witch problems are in Oprofile? and the difference between perf and oprofile.
I know that both perf and oprofile are profiling tools for hardware events. We can either use perf or Oprofile?
Does perf replace Oprofile? Or they have both different features?
OProfile was, arguably, the profiling tool of choice for Linux developers for nearly 10 years. A few years ago, various members of the Linux kernel community defined and implemented a formal kernel API to access performance monitor counters (PMCs) to address the needs of the performance tools development community. Prior to the introduction of this API, oprofile used a special oprofile-specific kernel module, while other performance tools relied on kernel patches (e.g., 'perfctr', 'perfmon' -- which were never accepted upstream) to access the PMCs. The kernel developers of this new API also developed an example tool that used the new API, which they called 'perf'. The original perf tool was capable of profiling (single process or system-wide), as well as simple event counting. Several other features have been added to it since then. The perf tool has matured a lot in the past few years, and has gained a lot of followers.

Currently, oprofile is strictly a profiling tool. So there are more features available in the perf tool, but with those added features, comes added complexity in using it. Comparing the profiling capabilities of the two tools, there is a lot of overlap, but they each have their own strengths. The original oprofile ("legacy" opcontrol-based profiler) could only do system-wide profiling, which required root authority. In August 2012, oprofile 0.9.8 was released that included the new 'operf' tool, which uses the new kernel API mentioned above. Using operf allows users who know and love oprofile's post-processing tools to get the same benefits as 'perf' (i.e., single app profiling without the need for root authority), while still leveraging the advantages of oprofile (symbolic native event names, Java profiling, user manual, and an established community).

In the end, though, which of these tools to use for profiling is a personal choice. Try them both out and decide for yourself. You may find that you'd like to have them both in your toolbox.

-Maynard
Post by Sabra Gargouri
Best regards,
Sabra
------------------------------------------------------------------------------
Try New Relic Now & We'll Send You this Cool Shirt
New Relic is the only SaaS-based application performance monitoring service
that delivers powerful full stack analytics. Optimize and monitor your
browser, app, & servers with just a few lines of code. Try New Relic
and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
_______________________________________________
oprofile-list mailing list
https://lists.sourceforge.net/lists/listinfo/oprofile-list
Loading...