diff --git a/contrib/perf.py b/contrib/perf.py
index 631011ff6771d830dd4a58dbed17ecc58ab78680_Y29udHJpYi9wZXJmLnB5..6c23570293645bb421da537f6ff72e3c3b9b2d99_Y29udHJpYi9wZXJmLnB5 100644
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -1580,6 +1580,7 @@
 
     Possible source values are:
     * `full`: add from a full text (default).
+    * `parent-1`: add from a delta to the first parent
     """
     opts = _byteskwargs(opts)
 
@@ -1591,7 +1592,7 @@
         stoprev = rllen + stoprev
 
     source = opts['source']
-    validsource = (b'full',)
+    validsource = (b'full', b'parent-1')
     if source not in validsource:
         raise error.Abort('invalid source type: %s' % source)
 
@@ -1693,6 +1694,9 @@
 
     if source == b'full':
         text = orig.revision(rev)
+    elif source == b'parent-1':
+        baserev = orig.rev(p1)
+        cachedelta = (baserev, orig.revdiff(p1, rev))
 
     return ((text, tr, linkrev, p1, p2),
             {'node': node, 'flags': flags, 'cachedelta': cachedelta})