Method Calls in Derby

Method calls per transaction for the tests described in Derby1961ResourceUsage2. (Derby 10.2.1.6, Sun Java SE 6 (build 1.6.0-rc-b104), Solaris 10.)

The numbers were collected with this DTrace script:

#pragma D option quiet

/* Start java process with -XX:+DTraceMethodProbes */

hotspot$target:::method-entry {
  this->class = (char*) copyin(arg1, arg2 + 1);
  this->class[arg2] = '\0';
  this->method = (char*) copyin(arg3, arg4 + 1);
  this->method[arg4] = '\0';
  @[stringof(this->class), stringof(this->method)] = count();
}

Single-record select (10 clients)

This table shows all the methods that are called more than 13 times per single-record select transaction. The entire list of all methods that are called more than 0.99 times per transaction can be found here.

Numbers for how often a given method calls another method can be found here (note that these numbers are for embedded Derby).

Method name

Calls/tx

java.lang.Object.<init>

87.1469

derby.impl.drda.DDMWriter.ensureLength

62.0897

derby.iapi.services.io.ArrayInputStream.setPosition

58.4240

java.lang.Object.equals

56.7005

java.util.Hashtable.get

51.0775

derby.impl.store.raw.data.StoredFieldHeader.readStatus

37.7001

derby.impl.store.raw.data.StoredFieldHeader.readFieldLengthAndSetStreamPosition

37.7001

derby.iapi.services.io.ArrayInputStream.setLimit

37.7001

derby.iapi.services.io.ArrayInputStream.clearLimit

37.7001

java.lang.Object.hashCode

36.9835

derby.iapi.types.SQLInteger.typePrecedence

33.9484

derby.impl.drda.DDMWriter.writeBytes

29.0270

derby.impl.drda.DDMReader.ensureA!LayerDataInBuffer

27.0455

derby.iapi.store.raw.ContainerKey.hashCode

27.0138

java.util.Vector.indexOf

27.0118

derby.impl.jdbc.EmbedConnection.getTR

26.0244

derby.iapi.services.io.FormatableBitSet.isSet

24.9916

derby.impl.drda.DDMReader.ensureB!LayerDataInBuffer

24.0400

derby.impl.drda.DDMReader.adjustLengths

24.0400

derby.impl.store.raw.data.BasePage.getHeaderAtSlot

22.7255

derby.impl.store.raw.data.BasePage.checkSlotOnPage

21.7247

derby.iapi.store.raw.ContainerKey.equals

21.0246

derby.impl.store.raw.data.StoredPage.getRecordOffset

20.7872

derby.impl.store.raw.data.StoredRecordHeader.size

20.7239

derby.impl.store.raw.data.StoredRecordHeader.hasOverflow

20.7239

derby.impl.store.raw.data.StoredPage.restoreRecordFromSlot

20.7239

derby.impl.store.raw.data.StoredPage.readRecordFromArray

20.7239

derby.impl.store.raw.data.BasePage.fetchFromSlot

20.7239

derby.iapi.store.raw.PageKey.hashCode

20.0049

derby.impl.store.raw.data.StoredRecordHeader.getHandle

19.7234

java.lang.System.arraycopy

19.0691

derby.impl.jdbc.EmbedResultSetMetaData.getColumnCount

18.0059

derby.impl.store.access.heap.HeapRowLocation.readExternalFromArray

17.9759

derby.iapi.services.io.ArrayInputStream.readCompressedLong

17.9759

derby.iapi.services.io.ArrayInputStream.readCompressedInt

17.9759

derby.iapi.types.SQLInteger.typeCompare

16.9742

derby.iapi.types.SQLInteger.readExternalFromArray

16.9742

derby.iapi.types.NumberDataType.compare

16.9742

derby.iapi.services.io.ArrayInputStream.readInt

16.9742

java.util.LinkedList.entry

16.0777

derby.impl.drda.DDMReader.readCodePoint

16.0320

derby.impl.jdbc.EmbedResultSet.checkIfClosed

16.0000

derby.impl.store.access.btree.ControlRow.CompareIndexRowFromPageToKey

15.9746

java.util.Vector.<init>

15.0233

derby.impl.drda.DDMWriter.writeByte

15.0097

derby.impl.services.locks.LockSet.getControl

15.0063

derby.iapi.store.raw.ContainerLock.isCompatible

14.7802

derby.iapi.store.raw.PageKey.equals

14.3226

java.util.LinkedList.get

13.9780

derby.impl.jdbc.EmbedResultSetMetaData.validColumnNumber

13.0055

derby.impl.jdbc.EmbedResultSetMetaData.getColumnTypeDescriptor

13.0046

Single-record update (20 clients)

This table shows all the methods that are called more than 15 times per single-record update transaction. The entire list of all methods that are called more than 0.99 times per transaction can be found here.

