{"version": "https://jsonfeed.org/version/1", "title": "/dev/posts/ - Archive for 2014", "home_page_url": "https://www.gabriel.urdhr.fr", "feed_url": "/2014/feed.json", "items": [{"id": "http://www.gabriel.urdhr.fr/2014/11/03/not-cleaning-the-stack/", "title": "Avoiding to clean the stack", "url": "https://www.gabriel.urdhr.fr/2014/11/03/not-cleaning-the-stack/", "date_published": "2014-11-03T00:00:00+01:00", "date_modified": "2014-11-03T00:00:00+01:00", "tags": ["computer", "simgrid", "compilation", "assembly", "x86_64"], "content_html": "<p>In two previous posts, I looked into cleaning the stack frame of a\nfunction before using it by adding assembly at the beginning of each\nfunction. This was done either by modifying LLVM with a <a href=\"https://www.gabriel.urdhr.fr/2014/10/06/cleaning-the-stack-in-a-llvm-pass/\">custom\ncodegen pass</a> or by\n<a href=\"https://www.gabriel.urdhr.fr/2014/10/06/cleaning-the-stack-by-filtering-the-assembly/\">rewriting the\nassembly</a>\nbetween the compiler and the assembler. The current implementation\nadds a loop at the beginning of every function. We look at the impact\nof this modification on the performance on the application.</p>\n"}, {"id": "http://www.gabriel.urdhr.fr/2014/10/06/cleaning-the-stack-by-filtering-the-assembly/", "title": "Cleaning the stack by filtering the assembly", "url": "https://www.gabriel.urdhr.fr/2014/10/06/cleaning-the-stack-by-filtering-the-assembly/", "date_published": "2014-10-06T12:40:02+02:00", "date_modified": "2014-10-06T12:40:02+02:00", "tags": ["computer", "simgrid", "unix", "compilation", "assembly", "x86_64"], "content_html": "<p>In order to help the SimGridMC state comparison code, I wrote a\nproof-of-concept <a href=\"https://www.gabriel.urdhr.fr/2014/10/06/cleaning-the-stack-in-a-llvm-pass/\">LLVM pass which cleans each stack\nframe</a> before using\nit. However, SimGridMC currently does not work properly when compiled\nwith clang/LLVM. We can do the same thing by pre-processing the\nassembly generated by the compiler before passing it to the linker:\nthis is done by inserting a script between the compiler and the\nassembler. This script will rewrite the generated assembly by\nprepending stack-cleaning code at the beginning of each function.</p>\n"}, {"id": "http://www.gabriel.urdhr.fr/2014/10/06/cleaning-the-stack-in-a-llvm-pass/", "title": "Cleaning the stack in a LLVM pass", "url": "https://www.gabriel.urdhr.fr/2014/10/06/cleaning-the-stack-in-a-llvm-pass/", "date_published": "2014-10-06T10:00:02+02:00", "date_modified": "2014-10-06T10:00:02+02:00", "tags": ["computer", "simgrid", "llvm", "compilation", "assembly", "x86_64"], "content_html": "<p>In the previous episode, we implemented a <a href=\"https://www.gabriel.urdhr.fr/2014/09/26/adding-a-llvm-pass/\">LLVM pass which does\nnothing</a>. Now we are trying to modify\nthis to create a (proof-of-concept) LLVM pass which fills the current\nstack frame with zero before using it.</p>\n"}, {"id": "http://www.gabriel.urdhr.fr/2014/09/26/adding-a-llvm-pass/", "title": "Adding a basic LLVM pass", "url": "https://www.gabriel.urdhr.fr/2014/09/26/adding-a-llvm-pass/", "date_published": "2014-09-26T00:00:00+02:00", "date_modified": "2014-09-26T00:00:00+02:00", "tags": ["computer", "simgrid", "llvm", "compilation", "assembly", "x86_64"], "content_html": "<p>The SimGrid model checker uses memory introspection (of the heap,\nstack and global variables) in order to detect the equality of the\nstate of a distributed application at the different nodes of its\nexecution graph. One difficulty is to deal with uninitialised\nvariables. The uninitialised global variables are usually not a big\nproblem as their initial value is 0. The heap variables are dealt with\nby <code>memset</code>ing to 0 the content of the buffers returned by <code>malloc</code>\nand friends. The case of uninitialised stack variables is more\nproblematic as their value is whatever was at this place on the stack\nbefore. In order to evaluate the impact of those uninitialised\nvariables, we would like to clean each stack frame before using\nthem. This could be done with a LLVM plugin. Here is my first attempt\nto write a LLVM pass to modify the code of a function.</p>\n"}, {"id": "http://www.gabriel.urdhr.fr/2014/09/25/filtering-the-clipboard/", "title": "Filtering the clipboard using UNIX filters", "url": "https://www.gabriel.urdhr.fr/2014/09/25/filtering-the-clipboard/", "date_published": "2014-09-25T00:00:00+02:00", "date_modified": "2014-09-25T00:00:00+02:00", "tags": ["computer", "x11", "unix", "cms", "html"], "content_html": "<p>I had a few Joomla posts that I wanted to clean up semi-automatically.\nHere are a few scripts, to pass the content of the clipboard (or the\ncurrent selection) through a UNIX filter.</p>\n"}, {"id": "http://www.gabriel.urdhr.fr/2014/09/19/reading-joomla-content/", "title": "Joomla to Wordpress redirections", "url": "https://www.gabriel.urdhr.fr/2014/09/19/reading-joomla-content/", "date_published": "2014-09-19T00:00:00+02:00", "date_modified": "2014-09-19T00:00:00+02:00", "tags": ["computer", "cms"], "content_html": "<p>There are some <a href=\"https://wordpress.org/plugins/fg-joomla-to-wordpress/\">good\nplugins</a> to\nexport Joomla content to WordPress. However, the free version does not\nrewrite the URIs. It is quite simple to read the Joomla database and\ngenerates a bunch of Apache <code>Redirect</code> directives.</p>\n"}, {"id": "http://www.gabriel.urdhr.fr/2014/08/20/compile-wine-debian/", "title": "Compile a mixed 32 bit/64 bit wine for Debian", "url": "https://www.gabriel.urdhr.fr/2014/08/20/compile-wine-debian/", "date_published": "2014-08-20T00:00:00+02:00", "date_modified": "2014-08-20T00:00:00+02:00", "tags": ["computer", "wine", "debian", "multiarch"], "content_html": "<p>The <a href=\"https://www.winehq.org/\">Wine</a> \ud83c\udf77  <a href=\"http://wiki.winehq.org/\">wiki</a>\nhas instructions for <a href=\"http://wiki.winehq.org/Wine64#head-50d8acdb0146929a14b9601757cbc03452f2056d\">building a shared WoW64\nWine</a>\u00a0:\nthis needs two out of source builds. The issue is that some\ndevelopement packages are not multiarch co-installable. Another wiki\npage for Ubuntu recommends <a href=\"http://wiki.winehq.org/BuildingBiarchWineOnUbuntu\">setting up a 32-bit\nLXC</a>.  Here is how\nI did it without a 32-bit container on Debian \ud83c\udf65 testing.</p>\n"}, {"id": "http://www.gabriel.urdhr.fr/2014/07/22/same-page-merging/", "title": "Results on same-page-merging snapshots", "url": "https://www.gabriel.urdhr.fr/2014/07/22/same-page-merging/", "date_published": "2014-07-22T00:00:00+02:00", "date_modified": "2014-07-22T00:00:00+02:00", "tags": ["simgrid", "system", "computer", "checkpoint"], "content_html": "<p>In the <a href=\"https://www.gabriel.urdhr.fr/2014/06/13/page-store/\">previous episode</a>, I talked about the\nimplementation of a same-page-merging page store. On top of this, we\ncan build same-page-merging snapshots for the SimGrid model checker.</p>\n"}, {"id": "http://www.gabriel.urdhr.fr/2014/07/17/sample-watchpoint/", "title": "Sample watchpoints or breakpoints with GDB (and FlameGraph)", "url": "https://www.gabriel.urdhr.fr/2014/07/17/sample-watchpoint/", "date_published": "2014-07-17T00:00:00+02:00", "date_modified": "2014-07-17T00:00:00+02:00", "tags": ["gdb", "debug", "computer", "flamegraph"], "content_html": "<p>GDB can be used to get the stack each time a breakpoint is reached.</p>\n"}, {"id": "http://www.gabriel.urdhr.fr/2014/06/13/page-store/", "title": "Page store for the Simgrid model checker", "url": "https://www.gabriel.urdhr.fr/2014/06/13/page-store/", "date_published": "2014-06-13T00:00:00+02:00", "date_modified": "2014-06-13T00:00:00+02:00", "tags": ["simgrid", "system", "computer", "checkpoint"], "content_html": "<p>The first (lower) layer of the per-page snapshot mechanism is a page\nstore: its responsibility is to store immutable shareable\nreference-counted memory pages independently of the snapshoting\nlogic. Snapshot management and representation, soft-dirty tracking\nwill be handled in  higher layer.</p>\n"}, {"id": "http://www.gabriel.urdhr.fr/2014/06/11/sdl2-gamepad-calibration/", "title": "SDL2 gamepad calibration", "url": "https://www.gabriel.urdhr.fr/2014/06/11/sdl2-gamepad-calibration/", "date_published": "2014-06-11T00:00:00+02:00", "date_modified": "2014-06-11T00:00:00+02:00", "tags": ["computer", "config", "video-game"], "content_html": "<p>Many recent games do not provide an option to map the keys/axes of the\ngamepad to specific actions. They assume that the gamepad is XBox\ncompatible: if it is not the game is completely unusable. SDL2\nprovides a way to calibrate a gamepad \ud83c\udfae in order to map its\nkeys/axes to the \u201cstandard\u201d XBox ones.</p>\n"}, {"id": "http://www.gabriel.urdhr.fr/2014/06/06/custom-keyboard/", "title": "Custom (X11/xkb) keyboard layout without being root", "url": "https://www.gabriel.urdhr.fr/2014/06/06/custom-keyboard/", "date_published": "2014-06-06T00:00:00+02:00", "date_modified": "2014-06-06T00:00:00+02:00", "tags": ["computer", "config", "xkb"], "content_html": "<p>Short tutorial about creating a custom keyboard layout without being\nroot.</p>\n"}, {"id": "http://www.gabriel.urdhr.fr/2014/06/03/non-cow-snapshots/", "title": "Per-page shallow snapshots for the SimGrid model checker", "url": "https://www.gabriel.urdhr.fr/2014/06/03/non-cow-snapshots/", "date_published": "2014-06-03T00:00:00+02:00", "date_modified": "2014-06-03T00:00:00+02:00", "tags": ["simgrid", "system", "computer", "checkpoint"], "content_html": "<p>I looked at my options to achieve efficient/cheap snapshots of the\nsimulated application for the Simgrid model checker using\n<a href=\"https://www.gabriel.urdhr.fr/2014/06/02/cow-snapshots/\">copy-on-write</a>. Here I look at another\nsolution to achieve this without using copy-on-write.</p>\n"}, {"id": "http://www.gabriel.urdhr.fr/2014/06/02/cow-snapshots/", "title": "Copy-on-write snapshots for the SimGrid model checker", "url": "https://www.gabriel.urdhr.fr/2014/06/02/cow-snapshots/", "date_published": "2014-06-02T00:00:00+02:00", "date_modified": "2014-06-02T00:00:00+02:00", "tags": ["simgrid", "system", "computer", "checkpoint"], "content_html": "<p>The <a href=\"http://simgrid.gforge.inria.fr/\">SimGrid</a> model checker\nexplores the graph of possible executions of\na simulated distributed application in order to verify safety and\nliveness properties. The model checker needs to store the state of the\napplication in each node of the execution graph in order to detect\ncycles. However, saving the whole state of the application at each\nnode of the graph leads to huge memory consumption and in some\ncases most of the time is spent copying data in order to take the\nsnapshots of the application. We will see how we could solve this problem,\nusing copy-on-write.</p>\n"}, {"id": "http://www.gabriel.urdhr.fr/2014/05/23/flamegraph/", "title": "Profiling and optimising with Flamegraph", "url": "https://www.gabriel.urdhr.fr/2014/05/23/flamegraph/", "date_published": "2014-05-23T00:00:00+02:00", "date_modified": "2014-05-23T00:00:00+02:00", "tags": ["simgrid", "optimisation", "profiling", "computer", "flamegraph", "unix", "gdb", "perf"], "content_html": "<p><a href=\"http://www.brendangregg.com/flamegraphs.html\">Flamegraph</a>\nis a software which generates SVG graphics\nto visualise stack-sampling based\nprofiles. It processes data collected with tools such as Linux perf,\nSystemTap, DTrace.</p>\n"}]}