Friday, October 31, 2008

Dive into Mozilla Modifying Firefox Lab

This lab felt like another "Search and Destroy" task. Well...not really "destroy", but change.

I found the searching to be the more difficult part of this lab as we're to look for some old changes that's different from the current MXR. I kind of wished the MXR kept multiple version so we can actually look up stuff in the version we want. But of course, that's asking for too much as there are sooooooo many code that it'll be a hassle to keep different versions for all the code.

After the "target" has been found, the code wasn't hard to change, as it is pretty much given in the lab.

Thoughts about Labs
Labs are very helpful for computer courses as they give you the hands on experience with doing the actual work. However, in my case in this course, I find the labs a little annoying to do since they don't really contribute too much to what I have to do in the course. I'd wish the labs aren't mandatory and are just counted as bonus marks or some how incorporate into our marks to help lighten the mark weight of our other work.
I have nothing against the labs in this course. They're great for helping us understand Mozilla. But when we have to do something that's not really helping with what we're suppose to do, it does get annoying at times.

Thursday, October 23, 2008

FSOSS - TikiWiki

FSOSS, what does it stand for?

Fun Stuff Or Scary Stuff, no, that's not it.
For Students Or School Staffs , nope, that's not it either.

It's 'Free Software and Open Source Symposium'.

I was actually looking forward to it. With all the hypes from the Profs, and the promotion gone into it. And yes, the beer was a possible factor, but I didn't get the free beer =(. Unfortunately, I was only able to attend the morning on the first day of the event. And since I don't really have a good memory, I'll just talk about the experience I had with the talk I remember the most - TikiWiki.

The FSOSS was definitely not scary, and it wasn't just for students and staffs. There were a lot of other people too. How did I know this? Well....to start the TikiWiki talk, the speaker actually asked everyone in the hall to give a brief introduction of themselves and why there were here. When I said all, I meant all, which I find a little ridiculous to do, since they already have a limited time to work with and they were starting a little late.

At least from this, I found out there were all kinds of people there. Students, Grads, Professors, People from Companies, or just freelance people who are interested in learning more about another CMS that's out there. One of the intros I really liked from the group was, "I love Tiki, I Love Wiki, and then there's TikiWiki". Obviously, you can tell that this, and the same with many others, that, they just decided to come to the TikiWiki talk and had no real reason to be here.

Anyways, onto the talk/presentation.

I thought I would be able to actually know what TikiWiki is. Like how it looks, how it works, what it can do, or how it is different from all those other CMS out there. But I didn't get much of any of them. They showed us a list of things you'd do with a CMS and they graded them A to E according to TikiWiki's capability for those tasks. Showed us a tutorial video on how to use the TikiWiki, but it was more like how to create a form and what type of inputs you can use (textbox, radio, drop down, check box, textarea, etc). I didn't really find any of these useful. They're basically things I could have just found myself or easily figure out myself just by playing with the CMS.

Overall, I didn't find this particular presentation to be quite useful or informative.

One thing I really like and made me laugh, or at least smile during the presentation was when they showed the video. In the beginning of the video, there was a label was I found pretty amusing.



Unfortunately, the video didn't seem that smart itself. Maybe it was because they were just skipping to show some parts of the video. But yea, I wish the talk could have been better. Like have more visual of what they're talking about. Show some screenshots of the TikiWiki console, or show some functions or ability the TikiWiki could do, or show some sort of comparison of TikiWiki and other CMS.

Wednesday, October 15, 2008

Interesting Note from Profiling Build

So after having made changes to rules.mk from the config folder I've managed to get times spent in each of the directory while building. To do so, I've basically replaced all the $(MAKE) in rules.mk with time $(MAKE) with a few exceptions.

At first, I found it interesting that I managed to extract 1909 times from the log when there are only 1752 folders (in my build anyways). Upon closer looks, I realized that some of the times are actually a sum of the previous times.

Before I found this, I thought it was gonna be easy writing a program to just add all these times up. Now, I got to do a little bit more thinking before I can add them up properly.

*brings out the good old calculator*

Tuesday, October 14, 2008

Progress~!!

Success in finally getting some time~! Thanks to Ted =) After talking to Ted, I've gotten a lot more understanding of the make files. Before, I was still ok with them, understanding generally what's happening in the make files. But after talking with Ted last night, it made a lot more sense.

So now that I've finally gotten some time, I need to analyze, or at least, extract these times and categorize them. Hopefully, this doesn't take longer than I expected.

Thursday, October 9, 2008

Profiling Mozilla Build - No Progress: Need HELP

So, I've been trying to profile the mozilla build for the last 3 weeks, and it feels like I haven't gotten anywhere yet. I mean, I'm able to find out which files to look at, where the rules are, where the config files are, which config files are loaded, how their info is extracted and converted, but I'm still unable to actually TIME some of these process and how long the build spends on each directory/file/command.

