def METHOD_NAME(remote_command, thread_count):
  """Runs coremark on the VM.
  Args:
    remote_command: Function to run a remote command on the VM.
    thread_count: Number of threads to use.
  Returns:
    A list of sample.Sample objects with the performance results.
  """
  remote_command(
      'cd %s;make PORT_DIR=linux64 clean; '
      'make PORT_DIR=linux64 ITERATIONS=%s '
      'XCFLAGS="-DMULTITHREAD=%d -DUSE_%s -DPERFORMANCE_RUN=1"' %
      (COREMARK_DIR, ITERATIONS_PER_CPU, thread_count,
       _COREMARK_PARALLELISM_METHOD.value))
  output, _ = remote_command('cat %s/run1.log' % COREMARK_DIR)
  return _ParseOutputForSamples(output, thread_count)