Two years into my PhD program, and Mom is dying of cancer. Should I tell my advisor about it?
My deepest sympathies for what you are going through.

You should certainly tell your advisor. No reasonable person would believe that you are using this situation as an "excuse" for poor performance.

Understanding your situation will help your advisor do his/her job: advising you according to your current needs and circumstances.

Your advisor may be able to direct you to mental health and other support services at your university that can help you through this time. He/she can also make you aware of other options that are available under exceptional circumstances: for example, a short leave of absence if you feel it is necessary, or an option to delay a comprehensive exam, or other similar concessions that can take some of the academic pressure off you while you focus on regaining your mental and emotional health.