Numbers for how often a given method calls another method can be found here (note that these numbers are for embedded Derby).

Method name

Calls/tx

java.lang.String.charAt

200.3260

org.apache.derby.iapi.services.io.DynamicByteArrayOutputStream.write

190.0080

java.io.DataOutputStream.incCount

162.7290

java.lang.Object.<init>

116.2030

java.io.DataOutputStream.write

110.0000

java.lang.Object.equals

109.9290

java.util.Hashtable.get

70.6695

org.apache.derby.iapi.store.raw.ContainerLock.isCompatible

69.6852

org.apache.derby.iapi.services.io.ArrayInputStream.setPosition

69.4433

java.lang.Object.hashCode

55.9236

org.apache.derby.impl.store.raw.data.StoredFieldHeader.readStatus

45.7157

java.util.LinkedList.entry

45.1451

java.util.LinkedList.get

42.9577

org.apache.derby.iapi.services.io.ArrayInputStream.clearLimit

41.7171

org.apache.derby.iapi.services.io.ArrayInputStream.setLimit

38.7157

org.apache.derby.iapi.store.raw.ContainerKey.hashCode

38.4798

org.apache.derby.impl.store.raw.data.StoredFieldHeader.readFieldLengthAndSetStreamPosition

37.7157

org.apache.derby.impl.drda.DDMWriter.ensureLength

36.2130

org.apache.derby.iapi.services.io.FormatableBitSet.isSet

35.1844

org.apache.derby.iapi.store.raw.ContainerKey.requestCompatible

34.8426

org.apache.derby.iapi.types.SQLInteger.typePrecedence

33.9640

org.apache.derby.impl.store.raw.data.BasePage.getHeaderAtSlot

32.7325

org.apache.derby.iapi.store.raw.ContainerKey.equals

32.5008

java.io.DataOutputStream.writeByte

31.6492

org.apache.derby.impl.store.raw.data.StoredRecordHeader.hasOverflow

30.7276

org.apache.derby.impl.drda.DDMReader.ensureA!LayerDataInBuffer

30.1300

java.util.Vector.indexOf

30.0341

org.apache.derby.impl.drda.DDMReader.ensureB!LayerDataInBuffer

27.1143

org.apache.derby.impl.drda.DDMReader.adjustLengths

27.1143

org.apache.derby.iapi.store.raw.PageKey.hashCode

27.0171

org.apache.derby.impl.store.raw.data.StoredRecordHeader.size

24.7276

org.apache.derby.impl.drda.DDMWriter.writeBytes

24.0578

org.apache.derby.impl.store.raw.data.StoredPage.getRecordOffset

23.7399

org.apache.derby.impl.store.raw.data.BasePage.checkSlotOnPage

23.7300

java.lang.System.arraycopy

22.5158

org.apache.derby.iapi.services.io.ArrayOutputStream.write

22.2370

org.apache.derby.impl.store.raw.data.StoredRecordHeader.getHandle

21.7264

org.apache.derby.iapi.store.raw.PageKey.equals

21.6974

org.apache.derby.impl.store.raw.data.StoredPage.restoreRecordFromSlot

20.7276

org.apache.derby.impl.store.raw.data.StoredPage.readRecordFromArray

20.7276

org.apache.derby.impl.store.raw.data.BasePage.fetchFromSlot

20.7276

java.util.HashMap.indexFor

20.0936

java.util.HashMap.hash

20.0936

org.apache.derby.impl.services.locks.LockSet.getControl

20.0184

org.apache.derby.impl.store.access.heap.HeapRowLocation.readExternalFromArray

17.9869

org.apache.derby.iapi.services.io.ArrayInputStream.readCompressedLong

17.9869

org.apache.derby.iapi.services.io.ArrayInputStream.readCompressedInt

17.9869

org.apache.derby.iapi.services.io.CompressedNumber.writeInt

17.8821

org.apache.derby.impl.store.raw.data.RecordId.hashCode

17.0097

org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getElapsedMillis

17.0000

org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getCurrentTimeMillis

17.0000

org.apache.derby.iapi.types.SQLInteger.readExternalFromArray

16.9821

org.apache.derby.iapi.services.io.ArrayInputStream.readInt

16.9821

org.apache.derby.iapi.types.SQLInteger.typeCompare

16.9820

org.apache.derby.iapi.types.NumberDataType.compare

16.9820

java.util.HashMap.get

16.0617

java.util.Vector.ensureCapacityHelper

16.0194

java.util.Vector.addElement

16.0194

org.apache.derby.impl.store.access.btree.ControlRow.CompareIndexRowFromPageToKey

15.9832

java.lang.String.hashCode

15.1830

java.util.Vector.<init>

15.0688

java.util.Vector.size

15.0568

