Replies: 6 comments 27 replies
-
This paper presents a simple and fast algorithm for Path Profiling. Compared to the Profiling on Basic Blocks or Edges, it is more accurate: the result of Path Profile could determine Basic Block and Edge Profile, but the converse doesn't hold. We can only use the heuristic analysis to select Path when we use Edge Profile. And that would lead to incorrect predictions. The experiment result is: Path profiling could have comparable overhead compared with Edge profiling (31% vs. 16%), and Path profiling could provide far more information than basic block or edge profiles, which is helpful for profile-driven compilers. Related result is that the path prediction accuracy of edge profile method is 37.9% in average. So I'm just wondering what profile-driven compilers are actually doing given the Path Profiling result. Will the compiler benefit a lot from very accurate path profiling result? |
Beta Was this translation helpful? Give feedback.
-
I'm not sure I understand whats going on in section 3.3 (Efficiently Computing Sums). The goal is to use a spanning tree to select edges to instrument and compute the appropriate increment for each instrumented edge. The algorithm chooses a maximal cost spanning tree of the graph so we can find a minimal cost set of chord edges. I'm not sure I understand why instrumenting these chord edges works and why instrumenting the chord edges is a good choice. Lastly, I cannot figure out why in Figure 7, the graph in the middle shows the unique cycle of spanning tree edges associated with chord |
Beta Was this translation helpful? Give feedback.
-
I thought this paper was pretty innovative in the way it finds a way to represent all possible paths in a CFG using an index into an array, and builds upon that to do low overhead path profiling. Since this was an old paper I went to see what other works built upon this paper; and while I can see a large number of academic publications like this and this I struggled to find any mentions of this technique being used in production JVMs or even offline profiling tools like So I guess I'm trying to understand why this technique isn't more mainstream, given the very relevant use cases that @sampsyo mentioned here. |
Beta Was this translation helpful? Give feedback.
-
Probably this is slightly out of topic, as the paper presents a new algorithm for efficient path profiling, while my question is on the prediction accuracy and the dependency on the data. If I am not wrong, given a CFG the hot paths can differ among executions for varying input data distributions (e.g. skew) per execution. This can happen especially when branching conditions depend on the input of the program. So, my main question would be, how the prediction accuracy of such a profiler could be affected by the different inputs? And if so, how such a case would be addressed? |
Beta Was this translation helpful? Give feedback.
-
This paper, and the discussion below @tonyjie post, reminds me of some previous work I have read about on so called "hardware JITs". The idea in this line of work is to choose hot functions in code and compile the hottest functions to a custom accelerator, such as an FPGA. An algorithm similar to the one described in this paper could be applied in hardware JITs to determine which parts of the code should be compiled to hardware, rather than just compiling entire functions. Obviously, there are a large number of challenges with this work, including long compilation times for FPGAs and overhead in transferring data to and from the accelerator, but I still think it is an interesting potential application of the path profiling method. |
Beta Was this translation helpful? Give feedback.
-
We wrote a Discussion Blog and @zzzDavid just sent the pull request. It is not easy to directly read the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
This thread is for discussing the "Efficient Path Profiling" paper by Thomas Ball and James R. Larus. Niansong (@zzzDavid) and I (@tonyjie) are the discussion leader and will try to answer all your questions!
Beta Was this translation helpful? Give feedback.
All reactions