jvm-profiling-tools / perf-map-agent

A java agent to generate method mappings to use with the linux `perf` tool
GNU General Public License v2.0
1.65k stars 260 forks source link

Bug fixes and output formatting #21

Closed nitsanw closed 8 years ago

nitsanw commented 8 years ago

Hi, This is a bit of a mixed bag, so feel free to cherry pick the bits you find most relevant. The most important aspects are:

  1. Fix a bug in the inlined address range computation where the range was assigned to the wrong method.
  2. Error handling for JVMTI calls (only in method signature, the same pattern needs applying to all JVMTI interactions).

In addition I added some comments, renamed variables for clarity (I think), and added a more compact format for inlined methods printing. Happy to have a discussion to make the PR more palatable. I would like to improve formatting further and settle on good way to configure it, but not sure how important backwards compatibility is. Thanks, Nitsan

jrudolph commented 8 years ago

Thanks, @nitsanw. I'll have a look in the next few days.

nitsanw commented 8 years ago

Hi @jrudolph, I understand you are probably busy and I realize this is not the cleanest PR. Is there anything I can do to help the review process along? I would like to invest more time in this project and build further on the above changes to make PMA more robust. Thanks, Nitsan

nitsanw commented 8 years ago

ping?

jrudolph commented 8 years ago

@nitsanw, thanks again. I like many of your suggestions but I think we need to break them down a bit more to see better what's going on. Unfortunately, there was another PR open which contained similar cleanups as yours to sig_string, so that your changes won't apply any more.

Let's have those changes:

Could you open separate issues / PRs for those items, especially for the first item?

To give a few general guidelines about this project:

Anyway, thanks for sharing the wish to make perf-map-agent better!

nitsanw commented 8 years ago

I'll see if I can find the time to redo this PR as a series of smaller PRs. This is hard because all the changes sort of hit on the same file. Given the code is so small I hoped you'd go through the merge process. I realize you have little time for reviews/maintenance, have you considered introducing more contributors to the project?

jrudolph commented 8 years ago

@nitsanw no worries, if you don't get to submitting the PR(s). If you don't I will at least fix the bug myself and see what to do about the other issues.

jrudolph commented 8 years ago

@nitsanw I added a few more changes similar to the ones you proposed. I didn't yet introduce compact_inline_format so if you'd like that feature please open a ticket to discuss it.

Thanks again. There was lots of good stuff in here.

Closing...

nitsanw commented 8 years ago

Glad you found it helpful. Will push further tweaks in near future.