Yep, a whistle is cheap survival gear. You can hear a good whistle from quite a distance compared to just yelling, plus everyone in the area will hear it.
I never went into the woods without a bare minimum: whistle, little metal mirror, waterproof container of waterproof matches and compass. They weigh next to nothing. All my hiking recent years is in parks surrounding the SF Bay Area which are pretty tame compared to the Sierras, Wind Rivers, or Gros Ventre, so it’s lots,of water and some snacks.