Normally the term “salary” does not include bonuses, stock options or profit sharing. The salary is the income you can depend on, while everything else is variable from year to year.
Total compensation would include base salary and anything else.
It depends on where you are looking. Government data is usually based on IRS reports which generally include everything. Otherwise, salary is salary, bonuses are bonuses, and no one really wants anyone to know how much anyone actually makes.