OpenJDK Development Best Practices

Oracle Principal Member of Technical Staff, Kelly O’Hair, has a session, (18020), set for Wednesday, 03:00 PM, (at the Hilton San Francisco -- Golden Gate 6/7/8) on “OpenJDK Development Best Practices” that offers a lot of useful practical advice. He will discuss current OpenJDK development procedures such as building, testing, code review, and creating a changeset, and integrating that changeset into a team repository.  In addition he will cover "OpenJDK Developers' Guide" topics and look at the challenges of integrating a change.

So what are the best practices when working on the JDK? Here’s a preview.

● When in doubt, ask
● When something does not work, report it
● Always be careful, rushing in changes is dangerous
● Do no harm, have a backup or backout plan
● Stay calm, nervous people make mistakes
● Be prepared for anything, because it will happen

When editing sources:
● No TABS
● Never edit the legal notices
● Respect the existing formatting
● Small surgical changes are best, easiest to review
● Well written comments are critical
● Do not assume anything about the compilers

Testcases are critical and not optional:
● Create a new one or modify an existing testcase
● Must be solid and work on all supported systems
● Must not be a resource hog (open 20,000 files)
● Must work in a shared VM mode (like a JUnit test)
● Assume someone else might be running the same test at the same time, and that someone might be you
● Continuous Build & Test
● Test gates or baseline testing
● But before you even get started making changes you must be able to completely build it and test it on your own system, this is a fundamental
● Linux builds are the easiest, so let's see what needs to happen

He offers some best practices short cuts for building:
● Always use local disk space
● Use /tmp if it has the space
● Try export HOTSPOT_BUILD_JOBS=4
● Try export ALT_PARALLEL_COMPILE_JOBS=4
● Use export NO_DOCS=true to avoid running javadoc
● Use ALT_JDK_IMPORT_PATH=${HOME}/jdk1.8.0

Kelly will offer detailed principles related to testing, testing prep, editing, code review, changeset creation, why a push fails, and the team repository model.

His core ideas:
● Pick your environment, Linux is easiest
● Pick a stable state of repos, promoted build, oldest best
● Learn to build and test it, over and over, know what to expect, create a jdk to use as your import
● Editing working set files, read the Mercurial book
● Problemlist, changeset creation

This session looks to be one that a variety of Java developers could benefit from.

Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

javeone logoJavaOne Conference 2013 Content

San Francisco, USA: Sept 28 - Oct 2, 2014

Links

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
22
23
24
25
26
27
28
29
30
   
       
Today