In a medium sized bowl, add the mushrooms and toss with 4 tablespoons of olive oil, garlic, thyme and the rosemary. Cover with plastic and stick in the refrigerator to marinate for a couple of hours.
After 2 hours, remove the mushrooms from the refrigerator. The mushrooms most likely absorbed most of the oil. If not, remove them from the excess oil and season with salt and pepper.
Heat a frying pan or saute pan over medium heat and when hot, add a little olive oil to coat the bottom of the pan. When the oil is hot, add the mushrooms and cook until they start to brown and soften up. This should take no more than 8 to 10 minutes.
When the mushroom are done, transfer them to some stacked paper towels to absorb any extra oil. When cool enough to handle, cut them into small pieces and reserve.
In the same pan, add the butter and melt it over medium heat.
Add the thinly sliced onions and caramelize them by turning down the heat to medium-low and cook slowly until they are golden brown, soft and smell heavenly. This can take 20 to 30 minutes so have some good music to play while you are cooking.
Add Marsala wine and cook down until most of the wine has cooked off.
When the onions are soft and sweet tasting, season with a little salt and pepper, taste, and adjust seasoning. Transfer the onions to a colander that's sitting in a bowl so the onions can drain.
When the onions are cooled down, transfer to a small bowl, cover with plastic wrap and put into the refrigerator.