How to specify a traceset in OSL
I have traced this back to the OSL code where the 'traceset' is accepted and passed out to the compiled 'oso' file. This is further passed to Cycles to be executed and does indeed include the 'traceset' string.

However, on picking through the Cycles source code I came across the only reference to 'traceset' in the following function (trace) :

bool OSLRenderServices::trace(TraceOpt &amp;options, OSL::ShaderGlobals *sg,
    const OSL::Vec3 &amp;P, const OSL::Vec3 &amp;dPdx,
    const OSL::Vec3 &amp;dPdy, const OSL::Vec3 &amp;R,
    const OSL::Vec3 &amp;dRdx, const OSL::Vec3 &amp;dRdy)
{
    /* todo: options.shader support, maybe options.traceset */
    ShaderData *sd = (ShaderData *)(sg-&gt;renderstate);

    /* setup ray */
    Ray ray;

    ray.P = TO_FLOAT3(P);
    ray.D = TO_FLOAT3(R);
    ray.t = (options.maxdist == 1.0e30f)? FLT_MAX: options.maxdist - options.mindist;
    ray.time = sd-&gt;time;

    if(options.mindist == 0.0f) {
        /* avoid self-intersections */
        if(ray.P == sd-&gt;P) {
            bool transmit = (dot(sd-&gt;Ng, ray.D) &lt; 0.0f);
            ray.P = ray_offset(sd-&gt;P, (transmit)? -sd-&gt;Ng: sd-&gt;Ng);
        }
    }
    else {
        /* offset for minimum distance */
        ray.P += options.mindist*ray.D;
    }

    /* ray differentials */
    ray.dP.dx = TO_FLOAT3(dPdx);
    ray.dP.dy = TO_FLOAT3(dPdy);
    ray.dD.dx = TO_FLOAT3(dRdx);
    ray.dD.dy = TO_FLOAT3(dRdy);

    /* allocate trace data */
    OSLTraceData *tracedata = (OSLTraceData*)sg-&gt;tracedata;
    tracedata-&gt;ray = ray;
    tracedata-&gt;setup = false;
    tracedata-&gt;init = true;
    tracedata-&gt;sd.osl_globals = sd-&gt;osl_globals;

    /* raytrace */
    return scene_intersect(sd-&gt;osl_globals, ray, PATH_RAY_ALL_VISIBILITY, &amp;tracedata-&gt;isect, NULL, 0.0f, 0.0f);
}


Note the comment /* todo: options.shader support, maybe options.traceset */ - this is the only mention in Cycles source of 'traceset'. So, although the 'traceset' is passed into Cycles from the OSL shader it is not actually processed. This would seem to show that the 'traceset' option of the OSL 'trace' call has not yet been implemented.