The files I've looked at and what my understanding of these files are:

  • client.mk: used to calling all the necessary config files and building

  • mozconfig2configure: picks out the ac_add_options from the .mozconfig

  • configure.in

  • configure: calls on config, checks system, load cahce file, and create files/directories

  • rules.mk

  • mozconfig2client-mk: picks out the mk_add_options from the .mozconfig

  • mozconfig-find: finds the .mozconfig file



Instead of going straight into timing all the individual directory/file/command, I decided to just try timing how much time the configure file takes. So I went into client.mk, where configure is loaded. This is what frustrated me the most, I've literally spent many hours, trying to just put a single echo or print statement, but it's ALWAYS saying "missing operator" or something along that line. I've tried many ways but none of them seems to really work.

  • echo Testing

  • @echo Testing

  • echo "Testing

  • print Testing

  • print "Testing"

  • print("Testing")


What frustrates me more, is that I can't even tell what language it's actually written. Like for the other files, I can tell they're just shell scripts, which I've done a bit before so I can edit it. But client.mk or any other mk files...... I have no idea how to read or edit them.

I'm like really running out of ideas. I'm literally 2 steps away from what I wanted to do and yet, I'm having so much trouble trying to get through these 2 steps.

I've even tried wrapping the files up in a script to try timing it. It works, but it doesn't really do what I want to do. I've also researched on some of the profiling softwares out there, but either they don't do what I wanted, or I might have missed some really good ones that fits my project.

I'm at a total lost, I need some serious help. I wish I could just get a bit more pointers in how I can do this. What's even better is if someone can tell me exactly what I need to do or show me some samples so I can actually learn from it.

Wednesday, October 8, 2008

Thunderbird Bugzilla Lab

Due to the nature of my project, I don't actually come in contact with debugging a lot. So this lab has become my first real attempt at debugging Mozilla, and it wasn't as scary or difficult as I thought it'd be. Thanks to this lab, I've had a nice experience in coding and filing patches.

The bug report I made on Bugzilla has been posted here: Bug Report and on my Wiki page

The patch to the email problem is posted here: Bugzilla and Wiki

The process for fixing the bug was pretty much the same as any programming debug.
1) Find the source of the bug - MXR or the "Hint"
2) Trial and Error to fix the code
3) Test

And now, the problem has been fixed, and I'm done with this lab =)

Monday, October 6, 2008

Pointed in the right direction, still many obstacles to overcome

So, I've finally found where I should be looking, or rather, I've been pointed to the right files by Ted =) Thanks Ted, you save my life from reading all those other files =)

Now that I've been pointed to the right files, I tried to put some echo into them to make sure they're the right files for me to poke around with. Not much luck there for some reason, so now I need to spend a little more time, testing, poking around, and reading code before I can make more progress in my project.

Saturday, October 4, 2008

Building Mozilla Using Gold Linker

Earlier, I saw on the Contrib Opportunities page that they wanted someone to test out the Gold Linker with the Mozilla build. Since I had to build, build, and build some more on Mozilla, I thought I might as well build it with the gold linker and test it for them. So after I've got all the necessary components installed, I tested the build with and without the gold linker on Ubuntu in my VirtualBox.

My machine is a 2.0 GHz Duo, with 4GB ram, and a 7200rpm Harddrive running Windows Vista Business edition. The profile I set for Ubuntu on VirtualBox is 1G Ram. In the .mozconfig file, I had the following settings:

mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/../obj-@CONFIG_GUESS@
ac_add_options --enable-application=browser
mk_add_options MOZ_CO_PROJECT=browser
mk_add_options MOZ_MAKE FLAGS=-j5
ac_add_options --disable-ogg


And the build times - all from scratch - I've got was this:

With Gold Linker (2 runs)
Real 48m 03.693s 44m 57.422s
User 23m 57.074s 18m 49.275s
Sys 21m 46.282s 23m 12.551

Without Gold Linker (2 runs)
Real 42m 50.664s 47m 31.936s
User 17m 26.149s 32m 35.010s
Sys 23m 39.225s 12m 24.479s


I hope this helps Dave and Ted.

Thursday, October 2, 2008

Bugzilla

So...I've tried finding some bugs related to my project, but unfortunately, there aren't any. It was expected though, since my project is mainly trying to find out why the build time on Windows is so long.

Although I was unsuccessful looking for a thread to CC myself from bugzilla, I have been getting messages from this other thread I've been looking at about 'The Build System'. I'm assuming the main idea is the same as doing it on Bugzilla.

It's actually quite surprising how many messages are posted each day for a single topic/thread. And it's not some 2-3 sentence replies, there are actually lots of useful/descriptive replies each day. You might not find the info to be useful specifically to your problem, but, there are lots of good information from these posts.

Sweng-Gamedev

Contribution

I've finally made a contribution~!

My project was easy enough for everyone to contribute to. I mean, it's something they needed to do anyways, might as well time it and submit it as a contribution.

And now, I've finally gotten a chance to contribute to someone's project. I made a simple webpage which resizes the window. So now, I hope the testing gets easier for Tony =)

Add an Infobar style warning for window resize/move