Preheat oven to 425.
Clean mushrooms, remove stems, and brush lightly with olive oil.
Place mushrooms cap side down on a rimmed baking sheet.
Bake for 8 minutes; flip and bake for an additional 4-6 minutes. Remove from oven.
While mushrooms bake, melt butter in large frying pan over medium heat.
Reduce heat to medium-low, add onions, sautéing for 20-25 minutes, or until golden brown.
Add rosemary, sugar, and sherry, and saute for another 5 minutes.
Preheat broiler.
Place mushrooms cap side down on baking sheet, and divide onion mixture among the mushrooms.
Top with swiss cheese.
Place baking sheet on upper most rack in the oven, and broil for 30-60 seconds or until cheese is melted.