By default stored procedures and functions or not generated by mysqldump, you will need to add the parameter --routines (or -R):
mysqldump -u username -p -R db_name > dump.sql
When using --routines the creation and change time stamps are not maintained, instead you should dump and reload the contents of mysql.proc.