Skip to content

Instantly share code, notes, and snippets.

View vyazelenko's full-sized avatar

Dmytro Vyazelenko vyazelenko

View GitHub Profile
@vyazelenko
vyazelenko / constructor_complete_asm_code.asm
Last active December 27, 2015 03:29
Complete ASM code for TestConstructor case
Java HotSpot(TM) 64-Bit Server VM warning: PrintAssembly is enabled; turning on DebugNonSafepoints to gain additional output
Loaded disassembler from /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/hsdis-amd64.dylib
Decoding compiled method 0x000000010c060290:
Code:
[Disassembling for mach='i386:x86-64']
[Entry Point]
[Constants]
# {method} 'indexOf' '(II)I' in 'java/lang/String'
# this: rsi:rsi = 'java/lang/String'
# parm0: rdx = int
@vyazelenko
vyazelenko / clone_complete_asm_code.asm
Last active December 27, 2015 03:29
Complete ASM code for TestClone case
Java HotSpot(TM) 64-Bit Server VM warning: PrintAssembly is enabled; turning on DebugNonSafepoints to gain additional output
Loaded disassembler from /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre/lib/hsdis-amd64.dylib
Decoding compiled method 0x00000001063bb1d0:
Code:
[Disassembling for mach='i386:x86-64']
[Entry Point]
[Constants]
# {method} 'indexOf' '(II)I' in 'java/lang/String'
# this: rsi:rsi = 'java/lang/String'
# parm0: rdx = int
@vyazelenko
vyazelenko / TestClonePCM.txt
Created November 1, 2013 00:25
Intel Performance Counter Monitor output for TestClone case
pcm.x "java -Xms4g -Xmx5g com.vyazelenko.blog.copyobject.TestClone" -nc -ns
Intel(r) Performance Counter Monitor V2.5.1 (2013-06-25 13:44:03 +0200 ID=76b6d1f)
Copyright (c) 2009-2012 Intel Corporation
Num logical cores: 8
Num sockets: 1
Threads per core: 2
Core PMU (perfmon) version: 3
@vyazelenko
vyazelenko / TestConstructorPCM.txt
Last active December 27, 2015 03:29
Intel Performance Counter Monitor output for TestConstructor case
"java -Xms4g -Xmx5g com.vyazelenko.blog.copyobject.TestConstructor" -nc -ns
Intel(r) Performance Counter Monitor V2.5.1 (2013-06-25 13:44:03 +0200 ID=76b6d1f)
Copyright (c) 2009-2012 Intel Corporation
Num logical cores: 8
Num sockets: 1
Threads per core: 2
Core PMU (perfmon) version: 3
@vyazelenko
vyazelenko / CloneGeneratedAssembler.asm
Last active December 26, 2015 22:39
Assembly dump for TestClone#callCopy() method
Decoding compiled method 0x00000001063b9390:
Code:
[Entry Point]
[Verified Entry Point]
[Constants]
# {method} 'callCopy' '()Lcom/vyazelenko/blog/copyobject/Copyable;' in 'com/vyazelenko/blog/copyobject/TestClone'
# [sp+0x20] (sp of caller)
0x00000001063b94e0: mov %eax,-0x14000(%rsp)
0x00000001063b94e7: push %rbp
0x00000001063b94e8: sub $0x10,%rsp
@vyazelenko
vyazelenko / TestConstructor.java
Created October 30, 2013 00:07
TestConstructor.java
package com.vyazelenko.blog.copyobject;
import com.vyazelenko.blog.copyobject.primitives.clone.CloneCopy;
import com.vyazelenko.blog.copyobject.primitives.constructor.ConstructorCopy;
import java.util.ArrayList;
import java.util.List;
public class TestConstructor {
public static List<Copyable> results;
@vyazelenko
vyazelenko / TestClone.java
Created October 30, 2013 00:07
TestClone.java
package com.vyazelenko.blog.copyobject;
import com.vyazelenko.blog.copyobject.primitives.clone.CloneCopy;
import java.util.ArrayList;
import java.util.List;
public class TestClone {
public static List<Copyable> results;
@vyazelenko
vyazelenko / CopyConstructorGeneratedAssembler.asm
Last active December 26, 2015 22:39
Assembly dump for TestConstructor#callCopy() method
Decoding compiled method 0x000000010c064b50:
Code:
[Entry Point]
[Verified Entry Point]
[Constants]
# {method} 'callCopy' '()Lcom/vyazelenko/blog/copyobject/Copyable;' in 'com/vyazelenko/blog/copyobject/TestConstructor'
# [sp+0x20] (sp of caller)
0x000000010c064ca0: mov %eax,-0x14000(%rsp)
0x000000010c064ca7: push %rbp
0x000000010c064ca8: sub $0x10,%rsp ;*synchronization entry
@vyazelenko
vyazelenko / PrintCompilationCopyContructor.txt
Last active December 26, 2015 22:29
Results of running TestConstructor with -XX:+PrintCompilation
java -XX:+PrintCompilation com.vyazelenko.blog.copyobject.TestConstructor
59 1 java.lang.String::hashCode (55 bytes)
61 2 java.lang.String::indexOf (70 bytes)
70 3 sun.nio.cs.UTF_8$Encoder::encode (361 bytes)
77 4 java.lang.Object::<init> (1 bytes)
80 5 java.util.ArrayList::add (29 bytes)
80 6 java.util.ArrayList::ensureCapacityInternal (23 bytes)
81 7 java.util.ArrayList::ensureExplicitCapacity (26 bytes)
81 8 com.vyazelenko.blog.copyobject.TestConstructor::callCopy (7 bytes)
81 9 com.vyazelenko.blog.copyobject.primitives.constructor.ConstructorCopy::copy (9 bytes)
@vyazelenko
vyazelenko / PrintCompilationClone.txt
Created October 29, 2013 22:22
Results of running TestClone with -XX:+PrintCompilation
java -XX:+PrintCompilation com.vyazelenko.blog.copyobject.TestClone
59 1 java.lang.String::hashCode (55 bytes)
61 2 java.lang.String::indexOf (70 bytes)
69 3 sun.nio.cs.UTF_8$Encoder::encode (361 bytes)
77 4 java.util.ArrayList::add (29 bytes)
77 5 java.util.ArrayList::ensureCapacityInternal (23 bytes)
77 7 n java.lang.Object::clone (native)
78 6 java.util.ArrayList::ensureExplicitCapacity (26 bytes)
78 8 com.vyazelenko.blog.copyobject.TestClone::callCopy (7 bytes)
78 9 com.vyazelenko.blog.copyobject.primitives.clone.CloneCopy::copy (5 bytes)