Skip to content

Instantly share code, notes, and snippets.

View ivankelly's full-sized avatar

Ivan Kelly ivankelly

View GitHub Profile
@ivankelly
ivankelly / build-jdk.bash
Last active June 2, 2017 11:11
tenuring-build-1
~$ sudo apt-get install mercurial # needed to pull code
~$ sudo apt-get build-dep openjdk-7 # needed to build code
~$ hg clone http://hg.openjdk.java.net/jdk8u/jdk8u jdk8u-wtftenure
~$ cd jdk8u-wtftenure
~/jdk8u-wtftenure$ bash ./get_source.sh
@ivankelly
ivankelly / gclog.md
Last active June 2, 2017 08:56
wtf-is-tenuring
73481.571: [GC pause (young)
Desired survivor size 524288000 bytes, new threshold 6 (max 6)
- age   1:    1990040 bytes,    1990040 total
- age   2:    1702416 bytes,    3692456 total
- age   3:    1698744 bytes,    5391200 total
- age   4:    1701408 bytes,    7092608 total
- age   5:    1700608 bytes,    8793216 total
- age   6:    1701408 bytes,   10494624 total
, 0.1204130 secs]
 [Parallel Time: 107.3 ms, GC Workers: 8]
> select time, max(value) from jvm_gc_G1YoungGeneration_CollectionCount where time > now() - 5d AND time > 1458340066997000000 group by build
name: jvm_gc_G1YoungGeneration_CollectionCount
tags: build=jenkins_core_base_perf_17
time max
---- ---
1458807954386596544 39
name: jvm_gc_G1YoungGeneration_CollectionCount
tags: build=jenkins_core_base_perf_18
Connection conn = ConnectionFactory.createConnection(hbaseConf);
TableName tableName = TableName.valueOf("FOOBAR");
HBaseExclusiveWriter writer = HBaseExclusiveWriter.acquire(conn, tableName, mySequence);
Put p = writer.setWriterSeqNo(new Put(Bytes.toBytes("myRow")));
p.addColumn(FAMILY, QUALIFIER, value);
table.put(p);
$ java -cp build/libs/zktimemachine.jar GrepOps -z /var/lib/zookeeper/version-2/ --session 0x14cc6963c980010
2015-04-17T11:21:16.223+02:00, s:0x14cc6963c980010, zx:0x600006394 CREATE_SESSION(timeout=30000)
2015-04-17T11:21:16.827+02:00, s:0x14cc6963c980010, zx:0x6000063b0 MULTI (2 ops)
- DELETE(path=/midonet/v1/hosts/26272e43-e487-40df-abe3-df18354aee4a/vrnMappings/ports/24f40579-bb03-4f2b-8378-c41219a717ea)
- SET_DATA(path=/midonet/v1/ports/24f40579-bb03-4f2b-8378-c41219a717ea, data={"data":{"type":"BridgePort","properties":{},"device_id":"43bf0bc2-ab3f-4fda-af1e-100d2707e56d","adminStateUp":true,"inboundFilter":"790236f4-d5f2-4ad7-a7ff-c1d6147611aa","outboundFilter":"7c5e9c3b-16bf-44f3-a0d0-4f430e622590","portGroupIDs":null,"tunnelKey":47678,"hostId":null,"interfaceName":null,"peerId":null,"v1ApiType":null,"vlanId":null},"version":"1.8"}, version=3)
2015-04-17T11:21:48.000+02:00, s:0x14cc6963c980010, zx:0x600006a46 UNKNOWN(null)
$ java -cp build/libs/zktimemachine.jar TimeMachine -z /var/lib/zookeeper/version-2/ -t 2015-03-31T00:58:56.176+02:00
Replaying up until time 2015-03-31T00:58:56.176+02:00
Applied 52112 transactions from zxid 8609234051 (Tue Mar 31 00:53:32 CEST 2015) to 8609286162 (Tue Mar 31 00:58:56 CEST 2015)
- / data:0 children:2 createdBy:0 createdAt:Thu Jan 01 01:00:00 CET 1970 age:1427756336176
- /midonet data:0 children:1 createdBy:0 createdAt:Tue May 20 15:29:57 CEST 2014 age:27163738878
- /midonet/v1 data:0 children:36 createdBy:0 createdAt:Tue May 20 15:29:57 CEST 2014 age:27163738816
- /midonet/v1/agents data:0 children:1 createdBy:0 createdAt:Tue May 20 15:29:57 CEST 2014 age:27163738554
- /midonet/v1/agents/ports data:0 children:0 createdBy:0 createdAt:Tue May 20 15:29:57 CEST 2014 age:27163738533
- /midonet/v1/vlan-bridges data:0 children:0 createdBy:0 createdAt:Tue May 20 15:29:57 CEST 2014 age:27163738775
- /midonet/v1/vniCounter data:5 children:0 createdBy:0 createdAt:Wed Sep 17
2015.03.31 08:33:59.645JST WARN [main-SendThread(192.168.100.10:2181)] ClientCnxn - Session 0x24bf02035550611 for server 192.168.100.10/192.168.100.10:2181, unexpected error, closing socket connection and attempting reconnect
java.io.IOException: Packet len4197564 is out of range!
at org.apache.zookeeper.ClientCnxnSocket.readLength(ClientCnxnSocket.java:112) ~[zookeeper-3.4.6.jar:3.4.6-1569965]
at org.apache.zookeeper.ClientCnxnSocketNIO.doIO(ClientCnxnSocketNIO.java:79) ~[zookeeper-3.4.6.jar:3.4.6-1569965]
at org.apache.zookeeper.ClientCnxnSocketNIO.doTransport(ClientCnxnSocketNIO.java:366) ~[zookeeper-3.4.6.jar:3.4.6-1569965]
at org.apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081) ~[zookeeper-3.4.6.jar:3.4.6-1569965]
java.nio.channels.ClosedChannelException
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$1.operationComplete(NioClientSocketPipelineSink.java:157)
at org.jboss.netty.channel.DefaultChannelFuture.notifyListener(DefaultChannelFuture.java:381)
at org.jboss.netty.channel.DefaultChannelFuture.notifyListeners(DefaultChannelFuture.java:367)
at org.jboss.netty.channel.DefaultChannelFuture.setSuccess(DefaultChannelFuture.java:316)
at org.jboss.netty.channel.AbstractChannel$ChannelCloseFuture.setClosed(AbstractChannel.java:351)
at org.jboss.netty.channel.AbstractChannel.setClosed(AbstractChannel.java:188)
at org.jboss.netty.channel.socket.nio.NioSocketChannel.setClosed(NioSocketChannel.java:146)
at org.jboss.netty.channel.socket.nio.NioWorker.close(NioWorker.java:592)
at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink$Boss.close(NioClientSocketPipelineSink.java:415)
@ivankelly
ivankelly / test_spotify.c
Last active December 17, 2015 06:19
Get a segfault with spotify
#include <stdio.h>
#include <libspotify/api.h>
#include <glib.h>
#include "tmpappkey.c"
sp_track* current_track = NULL;
int i = 0;
int test_spotify_music_delivery(sp_session *session, const sp_audioformat *format,
const void *frames, int num_frames) {