Book Image

OpenJDK Cookbook

Book Image

OpenJDK Cookbook

Overview of this book

Table of Contents (20 chapters)
OpenJDK Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Generating a patch with webrev


Doing any update in a software product normally requires some kind of review process. The code should not be submitted into a repository unless someone else has already looked at it. In OpenJDK, the tool for this purpose is webrev, which allows you to create code reviews that can be shared with other members of the community.

Getting ready

Webrev is a Korn shell script, which means that Korn shell must be installed on the machine before you can use it. On a Linux machine, run yum install ksh or an equivalent command. On a Windows machine, ensure that ksh in included in the Cygwin installation.

Apart from the environment set up to create the patch review, some changes must be made in the source code as well. As an easy example, we can just modify some comments in a file, as discussed next. Open the file, hotspot/src/os/linux/vm/jvm_linux.cpp and update the header or just add a comment.

How to do it...

As webdev is a shell script, start by launching your shell and...