I checked in the 1100th changest in mace-fullcontext this week. Most of the recent changesets were focusing on runtime optimization. The runtime can process nearly 250,000 events per second! This is 10 times faster than 6 month ago. Also, it can process nearly 100,000 network message events per second, which is twice than a month ago. (network message events involves network sockets and serialization, so the throughput is lower than non-network-message events)
Template specialization is useful but sometimes hard to master. Today I bumped into a situation I did not fully understand before but managed to resolve after all. I’d like to share some experiences here:
Throughout the upper half of 2013, I was mainly working on two things: performance optimization and API.
Performance has been improved by nearly 20 fold since last September. We were able to diagnose the performance bugs in the original Mace code, and also found a better architecture of the fullcontext runtime. Maybe I would write a paper about the optimization some time.
I am recently working on a better fullcontext C++ API. The goal is, without impacting the performance, make the fullcontext API much easier so that writing a fullcontext application in C++ is straightforward and does not require much effort. In particular, previously most of the features were generated from the perl compiler, which translates the Mace syntax into corresponding (simple) C++ constructs. Because C++ is such a feature-rich language, it makes sense to implement most of features in C++ constructs. After several iteration of reimplementation, it is now possible to directly exploit C++ language features: overloading, overriding, inheritance, templates, template metaprogramming to provide an API straightforward to C++ programmers.
After TIME’s Mar. 4 special issue “Bitter Pill”, the US government published a list of actual medical cost of the most common treatments, compiled from the data submitted from the hospitals for medicaid/medicare reimbursement. Since hospitals in the US are mostly either nonprofit/government-owned, in theory the cost should be equal to the bill. However, the data shows great disparity between the price tag that hospitals bill patients, partly because insurance companies typically negotiate deep discount with hospitals.
The great news is that the report has triggered public awareness, and the medical cost should become more transparent (hopefully).
I received summer research grant again this year!
申請到暑假研究獎金囉! 雖然這沒什麼特別的 (好像申請就能拿得到?)，但畢竟有錢拿就開心! 暑假確定有薪水，加上今年退稅的錢(在美國滿五年變成resident allien身份後退很多)，一整個心情大好。
GCC 4.8.0 is released recently and I’ve been testing it against Mace.
Interestingly starting from gcc 4.8.0, g++ uses a new error reporting format similar to LLVM/Clang which shows exactly where the error comes from (see: Expressive Diagnostics in Clang), unlike in the previous versions where the compiler only indicates which line it is. In the case where the error is inside a macro, it also expands the macro and shows where exactly the error resides. (nice feature)
However, gcc 4.8.0 added a new warning: -Werror=unused-local-typedefs for typedefs that are locally defined but not used (which is annoying). This new warning breaks several well known systems, in particular V8 engine and Boost library. Because it emits warning when compiling boost header files and mace regards warnings as errors, gcc 4.8.0 does not compile mace. A temporary workaround is to disable the warning (cmake -D CMAKE_CXX_FLAGS=-Wno-unused-local-typedefs)
The latest boost repo eliminated some of the unused local typedefs, but not all. I made a patch to eliminate the rest of the unused local typedefs and submitted to boost. Hope this patch will appear in the next boost revision! https://svn.boost.org/trac/boost/ticket/8546
End of the semester and end of my fifth year at Purdue!
Time to move forward and plan for the summer. I’ll plan for a road trip, and work on a research paper or two. Other than that, I am planning to learn something more: I want to get started learning OpenStack, node.js, V8 engine. I’ll also spend some time writing a business plan.
Oh, and prepare for my prelim 🙂
Hoping to get out of Purdue by the end of next year. Not that I don’t like Purdue. I love Purdue and I love West Lafayette, but it’s about time to grow up and make changes to this world!
I pushed up the 1000th changeset to mace-fullcontext yesterday!
This is a huge milestone to this project. Since December 2011 we started this project, it’s been 16 months already.
This is a huge huge project that relies on so many people’s contribution.
In these 1000 changesets, we made 40401 lines of code of change in 351 files.
That contains 5700 lines of perl, 15700 lines of C++, 17900 lines of Mace code and some shell scripts.
Contribution was made by 7 members in 16 months.
ResearchGate is a social network website for researchers. It’s something similar to LinkedIn as to business people/professionals, but RG is geared towards researchers and scientists. ResearchGate lets you connect to other researchers, and let you upload the publication so that other people can download.
I personally find it useful. I host my workshop paper here in my blog for downloading, but I don’t seem to get any traffic. But since I uploaded it to RG, that paper has been downloaded several times. It could enhance my academic impact, I think.
Spent a whole night tracing a strange timer bug: Mace timer did not fire off at correct time on some machines. Specifically, on those machines, timer goes off one second earlier than requested. E.g., if you want it to fire off after 2 second, it actually fires off after 1 second. Strangely, it doesn’t happen to every machines.
Initially I thought it was a problem in Mace code, so I spent the night digging into the timer code. Finally, there’s one function to blame: pthread_cond_timedwait(). It does not behave correctly.
According this this StackOverflow post, this bug is triggered by a Linux kernel bug due to leap second. The problem will be gone after rebooting the machine, and indeed that problematic machine hasn’t been rebooted for more than a year. Well, this is so unexpected.