eclipse-openj9 / openj9-utils

Other
16 stars 29 forks source link

Perf Tool with squashed commits for PR #7

Closed amyhou closed 3 years ago

amyhou commented 3 years ago

This commit contains all changes made to the perf tool during the CANOSP program.

The OpenJ9 perf tool was created as part of the Canada Open-Source Projects (CANOSP) program. The tool allows users to run their Java program with the agent, and then request information about their program's performance.

In addition to our README, more information can be found in this presentation, and from this recording.

Thank you in advance for your feedback and consideration!

Co-authored-by: Amy Hou amyhou98@gmail.com Co-authored-by: Anas Mohamed amohamed@ualberta.ca Co-authored-by: Harrison Peters hmp@ualberta.ca Co-authored-by: Vivian Wu vivianxwu@outlook.com Signed-off-by: Amy Hou amyhou98@gmail.com, Anas Mohamed amohamed@ualberta.ca, Harrison Peters hmp@ualberta.ca, Vivian Wu vivianxwu@outlook.com

mpirvu commented 3 years ago

CQ request for the original code created: https://dev.eclipse.org/ipzilla/show_bug.cgi?id=22843

mpirvu commented 3 years ago

CQ request for the json library: https://dev.eclipse.org/ipzilla/show_bug.cgi?id=22845

mpirvu commented 3 years ago

@amyhou Could you please add our standard copyright header to all the source files:

/*******************************************************************************
 * Copyright (c) 2020, 2020 IBM Corp. and others
 *
 * This program and the accompanying materials are made available under
 * the terms of the Eclipse Public License 2.0 which accompanies this
 * distribution and is available at https://www.eclipse.org/legal/epl-2.0/
 * or the Apache License, Version 2.0 which accompanies this distribution and
 * is available at https://www.apache.org/licenses/LICENSE-2.0.
 *
 * This Source Code may also be made available under the following
 * Secondary Licenses when the conditions for such availability set
 * forth in the Eclipse Public License, v. 2.0 are satisfied: GNU
 * General Public License, version 2 with the GNU Classpath
 * Exception [1] and GNU General Public License, version 2 with the
 * OpenJDK Assembly Exception [2].
 *
 * [1] https://www.gnu.org/software/classpath/license.html
 * [2] http://openjdk.java.net/legal/assembly-exception.html
 *
 * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception
 *******************************************************************************/
mpirvu commented 3 years ago

The CQ for the json.hpp file will require manual (legal dept) intervention because of this license message included somewhere in the file

// #include <nlohmann/thirdparty/hedley/hedley.hpp>
/* Hedley - https://nemequ.github.io/hedley
 * Created by Evan Nemerson <evan@nemerson.com>
 *
 * To the extent possible under law, the author(s) have dedicated all
 * copyright and related and neighboring rights to this software to
 * the public domain worldwide. This software is distributed without
 * any warranty.
 *
 * For details, see <http://creativecommons.org/publicdomain/zero/1.0/>.
 * SPDX-License-Identifier: CC0-1.0
 */

Message from Eclipse:

Scancode report for json.zip

This Type_A CQ has been scanned for license compatibility, and the Scancode
report is attached for convenience. Scancode identified 1 files in this
package; 0 files didn't have license information.

Based on Scancode's analysis, status for Type_A license certification is:
  [FAIL]  json.zip

The following licenses were identified in this package:
  [FAIL]  CC0-1.0
  [PASS]  MIT
  [FAIL]  public-domain
mpirvu commented 3 years ago

Eclipse CQ for the original code has been approved:


Gunnar Wagenknecht <gunnar@wagenknecht.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|awaiting_pmc                |new
               Flag|                            |PMC_Approved+

The CQ for json.hpp is still pending IP team review.

mpirvu commented 3 years ago

We created this function '''check_jvmti_error''' during our code sprint weekend when we were first introduced to JVMTI, and it looks like we forgot about it. Should we remove the throw statement and change it to just print to stderr?

The throw statement can be removed, but you still have to take the appropriate action in the mainline. Most of the time this means just the abandon what the callback was supposed to do (if there is something to clean-up, that must be done as well). Another solution is to add try/catch blocks to all the callbacks.

bragaigor commented 3 years ago

Is slnx.sqlite file supposed to be included in the commit? If not, include it in .gitignore

mpirvu commented 3 years ago

The logs should include the type of the event watched for every entry. For instance, in the following output:

{
  "body": {
    "methodClass": "Ljava/lang/invoke/PrimitiveHandle;",
    "methodLineNum": 168,
    "methodName": "initializeClassIfRequired",
    "methodNum": 11,
    "methodSig": "()V"
  },
  "from": "Server",
  "timestamp": 1607104976
},

it's not clear what it is being monitored. It's just a fully qualified method name and a line number. This is important especially because output from different events can be interleaved.

mpirvu commented 3 years ago

An update on the Eclipse CQ for the original code:

We have completed a high level triage of the attachment and you may now check
the content into your project’s source code repository. If a repository has not
yet been allocated, please connect with webmaster@eclipse.org to either create
a new repository or move your existing repository to the Eclipse Foundation. 
We will perform a comprehensive analysis at a later date based on IP work
queue.

Thanks,

Shawn
Eclipse IP Team

Based on this, we are allowed to merge this PR into the openj9-utils repo

mpirvu commented 3 years ago

I am merging this PR so that other contributors can develop the code base in parallel.