org.apache.derby.impl.sql.execute.ValueRow.getColumn

15.0060

Join (4 clients)

This table shows all the methods that are called more than 10000 times per join transaction. The entire list of all methods that are called more than 0.99 times per transaction can be found here.

Method name

Calls/tx

org.apache.derby.iapi.services.io.ArrayInputStream.setPosition

43837.7

org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getCurrentTimeMillis

33893.0

org.apache.derby.impl.store.raw.data.BasePage.getHeaderAtSlot

33500.7

org.apache.derby.impl.store.raw.data.BasePage.checkSlotOnPage

32878.2

org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.getElapsedMillis

31892.0

java.lang.Object.<init>

27719.7

java.util.Hashtable.get

24329.3

org.apache.derby.impl.sql.execute.NoPutResultSetImpl.setCurrentRow

21919.7

org.apache.derby.impl.sql.execute.BaseActivation.setCurrentRow

21919.7

org.apache.derby.impl.store.raw.data.StoredFieldHeader.readStatus

21918.9

org.apache.derby.impl.store.raw.data.StoredFieldHeader.readFieldLengthAndSetStreamPosition

21918.9

org.apache.derby.iapi.services.io.ArrayInputStream.setLimit

21918.9

org.apache.derby.iapi.services.io.ArrayInputStream.clearLimit

21918.9

org.apache.derby.impl.store.raw.data.StoredRecordHeader.size

21918.8

org.apache.derby.impl.store.raw.data.StoredRecordHeader.hasOverflow

21918.8

org.apache.derby.impl.store.raw.data.StoredPage.restoreRecordFromSlot

21918.8

org.apache.derby.impl.store.raw.data.StoredPage.readRecordFromArray

21918.8

org.apache.derby.impl.store.raw.data.StoredPage.getRecordOffset

21918.8

org.apache.derby.impl.store.raw.data.BasePage.fetchFromSlot

21918.8

org.apache.derby.impl.store.raw.data.StoredRecordHeader.getHandle

21918.8

org.apache.derby.impl.store.access.heap.HeapController.lockRow

21918.8

org.apache.derby.impl.store.access.heap.HeapRowLocation.getRecordHandle

21918.8

org.apache.derby.impl.sql.execute.GenericQualifier.getOrderable

20918.7

org.apache.derby.impl.sql.execute.ValueRow.getColumn

13961.4

org.apache.derby.iapi.store.raw.ContainerKey.hashCode

12932.4

org.apache.derby.iapi.store.raw.PageKey.hashCode

12922.3

org.apache.derby.iapi.store.raw.PageKey.<init>

11743.3

org.apache.derby.impl.store.raw.data.RecordId.hashCode

11513.9

org.apache.derby.impl.store.raw.data.RecordId.<init>

11118.8

org.apache.derby.impl.store.raw.data.BaseContainerHandle.makeRecordHandle

11039.1

org.apache.derby.impl.sql.execute.ValueRow.setRowArray

10962.3

org.apache.derby.impl.store.access.btree.index.B2IRowLockingRR.lockScanRow

10961.4

org.apache.derby.impl.store.access.btree.index.B2I!RowLocking3._lockScanRow

10961.4

org.apache.derby.impl.store.access.heap.HeapRowLocation.readExternalFromArray

10959.4

org.apache.derby.iapi.services.io.ArrayInputStream.readCompressedLong

10959.4

org.apache.derby.iapi.services.io.ArrayInputStream.readCompressedInt

10959.4

org.apache.derby.impl.store.raw.data.StoredRecordHeader.isDeleted

10959.4

org.apache.derby.impl.store.raw.data.BasePage.isDeletedOnPage

10959.4

org.apache.derby.impl.store.raw.data.BasePage.isDeletedAtSlot

10959.4

org.apache.derby.impl.store.access.btree.index.B2I!RowLocking3.lockRowOnPage

10959.4

org.apache.derby.impl.store.raw.data.StoredFieldHeader.readTotalFieldLength

10959.4

org.apache.derby.iapi.types.SQLInteger.readExternalFromArray

10959.4

org.apache.derby.iapi.services.io.ArrayInputStream.readInt

10959.4

org.apache.derby.impl.store.raw.xact.RowLocking2nohold.lockRecordForRead

10959.4

org.apache.derby.impl.services.locks.SinglePool.zeroDurationlockObject

10959.4

org.apache.derby.impl.store.access.heap.HeapController.unlockRowAfterRead

10959.4

org.apache.derby.impl.store.access.btree.index.B2I!RowLocking2.unlockScanRecordAfterRead

10959.4

org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.setCompatRow

10959.3

java.util.HashMap.indexFor

10129.4

java.util.HashMap.hash

10129.4

Derby1961MethodCalls (last edited 2009-09-20 22:11:42 by localhost)