Jun 30 2007

No reason to feel guilty…

Categories: Life

So, I broke down and ordered pizza last night instead of cooking. Ate it while watching Smoking Aces. Went out for Adams birthday afterwards which was a lot of fun.

Started at the Fox and Fiddle then headed down to the Bier Markt. Had a few, stupidly expensive 8$ for a Guiness, drinks. Matt and I took off sometime around midnight and headed over to the Royal York Library bar for a few more drinks over there, you can actually hold a conversation without screaming.

So, got up this morning, and what did I have? Sweet, tasty, tasty pizza. So, it worked out perfectly. Perfectly I say.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Jun 29 2007

Stuffing my pahole

Categories: Programming
Tags:

There was an interesting utility mentioned on IRC the other day
Pahole. What’s Pahole? Well, it’s an application that can tell you about holes in your structures. (And yes, if you’re not a programmer you probably really don’t care and can stop reading, heh.)

There’s an LWN Article about the initial release of Pahole and Nathan point to another excellent article. So, between the two of these I managed to get it working.

I’m using Ubuntu here and had to install a few utilities/libraries for everything to run successfully. I installed:

  • cmake
  • libdw-dev
  • libebl-dev

After that following the instructions everything compiled fine. I ended up with the libdwarf stuff in /usr/local which I didn’t like, and pahole didn’t like either, so I moved it to /usr/local/lib and re-ran /sbin/ldconfig. Everything seems to be working as expected.

With everything installed I ran it on ewl:
pahole -V ewl_widget.o
and got…..nothing. After a bit of fiddling I realized I had removed the -g last time I compiled Ewl. Once I’d re-compiled Ewl with -g and re-ran the above command I got the expected output:

struct Ewl_Widget {
  Ewl_Object             object;           /*     0    76 */
  /* --- cacheline 1 boundary (64 bytes) was 12 bytes ago --- */
  Ewl_Widget *           parent;           /*    76     4 */
  Ewl_Callback_Chain     callbacks[25];    /*    80   200 */
  /* --- cacheline 4 boundary (256 bytes) was 24 bytes ago --- */
  Ewl_Attach_List *      attach;           /*   280     4 */
  void *                 smart_object;     /*   284     4 */
  void *                 fx_clip_box;      /*   288     4 */
  void *                 theme_object;     /*   292     4 */
  const char  *          theme_path;       /*   296     4 */
  const char  *          theme_group;      /*   300     4 */
  const char  *          theme_state;      /*   304     4 */
  const char  *          appearance;       /*   308     4 */
  const char  *          inheritance;      /*   312     4 */
  int                    layer;            /*   316     4 */
  /* --- cacheline 5 boundary (320 bytes) --- */
  int                    toplayered;       /*   320     4 */
  Ecore_Hash *           theme;            /*   324     4 */
  Ewl_Pair_List          theme_text;       /*   328     8 */

  /* size: 336, cachelines: 6 */
  /* last cacheline: 16 bytes */
}; 

Which, surprisingly , had no holes in it.

After that I ran it on /usr/local/lib/libewl.so.1.0.0 to see what everything looked like and came out with this. There are a few structs with holes in them, but nothing that we can actually fill.

If you want pahole to give you information on filling holes you can run:

pahole -RC Ewl_Widget /usr/local/lib/libewl.so.1.0.0

and it would try to fill any holes in the Ewl_Widget structure.

All in all, a pretty cool little utility. I’ll have to keep it around and check Ewl every now and then to make sure we aren’t wasting any memory.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Jun 28 2007

Giants

Categories: Writing

Rising from the earth
A field of giants
Twisting
Twisting in the wind
Powering a generation.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Jun 27 2007

Yippie-kay-ya….

Categories: Movies

As you’ve probably guessed, I went and saw Live free or die hard tonight and it was fucking fantastic.

It manages to hit just the right combination of over the top action and funny one liners to make this movie work. It was well worth the 11$ it cost to get into the theater. I must say, Bruce Willis has still got it as John McClane and Justin Long does a fantasic job as the sidekick.

I’ve gotta say, their truck made me think of the Blackbox all it needed was a Sun logo painted on the side.

I’ve had enough of this kung-fu shit.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Jun 27 2007

Tasty

Categories: Cooking

Since my wife is away partying it up in Seattle I’ve been on my own for food. I’ve been trying to avoid eating out all the time, to the extent of walking home and making myself something for lunch.

I don’t actually mind cooking. Once I’m doing it it’s kind of fun. It’s the, damn it’s going to take me an hour to make this, I’ll just call Pizza Pizza battle that I often lose. Anyway, I decided to get some fish and veggies for dinner the other day. The fish is just the standard pre-marinated stuff from the grocery store. The veggies I thought were pretty tasty. So, without further ado:

  • 1/2 red pepper
  • 1/2 yellow pepper
  • 1/2 green pepper
  • bunch of chopped mushrooms
  • bunch of chopped carrots
  • bunch of onion
  • hot sauce
  • chyanne pepper
  • olive oil

Basically I just threw everything into a frying pan with the oil then dumped on a bunch of chyanne pepper and hot sauce. It ended up with a nice spicy taste, not too hot but hotter hot sauce would fix that up.

Yea, I know, pretty lame, but I thought it was tasty and it wasn’t from Pizza Pizza.

Oh, I managed to get two meals out of the quantities above so it would probably feed two people for dinner.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Next Page »