The application of these by Mercedes on the front wing will be similar to those applied by McLaren, with the 'teeth' helping to overcome a steeper angle of attack. The pointed trailing edge means that the airflow leaves it at differing intervals, creating a small vortex as the airflow intertwines. In the following image I've illustrated how this would occur, but please bear in mind this is not accurate more a means to explain the process.
Ordinarily steeper angles of attack mean that supplying airflow to the trailing egde of the flap becomes critical, if the flow seperates early it can destroy the entire wings efficiency, reducing performance at the transition point for medium speed corners. These small vortices created by the tubercles are used in order to delay seperation, widening the flaps operating window.