All you need to know about borers, your common garden pests
In their larval stage, many beetles bore into trees or tunnel just beneath the bark. As they feed, they encircle entire branches and even the trunk, cutting off the tree's supply of water and nutrients. Early symptoms include wilting and yellowing foliage on a single branch; you may also see small holes bordered by sawdust, excrement, or sap. Some borers enter below the soil line; if these are attacking, you'll see evidence only at the plant base. Fruit and nut trees, ash, dogwood, lilac, and cane berries are especially vulnerable, particularly if they are stressed or in poor health.
Prevention is the best solution. Keep trees healthy with proper fertilizing and watering; be especially attentive to water during drought years. Avoid damaging bark. If you need to prune, do so in midsummer, so that wounds are healed by spring when larvae are present. Cut off and burn infected branches.
Chemical controls may help if you spray when adult beetles are laying eggs in summer. Use chlorpyrifos.