Using a mortar and pestle grind the garlic, rosemary, thyme and peppercorns into a thick paste. If you don't have a mortar and pestle you can use a small food processor to pulse these ingredients together until a thick paste is achieved.
Trim any excess fat from the pork with a small knife and pat it dry with a paper towel. Rub the garlic-herb paste on all sides of the pork and then generously season with salt.
In an oven proof skillet or braiser, heat 2 tablespoons olive oil over high until shimmering. Sear the tenderloin until browned on all sides, about 3 minutes per side (12 minutes total). Transfer the skillet to the center rack in the oven and cook until the internal temperature of the pork reads 140°F with a meat thermometer, about 15-20 minutes. Transfer the pork from the skillet onto a cutting board and tent loosely with foil.
Set the skillet, over medium high heat, add 1 tablespoon olive oil and sauté the shallots until just tender.
Pour the port wine into skillet along with the peppercorns and rosemary. Bring the liquid to a low boil and allow it to reduce to about half while scrapping up brown bits with a wooden spoon. Once the liquid has reduced, turn off the heat and whisk in the butter.
Strain the sauce and allow to cool. The port wine sauce can be kept for up to 36 hours and is fantastic as a gravy on mashed potatoes.
Thinly slice the pork roast and serve with port wine sauce on the side. Serve over mashed potatoes.