Mar 18
IUSR技术文章 java, linkedin, openjdk
接上篇,当openjdk6的代码库已经用mercurial clone/fclone完毕之后,就可以构建openjdk6了。当然构建与阅读源代码没有太大关系,只是如果日后还要做hack的话,总要通过构建和测试来检查、调试自己的hack不是,所以了解openjdk6的构建方法还是有点必要的。
基本上,代码库根目录下的README-builds.html中的讲解已经很到位了,我这里再简要地啰嗦一下整个步骤,权当个中文翻译好了。
- 必需的应用程序:gcc 4,g++ 4,GNU make (>3.80),m4 (>1.4.4)。以及README-builds.html中指定的很多个开发包(dev)。我的操作系统是Ubuntu 8.10,内核版本为2.6.27-14,按照README-builds.html的包依赖关系,一下子:
sudo apt-build install binutils cpp libfreetype6-dev g++ cpp-4.1 g++-4.1 gcc-4.1 gcc-4.1-base libstdc++6-4.1-dev gawk gcc libasound2-dev libc6 libc6-dev libc6-i686 libcupsys2-dev libgcrypt11-dev libgnutls-dev libgnutls26 libgpg-error-dev libice-dev liblockfile1 libopencdk10 libpopt-dev libsm-dev libtasn1-3-dev libx11-dev libxau-dev libxaw7-dev libxdmcp-dev libxext-dev libxi-dev libxmu-dev libxmu-headers libxmuu-dev libxp-dev libxpm-dev libxrandr-dev libxt-dev libxtrap-dev libxtst-dev libxv-dev m4 make ssl-cert x-dev x11proto-core-dev x11proto-input-dev x11proto-kb-dev x11proto-randr-dev x11proto-record-dev x11proto-trap-dev x11proto-video-dev x11proto-xext-dev zlib1g-dev
就好了。我的机器里其实已经装了libstdc++6-4.3-dev以及g++-4.3,不过保险起见还是把g++ 4.1以及libstdc++6 4.1的东西搞进来了,尊重一下README-builds.html,也顺便给自己少找些麻烦——后来测试的时候还真发现用libstdc++6 4.3或者g++ 4.3的话会编译失败,大概看了看错误信息,结论是以我现在的c++水平如果要把它port到4.3的话还是暴有难度的…嗯,那就4.1吧,听话的孩子有糖吃。
- 参照README-builds.html,有2个环境变量是必需的,当然这俩环境变量的值指向的目录也不是乱来的:
- Bootstrap JDK:README-builds.html自己都说了,编译openjdk6的时候还需要一个已有的jdk6是很那啥的。没办法,估计语言发展起来之后需要自己来编译自己的某一部分也不是很罕见的事情吧。我的系统里已经装了SUN的jdk6,所以,ALT_BOOTDIR=/usr/lib/jvm/java-6-sun。
- JDK binary plugins:这东西还是个新鲜玩意儿,以前是没听说过。照着README-builds.html里的指示,按图索骥到最新发布的jdk 6 binary plugins:http://download.java.net/openjdk/jdk6/promoted/b14/jdk-6-ea-plug-b14-linux-i586-25_nov_2008.jar。这是个可执行jar文件,java -jar一下,accept一下条款之类的东西,指定个目录就可以安装了。安装完成后,在安装目录里会看到一个openjdk-binary-plugs的子目录,结构和普通jdk一致,内容只有两个文件:LICENSE和jre/lib/rt-closed.jar。rt-closed.jar的内容没什么惊喜,一堆SUN自己的SNMP功能的支持类,光看这文件名就知道肯定是不方便开源的东西。不管它的内容:ALT_BINARY_PLUGS_PATH=~/projects/openjdk/jdk6-bin-plugins/openjdk-binary-plugs/ 。
- 其他的几个环境变量我是没有再手动设置,估计debian系的系统里,那些dev包安装妥当之后也不用再自己设了。
然后,终于可以开始make了,先来make sanity一下,确认当前配置没问题,没问题的话就可以直接跑make了。所有c/c++的代码无疑都是gcc、g++来编译的,其他诸如corba、jaxp、jaxws是单独用javac以及ant编译的,我用的机器上已经装好了ant 1.6.5,编译jaxp和jaxws时也没出什么问题。整个make过程在我这台P4 2.4G MHz 2G RAM的机器里花费掉了…差点儿一个小时…中间看到”linking vm…”的时候我几乎要哭出来了…
make成功后,build/目录下包括所有编译、链接出来的可执行文件以及jar包,还有javadoc。里面的j2re-image和j2sdk-image分别是…jre以及jdk,嗯,废话,是吧。进到bin目录下./java -version一下:
iusr@wisdom:~/projects/openjdk/jdk6/build/linux-i586/bin$ ./java -version
openjdk version “1.6.0-internal”
OpenJDK Runtime Environment (build 1.6.0-internal-iusr_18_mar_2009_16_32-b00)
OpenJDK Client VM (build 11.0-b17, mixed mode)
Yay!
Update: 到一台默认语言设成中文的ubuntu 8.10上重make一次,结果出错了…有3个注意事项要更新一下:
- g++、libstdc++6 dev包的版本问题。如果几个版本共存的话,确保g++-4.1在PATH的最前面能被最先找到。这个比较好解决,而且一旦g++版本正确的话也会确保include路径是对应的libstdc++6的头文件库。小问题。
- make之前要unset JAVA_HOME。这个环境变量如果存在的话make sanity会报错,错误信息也很明显,所以,同样是小问题。
- LANG=C。无论export出去还是运行make,一定确保LANG兼容英语,否则会出现很奇异的错误…
- apt-build install libmotif-dev 。这个忘记了很不应该,因为我用awesome,所以还特别地在.profile里export AWT_TOOLKIT=MToolkit了的。
其他的诸如gawk、m4之类居家旅行必备的东西,如果落下没说的话还请自己装好。
Mar 16
IUSR技术文章 java, linkedin, mercurial, openjdk
最近几天在抽空看openjdk6的源代码。总觉得如果打算干很久java的话,光靠看tutor、doc、reference始终有种底气不足的感觉;src.zip里的东西可以随用随看,但各种本地方法调用以及src.zip不方便包含的类的源代码都是平日在eclipse里开发时很少会花时间看的,但这一部分往往最能决定一个java应用程序的性能。其实预谋了很久了,大概多半年到一年前就有这打算了,可始终没什么空闲,杂事也很多。
OpenJDK老窝在http://openjdk.java.net/。记得早先mustang、dolphin还都在dev.java.net这个域下,而OpenJDK直接挂在java.net下,身份自然特殊。不管别人怎么看,我是想目前先看jdk6的代码,因为日常开发正在用,jdk6也是SUN目前的主打版本,VM特性和API也更稳定,相比之下,jdk7还在密集开发之中,平日看看各种相关人员的blog,新特性、新API也是隔一阵儿就来一个,现在追起来肯定会很累,虽说jdk7也肯定是以后的主流。
获取openjdk6的代码其实也不复杂,尤其是download source bundle的方式,当然也更没劲一些——我(们)的目标是:往死里折腾。
折腾当然有折腾的好处。当你clone了整个一个mercurial forest以后,查看变更记录是了解各种特性、API以及bug fix的最直接的途径,比看什么release notes都管用,而且适合fork出自己hack过的版本——听着很吓人,其实一个hack不见得必须是一个很BT的很完善的东西,那样的话基本成了添加一个feature了,还不如去盯OpenJDK社区啥时候再出Innovators’ Challenge的时候去赚些钱;很多时候hack都是临时解决一些小问题,看上去甚至会觉得有些dirty。
openjdk的源代码采用mercurial做版本管理。Mercurial也是个分布式的版本控制系统,优点是跨平台,缺点是忒慢了点儿,用惯了git尤其没法容忍管理些源代码都慢吞吞的;基本上我也只是用它来拿openjdk的代码,目前还罕见有多少我感兴趣的项目使用mercurial的,所以也没动机去深入学习一下。openjdk6的代码位于http://hg.openjdk.java.net/jdk6/jdk6/,是一个mercurial forest——一大堆源代码tree在一起就形成了源代码forest。配置mercurial以及安装那个forest插件的过程参考一下http://openjdk.java.net/guide/repositories.html应该可以搞定,不是什么大件事。有了mercurial+forest插件以后,找个干净目录来fclone一下:
iusr@wisdom:~/projects/openjdk$ hg fclone http://hg.openjdk.java.net/jdk6/jdk6/
[.]
requesting all changes
adding changesets
adding manifests
adding file changes
added 27 changesets with 63 changes to 29 files
updating working directory
29 files updated, 0 files merged, 0 files removed, 0 files unresolved
[corba]
requesting all changes
adding changesets
adding manifests
adding file changes
added 26 changesets with 1439 changes to 1376 files
updating working directory
1371 files updated, 0 files merged, 0 files removed, 0 files unresolved
[hotspot]
requesting all changes
adding changesets
adding manifests
adding file changes
added 28 changesets with 7862 changes to 3278 files
updating working directory
2964 files updated, 0 files merged, 0 files removed, 0 files unresolved
[jaxp]
requesting all changes
adding changesets
adding manifests
adding file changes
added 26 changesets with 2021 changes to 1975 files
updating working directory
1973 files updated, 0 files merged, 0 files removed, 0 files unresolved
[jaxws]
requesting all changes
adding changesets
adding manifests
adding file changes
added 29 changesets with 4864 changes to 2867 files
updating working directory
2583 files updated, 0 files merged, 0 files removed, 0 files unresolved
[jdk]
requesting all changes
adding changesets
adding manifests
adding file changes
added 97 changesets with 41623 changes to 17063 files
updating working directory
16829 files updated, 0 files merged, 0 files removed, 0 files unresolved
[langtools]
requesting all changes
adding changesets
adding manifests
adding file changes
added 40 changesets with 6616 changes to 3018 files
updating working directory
3012 files updated, 0 files merged, 0 files removed, 0 files unresolved
fclone是forest插件提供的命令,如果forest插件没有配置妥当的话mercurial会提示无法处理fclone这个命令的。等mercurial慢吞吞地把代码下载回来后,折腾的第一步就完成了。当然如果只关注openjdk6的某一模块,比如hotspot,可以单独clone这一个tree。基本上hotspot模块是每个人都感兴趣的,jdk模块次之,其他的corba、jaxp、jaxws之流也不算什么rocket science。考虑到模块大小的话:
iusr@wisdom:~/projects/openjdk$ du -s -B M jdk6/ jdk6/*
542M jdk6/
1M jdk6/ASSEMBLY_EXCEPTION
20M jdk6/corba
63M jdk6/hotspot
37M jdk6/jaxp
35M jdk6/jaxws
349M jdk6/jdk
39M jdk6/langtools
1M jdk6/LICENSE
1M jdk6/make
1M jdk6/Makefile
1M jdk6/README 1M jdk6/README-builds.html 1M jdk6/THIRD_PARTY_README 1M jdk6/TRADEMARK
大概要准备>600M的空间吧,这年头应该谁都不在乎这点儿地方了吧。
OpenJDK社区的代码仓库索引页位于http://hg.openjdk.java.net/,对其他项目感兴趣的话可以自行clone/fclone。
开始折腾前还要铭记一点:大部分openjdk6的源代码是以GPL v2许可的,部分基于其他开源项目的代码还维持其许可证不变,此外还有部分二进制模块使用的是OpenJDK二进制文件许可证。如果真折腾出来好东西了,别忘了回馈社区,没有人家夯下的基础,这一切都不可能完成。
Jan 14
IUSR技术文章 apache, tomcat
好像把apache httpd降级到1.3.x目前来说有效地扼制了该纠结的再次发生,当然,这是还没有完全通过机器压测以及人肉压测证实的,因为各路PM都太忙,前几天发过的一个禁止所有人碰那台server的禁令发布以后真的就没有任何人在碰了,导致降级后服务的压力很轻很轻,除了某health check脚本意外只有我等一二人在随机访问服务。
不过,就像已经敲定的,即使降级到1.3.x可以100%消除这个问题,这也只不过是一个workaround,而不是solution。我真期待我可以NB哄哄地去提个patch给tomcat,可为啥感觉这概率会很小乜…为啥还是很在意dmesg里网卡TSO被disable的那几条日志乜…为啥还是很怀疑e1000网卡驱动的那几个看起来很match该server运行环境的known issues乜…
明天的任务是改掉tomcat的AJP 1.3 connector,强迫丫不许和httpd私下协商来重用已有的AJP连接然后和httpd 2.2.x连接测试——假如这能阻止httpd 2.2.x犯错误,那就意味着…其实也就是验证了下我们长久以来的怀疑:httpd不知道为啥突然漏读/漏发了,导致以后所有的request/response都错了一个位置。显然不重用已有AJP连接的话,AJP协议为数不多的这点儿好处也基本用不上了,对性能肯定是一记重击,是万万不可能用于production上的。
话说tomcat的代码看久了,感觉也不过尔尔,有些繁琐罗嗦跟不上时代,典型的SUN风格。有空倒是该尝试尝试jetty、resin,以前总觉得这俩东西不入流…
Jan 09
IUSR技术文章 apache, tomcat
apache httpd 2.2.8 + mod_proxy_ajp,以及tomcat 6.0.14,httpd会时不时地把应该发给用户A的内容发送给用户B。tcpdump显示,完全是tcp级别的纠结:httpd甚至不等tomcat 从AJP link发送回响应就把已有的一个应该发给另外一个连接的响应给发送了出去。所有的server都是从一个镜像复制出来的,但只有这个server,也是 产品正式上线前最重要的一个server,纠结到了这个程度…
于是乎,请求一个图片,返回一个css;请求一个css,返回一个js;某请求应该会拿到302跳转,结果返回一个应该显示给手机客户端的xml文档…
升级了下httpd到最新发行版,发现还是那个德行,然后在我们还在睡觉时被某人幸灾乐祸似的赶紧麻地利儿地又恢复到了2.2.8——稳定性,这是我在这 公司里最反感的一个说词:明明就是不稳定到无以复加的程度…有bugfix都不跟上,让人怀疑隐约是怕万一升级错了就得被人半夜从被窝里拎出来飙到机房。 其实apache出regression的频率和概率比我们自己要小很多——我不是说没出过。
httpd 2.2.8的代码放在机器里N天了,ctags也跑了一趟,就是没有时间看:因为要和人解释为什么我说这不是我们自己代码(java)出问题造成的,因为 有人怀疑我们自己的代码(java)已经神到可以corrupt整个java runtime从而导致tomcat返回错误的响应了。我从来是不会说”不可能”的人,只不过这事儿概率太小了,小到基本上等于我们team一起买了彩票 能瓜分整个奖池的概率。
反正那台server也已经被f*ck到这地步了,备用server也已经有人在申请了,准备搞个lighttpd上去试一下,毕竟apache错发响应 是实实在在被tcpdump下来了的,此外还有一次怀疑是某cache的shability。同时翻翻bugzilla以及svn log。
于是搞的我也很纠结:我是来修我们自己的java bug的吔…
圡鳖就需要受到SM级别的震慑。
Nov 27
IUSR技术文章, 补充两句 security, ssl
我得承认我是个SSL重度依赖者,上网总会下意识地把URL里的http后随手加个s——我打URL时从来都是从不厌其烦手动写上协议名称的,发送表单——尤其是用户名密码什么的——看到目的URL不是https的总觉得像被人剥光了一样,家里机器时不时地打开着就为了用putty做个tunnel,方便在公司访问一些没SSL支持又敏感的站点、服务etc.。
可惜啊,今天被彻底地打击了,竟然有人会想到这么明目张胆地强奸下SSL。
我得感谢firefox这些不鸟Internet设置里那些CA证书的应用程序,类似的程序还包括thunderbird以及伟大的,那个,SUN
JRE。早晨来到公司,就发现没有关掉的ff里跳出N多错误提示框说mail.google.com、www.google.com、api.delicious.com这些站点的证书有问题。刚开始还觉得是firefox受不了这一夜的孤独又出问题了。可是因为装了那个Perspectives扩展,这种情况下看证书也比较方便,就顺手看了看,结果被……不知道”雷”这个动词适合不适合这个情景……证书的颁发机构是一个很陌生又很熟悉的名字:说陌生是因为长这么大没见过这个CA,说熟悉是因为每个工作日都能看到这个名字。”咦?难道经济危机时做CA有助于增加收入么?”于是,先ping下这几个域名,确认一下DNS没被f*ck掉,check;然后请出openssl
s_client,确认一下ff没有脑残能把证书都搞错,check。那接下来就是标准国骂了:谁(TMD)动了我的SSL会话?!
为了鄙视下Windows + IE组合,我当然得拿出来最新最NB的IE8试试。结果,果然没问题,所以理论上我刚看到的那个山寨CA肯定已经存在于这鸟Windows
XP里了,理论上我还得查一下internet属性来确认一下,当然最后也很明了:我是在域控的关怀和照料下茁壮成长的,所以这鸟XP里出现几个我不认识的山寨CA,还真没法让我吃惊。
好在大部分应用程序还都是靠谱的,看到这种山寨CA还都是会报错说未知CA的。不过这么一折腾,所有本地跑来测试的java程序都没法跟外网服务器建立SSL连接了。还好我比较有前瞻性,早就着手验证这事儿,赶紧发的信给大家说了下怎么让JRE容忍这几个山寨CA。
我在想一个情景:一个恶意站点,因为一直脑残,用的是伪造的、自认证之类的SSL证书,所以无人问津;某个同事不幸地点了别人发的一个URL,正是这个脑残恶意站点,本来这种情况下是会提示证书错误的,结果现在因为根CA被篡改成某山寨CA,而且这山寨CA还是受信的,那这下子连证书错误都不会提示了,IE很高兴……当然也许这SSL篡改程序还没脑残到这程度吧,哪天试验下。
好吧,既然这样,上班时间咱就不看Gmail和Google
Reader了。既然(有可能)人家觉得员工看这些是浪费时间,我就发挥前辈徒手造解放大卡的精神闷头干活吧。
Aug 29
IUSR技术文章 english, java, linkedin, troubleshooting
A summary of my recent experience with resolving an 100% CPU utilization issue.
We know well that in Java 5 and above we have the mighty java.lang.management.ThreadMXBean which is able to give us almost all ordinary diagnostics information of a given thread, except more detailed information that only debuggers are able to tell. However, such information is implementation/vendor dependent and some information, like CPU time measurement, might be disabled by default, and moreover, in my humble opinion, these information may be not very accurate since they are reported by the JVM itself, not by the OS.
Luckily, almost every popular OS supports some means of measurements down to the threading level, and on the Java side, we have the thread dump (of course, also in popular JVM implementations). I’m here taking Ubuntu, Windows XP with SUN JVM (5.0 for Windows and 6.0 for Linux) as an example. This example demonstrates the process to find the thread that is utilizing unusual amount of CPU time in a Tomcat instance hosting a very simple web application.
When there’s something wrong caused by the JVM, say, similarly, it simply occupies all CPU time, you can always find the guilty threads by doing so:
1. Getting threading information from the OS.
In most Linux distros, a single ps command can handle this. For instance, ps H -eo user,pid,ppid,tid,time,%cpu,cmd –sort=-%cpu , will print out all the processes and their created threads, sorted by the percentage of overall CPU utilization. We can always RTFM for more information about *nix commands;)

In Windows, however, getting threading information for a process might be harder. I suggest using Process Explorer, which is the most easy to use tool amongst other equivalents.
First of all, open the “Properties” dialog of the JVM process.

Next, click on the “Threads” tab to see threads of the process. You can see that they are sorted by CPU utilization by default.

(I have a dual core CPU and this thread is occupying a whole core)
2. Getting a thread dump from JVM.
This task should be easier for us as Java developers;) In Linux we use kill -3 PID,

(I was running less logs/catalina.out after the thread dump, because I wrongly started Tomcat by bin/catalina.sh start instead of bin/catalina.sh run. Never mind)
and in Windows we can simply hit Ctrl+Break in the console window that is running the JVM process.

3. Finding out the Java thread from
Usually the thread ID printed by the OS are in decimal format, and this value needs to be converted into a hexadecimal. And next, no other magic other than finding “nid=xxx” terms in the thread dump. See highlighted parts:
7772=0x1E5C

2148=0×864

Yep, that’s it, test.Test.test();. I’m not going to amuse you by posting the source of test.Test.test(), since it’s no more than an infinite loop:D
Regards and hope this helps.
Apr 09
IUSR技术文章 eclipse, english, java, linkedin, performance
I did this long ago. Since I’m not required to do it repeatedly, it took me another 15 minutes to get warmed up. This time I’m recording the procedures here as a preparation for tomorrow’s exploration on why the hell that tomcat instance was taking so long to start up.
- JVM arguments: -XrunpiAgent:server=standalone,file=/home/iusr/tc.trcxml,profile=/home/iusr/piAgent.options,filters=/home/iusr/piAgent.filters. It’s convenient to export all this twittering to JAVA_OPTS which is used by tomcat to pass to JVM;
- Adjust the LD_LIBRARY_PATH environment variable to include directory “<eclipse_install_or_ext_point>/plugins/org.eclipse.hyades.execution.<OS>.<CPU_ARCH>_<VERSION>”, e.g., in my Edgy box it’s “/usr/local/eclipse-extension/eclipse.org/tptp/eclipse/plugins/org.eclipse.hyades.execution.linux.x86_4.2.2.v200701141614″;
- Compose the profile configuration, filters configuration. Refer to http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.tptp.platform.doc.user/ref/rsaproffilt.htm and http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.tptp.platform.doc.user/tasks/teprofsa.htm for the proper format.
- Run the java class, of course:)
A profile configuration consists several entries, here’s an example (“^\*.*$” lines stand for comments):
* all | none
MONITOR_MODE = all
* true | false
FILTERS = true
* none | deletes | frees | moves | deletesAndMoves | movesAndFrees
TRACK_GC_EVENT_TYPES = movesAndFrees
* static | relocatable | staticAndRelocatable
ID_STYLE = staticAndRelocatable
* true | false
* OPTIONS = false
TIMESTAMPS = true
METHOD_COUNTS = true
OBJ_ALLOC_IS_ARRAY = true
* none | normal | boundary | contiguous | boundaryAndContiguous
STACK_INFORMATION = contiguous
* true | false
* TICKET = true
* full | none | noObjectCorrelation
TRACE_MODE = full
* true | false
* TRACE_ID_REFS = true
Apparently this configuration requires much work to do, so my CPU got 99% utilized just now:P.
The filters configuration is more straightforward, only a wildcard string indicating the desired packages or classes, another wildcard string indicating the methods, and a directive indicating the whether matching packages or classes are to be included or excluded. Here’s an example:
package = com.*
method = *
mode = INCLUDE
Since some subtle differences amongst different Linux distros and versions, the configuration above varies. I once saw a web page saying it’s necessary to add the directory “<eclipse_install_or_ext_point>/plugins/org.eclipse.hyades.execution.<OS>.<CPU_ARCH>_<VERSION>” not only to LD_LIBRARY_PATH but also to PATH. I haven’t tried this out yet, since adding it to LD_LIBRARY_PATH works every time and appears to be more reasonable. Particularly, if the piAgent failed to get loaded or started, take a look at the output of `ldd <eclipse_install_or_ext_point>/plugins/org.eclipse.hyades.execution.<OS>.<CPU_ARCH>_<VERSION>/libpiAgent.so` to check out if there’s anything dependent missing.
Whoa, I cannot help starting the agent on our main testing machine to find out what the hell contributed to the latencies.
Apr 03
IUSR技术文章 english, linkedin
I’d never imagined that one day I would be working in a very much limited environment, and thus applications like Portable Firefox which tend to be as much __green__ as possible had never got my attention. But nowadays, I’ve completely changed my attitude towards such applications.
Accessing windows registry? Forbidden. Configuring system services? Forbidden. Mapping network drivers other than the ones specified by the almighty administrator(s)? Forbidden. Installing an ActiveX plugin such as Adobe Flash Player to the poor naked IE? Forbidden, of course. Although I’ve always had enough with those bursting flash objects in web pages, being expropriated the chance to selectively enjoy good flash objects is very unpleasant. Right, just unpleasant, and it can never be frustrating, muhaha!
Time comes to introduce a very old friend of mine that for long I’ve even forgotten its existence: the tiny browser named K-Melon. It’s really a very old friend of mine, no kidding. It was my first alternative choice of browsers when I was a really newbie using Windows 98 SE. By using K-Melon, I gradually got to know firebird, the bird which today has mutated to an animal called firefox, and some other browsers sharing the same Gecko rendering kernel. I admit it was not very attractive at that time, with an ugly UI, lacking enough extension and plugins; you’ll have to forgive my nearsightedness, because browsers other than IE didn’t have an easy life to deal with at that time, and neither were their users that had chosen them as their primary or even secondary browser. So gradually it disappeared from my hard drive.
Till just now:)
As what I mentioned above, I’m currently working in a very limited environment and I even cannot install a flash player plugin to the IE I’m using. Moreover, I cannot install any other applications since I don’t have the mythical permissions of accessing both registry and some file systems. What’s more, even Portable Firefox cannot start due to some failures in the underlying XPCOM layer. Cool…
For God’s sake, K-Melon is working very well even under such circumstances, the only problem was that all flash player installation programs I grabbed from adobe.com couldn’t run properly, mentioning me that I was not the almighty administrator whom I think I can never be. Nevertheless, it’s not even a competent problem for someone who has a rough understanding about the Mozilla family browsers: copy what you have in $MOZILLA_OR_FIREFOX_OR_WHATEVER/plugins/ that have something to do with flash to the same named directory in the K-Melon installation directory, and restart your running K-Melon if there’s any. Then navigate to wherever a flash object dwells, whoa, I have my beloved flash now:)
It’s still mysterious why firefox and Portable Firefox failed on the system, they should have followed well the Unix philosophy, or am I just putting too much burden on them?:) Never mind, I’d never thought that those Flash objects hungering for CPU and memory could some day be so genial as well after several days of parting.
Mar 20
IUSR技术文章 english, linkedin
Not quite sure about this, but from a recent clue posted on slashdot, this insane patent is probably true. And some comments on slashdot points out it’s triply linked list that got patented, not our good old linked list or doubly linked list. Nevertheless, it’s still not that difficult to make varieties of existing data structures and/or algorithms and register a patent for it.
Whoa, I’d better go back to my algorithm books and make a summary of remaining patent-able data structures and/or algorithms. Oops, first of all, I need a companion with a US nationality. Who’s interested?
I see in your eyes, the same scorn that would take the heart of me.
All mighty US patent agencies! Haven’t they realized most computer stuff originate from the US, and with their fingers they can probably affect this fragile industry?
Dec 25
IUSR技术文章 fun, java
Programmer:
// muhaha
String test = “blahblahblah”;
String str = new String(test + ” is OK” + “, damn it.”);
Compiles to:
JVM INSTR start_warning “Alert! Eden generation, you’ll be shooted with a bunch of temporary Objects!” ;
0:ldc1 #16 <String “blahblahblah”>
2:astore_1
3:new #18 <Class java.lang.String>
6:dup
7:new #20 <Class java.lang.StringBuilder>
10:dup
11:aload_1
12:invokestatic #22 <Method java.lang.String java.lang.String.valueOf(java.lang.Object)>
15:invokespecial #26 <Method void StringBuilder(java.lang.String)>
18:ldc1 #29 <String ” is OK”>
20:invokevirtual #31 <Method java.lang.StringBuilder java.lang.StringBuilder.append(java.lang.String)>
23:ldc1 #35 <String “, damn it.”>
25:invokevirtual #31 <Method java.lang.StringBuilder java.lang.StringBuilder.append(java.lang.String)>
28:invokevirtual #37 <Method java.lang.String java.lang.StringBuilder.toString()>
31:invokespecial #41 <Method void String(java.lang.String)>
34:astore_2
JVM INSTR start_warning “Please the GC thread heal our poor Eden…” ;
Older Entries Newer Entries
Recent Comments